Mike Pall
1481263aaa
ARM, MIPS, PPC: Rematerialize FPR invariants first.
2012-08-19 18:42:08 +02:00
Mike Pall
4dc9e22def
ARM: Add VFP and hard-float ABI variants to JIT compiler.
2012-08-09 13:13:11 +02:00
Mike Pall
53e28d7678
Limit number of parent links handled by backend.
2012-07-11 16:48:52 +02:00
Mike Pall
24fa85760c
Use an explicit flag to signal SINK tags for a trace.
2012-07-11 16:45:15 +02:00
Mike Pall
79ecb231ce
Don't allocate constants for sunk stores.
2012-07-09 16:22:08 +02:00
Mike Pall
7c056488d9
Drop range limit for sunk stores relative to sunk allocation.
2012-07-04 21:16:06 +02:00
Mike Pall
80d0acc7c1
Fix compiler warnings.
2012-07-03 13:22:30 +02:00
Mike Pall
0af3f47ba0
Add allocation sinking and store sinking optimization.
2012-07-02 23:47:12 +02:00
Mike Pall
0688de5483
Add IR_PVAL instruction for non-slot parent links.
2012-07-02 22:47:20 +02:00
Mike Pall
5d0115ef8d
Add explicit IR_GCSTEP instruction.
2012-07-02 22:42:40 +02:00
Mike Pall
cda3630565
Clean up RegSP handling for parent link instructions.
2012-07-01 22:44:54 +02:00
Mike Pall
0d824b7d14
Fix PHI stack slot syncing.
2012-05-07 23:16:19 +02:00
Mike Pall
bcd459aa0e
MIPS: Integrate and enable JIT compiler.
2012-03-30 01:36:55 +02:00
Mike Pall
6670a13bbf
Add missing mcode limit check in assembler backend.
2012-03-12 00:51:25 +01:00
Mike Pall
10ef109eef
Bump copyright date to 2012.
2012-01-23 22:42:42 +01:00
Mike Pall
10474987bd
Move helper for syncing data/instruction cache to lj_mcode.c.
...
Sync caches after dynamic code generation for FFI callbacks.
2011-12-12 23:10:46 +01:00
Mike Pall
f8a4769fb2
Keep maximum frame extent in snap->topslot.
2011-11-20 17:56:47 +01:00
Mike Pall
87456f73f5
Fix hint-based register allocation in ra_dest().
2011-11-14 23:52:26 +01:00
Mike Pall
fa1675baad
ARM: Fix IR splitting for softfp XLOAD.
2011-11-11 01:07:34 +01:00
Mike Pall
2dc574d06b
FFI: Compile calls to stdcall, fastcall and vararg functions.
2011-10-27 01:57:30 +02:00
Mike Pall
0cf8c20be8
PPC: Integrate and enable JIT compiler.
2011-10-24 16:43:51 +02:00
Mike Pall
167f638f91
PPC: Generalize rematerialization handling.
2011-10-24 16:21:11 +02:00
Mike Pall
3591609dad
PPC: Add Linux/PPC cache flush mechanism.
...
GCC's __clear_cache() does nothing on PPC. Duh.
2011-10-24 16:18:02 +02:00
Mike Pall
8fc9bc1724
Make sure to flush/sync the D/I-cache for all generated code.
2011-10-24 16:16:14 +02:00
Mike Pall
a0d7827554
Generalize handling of stack checks indicated by highest exit + 1.
2011-10-24 16:11:38 +02:00
Mike Pall
c01aaad890
Fix register hints for arithmetic helper functions.
2011-10-22 02:00:15 +02:00
Mike Pall
c805a49d30
Separate/rename NUM/FLOAT <-> I64/U64 conversion functions.
2011-10-22 01:59:10 +02:00
Mike Pall
ff7f7a7180
Cleanup various endianess issues in assembler backend.
2011-10-22 01:35:57 +02:00
Mike Pall
1b949dc60a
Use some register allocator helpers for multiple architectures.
2011-09-05 20:23:20 +02:00
Mike Pall
eb92daad0a
ARM: Don't evict ASMREF_L in ra_evictk().
2011-07-12 15:59:07 +02:00
Mike Pall
deeb8196c4
Reorganize trace linking and track link types.
2011-06-28 23:23:34 +02:00
Mike Pall
db22ce2ba8
Fix iOS build.
2011-06-27 01:33:50 +02:00
Mike Pall
513bd6e952
x86/x64: Don't evict BASE in ra_evictk().
2011-06-22 21:07:02 +02:00
Mike Pall
5d82cfd091
ARM: Add ARM-specific assembler backend.
2011-06-02 03:18:26 +02:00
Mike Pall
a770bf3741
Many soft-float-related fixes to SPLIT pass and assembler backend.
2011-06-02 01:24:36 +02:00
Mike Pall
2d0b32500e
ARM: Tune rematerialization scheduler.
2011-05-31 21:50:14 +02:00
Mike Pall
7bad42a3ba
Fix compiler warning.
2011-05-27 02:01:36 +02:00
Mike Pall
840a067d4e
ARM: Fix rematerialization scheduler.
2011-05-26 18:05:19 +02:00
Mike Pall
8d4400331d
ARM: Flush instruction cache in assembler backend.
2011-05-26 18:04:01 +02:00
Mike Pall
afad72af25
ARM: Add ARM-specific tuning to generic assembler backend.
2011-05-22 17:54:28 +02:00
Mike Pall
aaba681056
ARM: Add rematerialization scheduler for constants to backend.
2011-05-22 17:50:36 +02:00
Mike Pall
138f54352a
Split up FP IR instructions with SPLIT pass for soft-float targets.
2011-05-22 17:44:58 +02:00
Mike Pall
d0115c65f5
More portability cleanups for assembler backend.
2011-05-22 17:13:16 +02:00
Mike Pall
effdfda673
Move IR_CALL* definitions to lj_ircall.h.
2011-05-22 16:28:43 +02:00
Mike Pall
3a942d6cea
Portability cleanups for assembler backend.
2011-05-17 21:26:00 +02:00
Mike Pall
fb46370e56
Cleanup of target dependencies.
2011-05-16 19:32:47 +02:00
Mike Pall
dab4bcafba
Add target-specific macro for stack alignment in assembler backend.
2011-05-16 02:43:14 +02:00
Mike Pall
58f38c254b
Move x86/x64 parts of JIT assembler backend to extra files.
2011-05-12 01:35:09 +02:00
Mike Pall
800349387a
Disentangle target-specific parts of JIT assembler backend.
2011-05-12 01:27:20 +02:00
Mike Pall
c77ca54564
FFI: Compile C function calls with 64 bit args/results in 32 bit mode.
2011-04-29 19:40:50 +02:00
Mike Pall
eb7b452d53
x86: Pop unused FP result from x87 stack.
2011-04-29 19:35:25 +02:00
Mike Pall
31e0774a9e
FFI: Fix cdata finalization.
2011-04-13 21:37:54 +02:00
Mike Pall
3b6f37dd2c
FFI: Add ctype metamethods and ffi.metatype().
2011-04-12 19:16:39 +02:00
Mike Pall
66a1006175
Fuse XLOAD/XSTORE operands more aggressively.
2011-04-05 16:32:27 +02:00
Mike Pall
48438b9e13
Fix code generation for PHIs with type IRT_FLOAT.
2011-04-05 16:29:40 +02:00
Mike Pall
7fb1075903
DUALNUM: Add integer variant of MIN/MAX.
2011-03-11 23:28:46 +01:00
Mike Pall
bfce3c1127
DUALNUM: Handle integer type in JIT compiler.
2011-03-10 01:57:24 +01:00
Mike Pall
1c9981ae4c
x86/x64: Fix code generation for fused IR_MUL/IR_MULOV.
2011-03-10 01:09:18 +01:00
Mike Pall
a127eaf8d2
FFI: Fix x86 code generation for ffi.string().
2011-03-10 00:57:02 +01:00
Mike Pall
449cee405c
Fix code generation for bit.bnot().
2011-03-07 22:11:01 +01:00
Mike Pall
54978e481b
DUALNUM: Make overflow guards weak. Add IR_USE and IR_MULOV.
2011-03-07 20:21:38 +01:00
Mike Pall
1cb58fb7bb
Fix code generation for Intel Atom in x64 mode.
2011-03-03 00:49:45 +01:00
Mike Pall
e1aa8d0d97
FFI: Fix compiled ffi.string() semantics.
2011-02-28 19:47:51 +01:00
Mike Pall
97d0874ff5
Add IR_XBAR, a barrier against XLOAD/XSTORE optimizations.
2011-02-07 21:59:25 +01:00
Mike Pall
26fadcd25b
FFI: Record simple C function calls.
...
Only handles cdecl and fixarg C functions.
Doesn't handle pass-by-value aggregates.
Doesn't handle 64 bit args/returns on 32 bit CPUs.
2011-02-05 21:50:15 +01:00
Mike Pall
df65b8b419
FFI: Rename IR_CNEWP to IR_CNEWI and use it to box 64 bit integers.
...
Generates smaller IR and DCE eliminates many intermediate boxes.
Needs allocation sinking to eliminate the boxes kept alive by PHIs.
2011-02-03 04:22:27 +01:00
Mike Pall
1027018b21
Rename IR_POWI to IR_POW.
2011-02-02 21:33:11 +01:00
Mike Pall
a1e0f991d8
FFI: Record 64 bit integer divide and modulo.
2011-02-02 21:24:55 +01:00
Mike Pall
b613216efc
Add SPLIT pass to split 64 bit IR instructions for 32 bit CPUs.
...
Add generic HIOP instruction for extra backend functionality.
Add support for HIOP to x86 backend.
Use POWI for 64 bit integer x^k, too.
POWI is lowered to a call by SPLIT or the x64 backend.
2011-02-02 02:29:37 +01:00
Mike Pall
d20e53c322
Combine i8/u8 XLOAD with BAND+comparison into test byte mrm, imm8.
2011-01-19 02:05:26 +01:00
Mike Pall
925050fe3f
Differentiate between IR_KPTR and IR_KKPTR.
...
IR_KPTR holds a const pointer to possibly non-const content.
IR_KKPTR holds a const pointer to definitely const content.
Note that only content known by the VM to be const qualifies.
Content tagged as const by users (e.g. const char *) doesn't.
2011-01-19 00:40:03 +01:00
Mike Pall
f385af7084
FFI: Record 64 bit integer comparisons and pointer comparisons.
2011-01-17 01:23:04 +01:00
Mike Pall
06f99fc3df
Bump copyright date to 2011.
2011-01-09 17:12:53 +01:00
Mike Pall
bc37edc911
Fix handling of floats in x86/x64 backend.
2011-01-05 21:45:09 +01:00
Mike Pall
44a22b9889
Add support for non-constant integer IR_MUL to backend.
2011-01-03 02:58:31 +01:00
Mike Pall
593821f7d9
Add support for integer IR_NEG to backend.
2011-01-03 02:35:30 +01:00
Mike Pall
e66b5b6eee
Improve uint64_t <-> FP conversions in x64 backend.
2011-01-02 20:43:58 +01:00
Mike Pall
0005b2c2b9
Add support for uint64_t <-> FP conversions to x64 backend.
2011-01-02 18:24:31 +01:00
Mike Pall
3b47eba9cc
Add 8/16 to 32 bit sign/zero-extension variants to CONV.
2010-12-31 22:49:23 +01:00
Mike Pall
007067bdd8
Fix register allocation for FP <- int conversion.
2010-12-31 22:18:14 +01:00
Mike Pall
783dbd335f
Refactoring of conversion ops, part 5: drop TOINT/TOI64/TONUM.
2010-12-31 04:09:32 +01:00
Mike Pall
65b194a2f8
Copy destination type for CONV from ir->t to op2, too.
2010-12-31 01:00:54 +01:00
Mike Pall
8bcc5ed021
Add support for IRT_FLOAT to XLOAD/XSTORE.
2010-12-30 00:36:33 +01:00
Mike Pall
2ca2de7f0e
Refactoring of conversion ops, part 1: add IR_CONV.
2010-12-30 00:35:32 +01:00
Mike Pall
6082f93919
Improve register allocation for loops with variable shifts.
2010-12-23 00:55:31 +01:00
Mike Pall
c8d6f078a5
Fix XSTORE for IRT_NUM constants.
2010-12-20 19:34:15 +01:00
Mike Pall
255c6e8c87
FFI: Drop IR_CNEWI. Add IR_CNEWP only for pointers/refs.
2010-12-17 17:20:04 +01:00
Mike Pall
cdac0fa2cb
FFI: Add IR_CNEW/IR_CNEWI to allocate/init cdata objects.
2010-12-11 19:32:12 +01:00
Mike Pall
e9cab5a763
x86/x64 backend: keep invariants on the right rather than fusing loads.
2010-12-09 16:08:55 +01:00
Mike Pall
3c78a7f468
Avoid fusing loads if there are multiple references.
2010-12-08 03:26:53 +01:00
Mike Pall
72744dabd9
Fix IRT_NUM support for XLOAD/XSTORE.
2010-12-08 03:24:35 +01:00
Mike Pall
3ef6a53cfa
FFI: Turn cdata indexing into x86/x64 [base+idx*sz+ofs] addressing.
2010-12-08 02:36:09 +01:00
Mike Pall
d4d95ee2da
Fix x64 code generation for A16+REX prefixed instructions.
2010-12-08 01:57:50 +01:00
Mike Pall
e6093b129a
Fix register allocation for 8 bit stores in x86 backend.
2010-12-07 01:18:10 +01:00
Mike Pall
b3c4c0810a
Add IRT_NUM support to XLOAD/XSTORE.
2010-12-06 19:28:51 +01:00
Mike Pall
159f51d811
Add IR_TOI64.
2010-12-06 18:21:51 +01:00
Mike Pall
a5bdae8f23
Fix 64 bit shifts in backend. Fix shift by 0.
2010-12-06 13:16:35 +01:00
Mike Pall
5270586a80
Fix XLOAD/XSTORE references.
2010-12-06 13:15:53 +01:00
Mike Pall
86fd2289f0
Add support for integer IR_MUL.
2010-12-06 12:54:00 +01:00
Mike Pall
b56b83487f
Support all kinds of XLOAD/XSTORE references in backend.
...
Fuse pointer arithmetic, too.
2010-12-06 03:10:28 +01:00
Mike Pall
4755765e32
Avoid warning.
2010-12-06 01:59:07 +01:00
Mike Pall
db3d16bfd7
Add IR_XSTORE.
2010-12-06 01:48:19 +01:00
Mike Pall
588fa0481f
Add support for 64 bit integer arithmetic to x64 backend.
2010-12-06 00:07:36 +01:00
Mike Pall
c5f4f607c9
Fix xmm spill/restore broken by b1fb71fb
.
2010-12-05 22:39:36 +01:00
Mike Pall
5a13fa69d9
Add IR_KINT64.
2010-12-05 22:12:31 +01:00
Mike Pall
b1fb71fb98
Cleanup 64 bit IR type handling.
2010-12-05 21:01:08 +01:00
Mike Pall
26830d070d
Make sure to use irt_toitype() macro everywhere.
2010-12-05 18:51:37 +01:00
Mike Pall
24baf77955
Cleanup architecture, ABI and OS definitions.
2010-11-16 15:03:40 +01:00
Mike Pall
fe21a42a92
Fix conflict between loop branch inversion and HREF+NE/EQ merging.
2010-11-05 23:12:43 +01:00
Mike Pall
b3cf2c70f4
Decouple SLOAD type and optional conversion.
2010-10-11 21:13:37 +02:00
Mike Pall
cc62edebfd
x64: Fix type check for numbers in compiled code.
2010-10-11 19:24:12 +02:00
Mike Pall
52b922c1e9
Avoid fusing potentially negative indexes into AREF on x64.
2010-09-18 18:34:38 +02:00
Mike Pall
8dc76ee327
Add IR_VLOAD for vararg loads.
...
Also fixes the broken AA improvement in the last commit.
2010-09-14 19:58:27 +02:00
Mike Pall
847b9cf253
Record vararg expressions with varargs defined off-trace.
...
Add SLOAD variant to access the frame type/size.
2010-09-13 01:17:38 +02:00
Mike Pall
33ef1fa524
Untangle some target dependencies.
2010-08-03 22:09:12 +02:00
Mike Pall
d05873ee0a
Abstract out pointer hash to hashrot(). Tune hash constants.
2010-07-21 22:06:38 +02:00
Mike Pall
0d3f190d94
Fix passing of constant args in FPRs on x64.
2010-07-14 13:04:29 +02:00
Mike Pall
5ff994fa37
Add weak guards. Emit TNEW/TDUP with a guard bit.
2010-05-08 18:59:59 +02:00
Mike Pall
2e24770ed3
Simplify management of current trace. Drop lazy save.
2010-04-25 13:53:33 +02:00
Mike Pall
721b73fecb
Turn traces into true GC objects (GCtrace).
2010-04-25 03:32:29 +02:00
Mike Pall
d8cb69ed07
Simplify GC step calls from on-trace code.
2010-04-19 23:41:48 +02:00
Mike Pall
932cda0fe3
Replace on-trace GC frame syncing with interpreter exit.
...
Need to sync GC objects to stack only during atomic GC phase.
Need to setup a proper frame structure only for calling finalizers.
Force an exit to the interpreter and let it handle the uncommon cases.
Finally solves the "NYI: gcstep sync with frames" issue.
2010-04-19 00:43:35 +02:00
Mike Pall
fbe092c22d
Fix setup of RD when dispatching to function headers after exit.
2010-04-09 14:26:18 +02:00
Mike Pall
1130ade4de
Also merge EQ(HREF, niltv) in backend.
2010-03-28 06:47:04 +02:00
Mike Pall
44756ded7a
Only fuse with spill slots for cross-section references.
2010-03-28 06:42:48 +02:00
Mike Pall
6038866f7d
Pass MULTRES or negated error code in RD to lj_vm_exit_interp.
...
Fixes overwrite of saved r12 after trace exit.
2010-03-23 18:31:17 +01:00
Mike Pall
097db7317b
Move colocated array part after GCtab (now properly aligned).
2010-03-22 15:59:50 +01:00
Mike Pall
5c8f1f2594
Increase max. fusion distance.
2010-03-19 00:28:04 +01:00
Mike Pall
37a3ca330f
Reorder various structs to reduce padding (thanks to /usr/bin/pahole).
2010-03-15 23:29:10 +01:00
Mike Pall
c4727220e8
Add array bounds check elimination (-Oabc, on by default).
2010-03-15 17:02:53 +01:00
Mike Pall
16f33422f1
Restore MULTRES for snapshots pointing to CALLM etc. bytecodes.
2010-03-13 17:45:09 +01:00
Mike Pall
2e614adb21
Do not fuse SLOAD across RETF.
2010-03-08 23:43:16 +01:00
Mike Pall
e807d46931
Generate indirect calls for out-of-range distances on x64.
2010-03-07 14:31:51 +01:00
Mike Pall
15c3bd7725
Improve performance of HREF/HREFK on x64.
2010-03-03 04:26:31 +01:00
Mike Pall
32309583e5
Improve register allocation on x64.
2010-03-02 23:34:13 +01:00
Mike Pall
e7b737aa12
Implement down-recursion.
2010-03-01 06:45:30 +01:00
Mike Pall
3c6cec0846
Add x64 call argument setup. More 32/64 bit cleanups in assembler.
2010-02-25 03:35:07 +01:00
Mike Pall
4e73488985
Fix 64 bit conversion warnings.
2010-02-24 20:02:20 +01:00
Mike Pall
4c9f71be5d
Major 32/64 bit cleanups in assembler and exit handling.
...
Add 64 bit lightuserdata handling. Keep the tagged 64 bit value.
Allocate/save/restore 64 bit spill slots for 64 bit lightuserdata.
Fix code generation for 64 bit loads/stores/moves/compares.
Fix code generation for stack pointer adjustments.
Add fixed spill slot definitions for x64. Reduce reserved spill slots.
Disable STRREF + ADD fusion in 64 bit mode (avoid negative 32 bit ofs).
2010-02-24 07:09:34 +01:00
Mike Pall
2f3a917f2f
Check relative jump distances for x64.
2010-02-24 01:29:11 +01:00
Mike Pall
d5c8fe4b90
Mark renamed registers as modified.
2010-02-23 17:22:12 +01:00
Mike Pall
c1362dcac9
Don't eliminate SLOAD restores across RETF.
...
Move restore-elimination logic into snapshot_slots().
2010-02-23 03:08:49 +01:00
Mike Pall
f751cd1d6f
Do not patch parent exit for a stack check.
2010-02-22 21:21:52 +01:00
Mike Pall
e76bcd2914
Refactor Lua stack handling in lj_asm.c.
2010-02-21 17:26:21 +01:00
Mike Pall
c1658ddcf1
Eliminate redundant stack checks. Add checks for growing root traces.
2010-02-21 16:47:43 +01:00
Mike Pall
2b22b9e710
Drop obsolete shadow frame link stack.
2010-02-18 03:19:46 +01:00
Mike Pall
b6e4fde0dc
Improve FOR loop const specialization and integerness checks.
2010-02-15 01:07:30 +01:00
Mike Pall
c93138b59e
Major redesign of function call handling.
...
Drop call gates. Use function headers, dispatched like bytecodes.
Emit BC_FUNCF/BC_FUNCV bytecode at PC 0 for all Lua functions.
C functions and ASM fast functions get extra bytecodes.
Modify internal calling convention: new base in BASE (formerly in RA).
Can now use better C function wrapper semantics (dynamic on/off).
Prerequisite for call hooks with zero-overhead if disabled.
Prerequisite for compiling recursive calls.
Prerequisite for efficient 32/64 bit prototype guards.
2010-02-13 04:51:56 +01:00
Mike Pall
b2067236c5
Move dispatch tables out of GG_State struct.
2010-02-11 16:21:18 +01:00
Mike Pall
565eb39574
Drop frame clearing in exit handling and JIT compiled code.
2010-02-11 01:50:32 +01:00