]> git.ipfire.org Git - thirdparty/LuaJIT.git/log
thirdparty/LuaJIT.git
15 years agoFFI: Rearrange code in lib_ffi.c.
Mike Pall [Wed, 12 Jan 2011 20:24:15 +0000 (21:24 +0100)] 
FFI: Rearrange code in lib_ffi.c.

15 years agoFFI: Untangle and fix calling convention definitions.
Mike Pall [Wed, 12 Jan 2011 17:24:29 +0000 (18:24 +0100)] 
FFI: Untangle and fix calling convention definitions.

15 years agoAvoid compiler warnings.
Mike Pall [Wed, 12 Jan 2011 17:22:00 +0000 (18:22 +0100)] 
Avoid compiler warnings.

15 years agoFFI: Fix C calls with complex values on x64.
Mike Pall [Tue, 11 Jan 2011 02:36:49 +0000 (03:36 +0100)] 
FFI: Fix C calls with complex values on x64.

15 years agoFFI: Lookup decorated name for fastcall/stdcall functions.
Mike Pall [Tue, 11 Jan 2011 02:08:54 +0000 (03:08 +0100)] 
FFI: Lookup decorated name for fastcall/stdcall functions.

15 years agoFFI: Auto-detect __stdcall and fix up C function declarations.
Mike Pall [Mon, 10 Jan 2011 19:50:34 +0000 (20:50 +0100)] 
FFI: Auto-detect __stdcall and fix up C function declarations.

15 years agoFFI: Add ffi.load() and ffi.C default namespace.
Mike Pall [Mon, 10 Jan 2011 02:43:18 +0000 (03:43 +0100)] 
FFI: Add ffi.load() and ffi.C default namespace.

15 years agoFFI: Fix function pointer lookup for calls.
Mike Pall [Mon, 10 Jan 2011 02:38:23 +0000 (03:38 +0100)] 
FFI: Fix function pointer lookup for calls.

15 years agoFFI: Preserve stack top across implicit load of FFI library in lexer.
Mike Pall [Sun, 9 Jan 2011 16:48:25 +0000 (17:48 +0100)] 
FFI: Preserve stack top across implicit load of FFI library in lexer.

15 years agoBump copyright date to 2011.
Mike Pall [Sun, 9 Jan 2011 16:12:53 +0000 (17:12 +0100)] 
Bump copyright date to 2011.

15 years agoFFI: Handle NYI cases for cdata call metamethod.
Mike Pall [Sun, 9 Jan 2011 15:48:37 +0000 (16:48 +0100)] 
FFI: Handle NYI cases for cdata call metamethod.

15 years agoFFI: Add missing GC steps for C function calls.
Mike Pall [Sun, 9 Jan 2011 15:48:23 +0000 (16:48 +0100)] 
FFI: Add missing GC steps for C function calls.

15 years agoFix Windows/x86 build and update pregenerated files.
Mike Pall [Thu, 6 Jan 2011 22:37:04 +0000 (23:37 +0100)] 
Fix Windows/x86 build and update pregenerated files.

15 years agoFFI: Add support for calling C functions.
Mike Pall [Thu, 6 Jan 2011 22:30:04 +0000 (23:30 +0100)] 
FFI: Add support for calling C functions.

15 years agoAvoid compiler warnings.
Mike Pall [Wed, 5 Jan 2011 20:48:01 +0000 (21:48 +0100)] 
Avoid compiler warnings.

15 years agoFFI: Add missing link to parameters for C function declaration.
Mike Pall [Wed, 5 Jan 2011 20:45:31 +0000 (21:45 +0100)] 
FFI: Add missing link to parameters for C function declaration.

15 years agoFix handling of floats in x86/x64 backend.
Mike Pall [Wed, 5 Jan 2011 20:45:09 +0000 (21:45 +0100)] 
Fix handling of floats in x86/x64 backend.

15 years agoFFI: Force snapshot after store to cdata.
Mike Pall [Wed, 5 Jan 2011 19:28:57 +0000 (20:28 +0100)] 
FFI: Force snapshot after store to cdata.

15 years agoFFI: Record 64 bit integer arithmetic.
Mike Pall [Mon, 3 Jan 2011 02:35:35 +0000 (03:35 +0100)] 
FFI: Record 64 bit integer arithmetic.

Currently NYI in the x86 backend.

15 years agoAdd support for non-constant integer IR_MUL to backend.
Mike Pall [Mon, 3 Jan 2011 01:58:31 +0000 (02:58 +0100)] 
Add support for non-constant integer IR_MUL to backend.

15 years agoAdd support for integer IR_NEG to backend.
Mike Pall [Mon, 3 Jan 2011 01:35:30 +0000 (02:35 +0100)] 
Add support for integer IR_NEG to backend.

15 years agoFFI: Record pointer arithmetic.
Mike Pall [Mon, 3 Jan 2011 00:30:58 +0000 (01:30 +0100)] 
FFI: Record pointer arithmetic.

15 years agoFFI: Add support for cdata constants to IR.
Mike Pall [Sun, 2 Jan 2011 21:21:10 +0000 (22:21 +0100)] 
FFI: Add support for cdata constants to IR.

15 years agoUse cdata to pass IR_KINT64 to -jdump.
Mike Pall [Sun, 2 Jan 2011 21:20:08 +0000 (22:20 +0100)] 
Use cdata to pass IR_KINT64 to -jdump.

15 years agoImprove uint64_t <-> FP conversions in x64 backend.
Mike Pall [Sun, 2 Jan 2011 19:43:58 +0000 (20:43 +0100)] 
Improve uint64_t <-> FP conversions in x64 backend.

15 years agoFFI: Record tonumber() for boxed cdata.
Mike Pall [Sun, 2 Jan 2011 17:30:02 +0000 (18:30 +0100)] 
FFI: Record tonumber() for boxed cdata.

15 years agoAdd support for uint64_t <-> FP conversions to x64 backend.
Mike Pall [Sun, 2 Jan 2011 17:24:31 +0000 (18:24 +0100)] 
Add support for uint64_t <-> FP conversions to x64 backend.

15 years agoAdd conversions for type mismatches in XSTORE forwarding.
Mike Pall [Fri, 31 Dec 2010 21:50:06 +0000 (22:50 +0100)] 
Add conversions for type mismatches in XSTORE forwarding.

15 years agoAdd 8/16 to 32 bit sign/zero-extension variants to CONV.
Mike Pall [Fri, 31 Dec 2010 21:49:23 +0000 (22:49 +0100)] 
Add 8/16 to 32 bit sign/zero-extension variants to CONV.

15 years agoFix register allocation for FP <- int conversion.
Mike Pall [Fri, 31 Dec 2010 21:17:44 +0000 (22:17 +0100)] 
Fix register allocation for FP <- int conversion.

15 years agoRefactoring of conversion ops, part 5: drop TOINT/TOI64/TONUM.
Mike Pall [Fri, 31 Dec 2010 03:09:32 +0000 (04:09 +0100)] 
Refactoring of conversion ops, part 5: drop TOINT/TOI64/TONUM.

15 years agoRefactoring of conversion ops, part 4: use CONV instead of TOINT/TONUM.
Mike Pall [Fri, 31 Dec 2010 02:56:30 +0000 (03:56 +0100)] 
Refactoring of conversion ops, part 4: use CONV instead of TOINT/TONUM.

Also narrow CONV.int.num and CONV.i64.num.

15 years agoRefactoring of conversion ops, part 3: add FOLD rules for IR_CONV.
Mike Pall [Fri, 31 Dec 2010 00:09:30 +0000 (01:09 +0100)] 
Refactoring of conversion ops, part 3: add FOLD rules for IR_CONV.

15 years agoCopy destination type for CONV from ir->t to op2, too.
Mike Pall [Fri, 31 Dec 2010 00:00:54 +0000 (01:00 +0100)] 
Copy destination type for CONV from ir->t to op2, too.

15 years agoAdd lj_num2u64 for number to uint64_t conversion.
Mike Pall [Thu, 30 Dec 2010 23:46:29 +0000 (00:46 +0100)] 
Add lj_num2u64 for number to uint64_t conversion.

15 years agoFFI: Add missing GC steps for implicit allocations.
Mike Pall [Thu, 30 Dec 2010 11:16:25 +0000 (12:16 +0100)] 
FFI: Add missing GC steps for implicit allocations.

15 years agoRefactoring of conversion ops, part 2: cleanup cdata conversions.
Mike Pall [Wed, 29 Dec 2010 23:42:00 +0000 (00:42 +0100)] 
Refactoring of conversion ops, part 2: cleanup cdata conversions.

15 years agoAdd support for IRT_FLOAT to XLOAD/XSTORE.
Mike Pall [Wed, 29 Dec 2010 23:36:33 +0000 (00:36 +0100)] 
Add support for IRT_FLOAT to XLOAD/XSTORE.

15 years agoRefactoring of conversion ops, part 1: add IR_CONV.
Mike Pall [Tue, 28 Dec 2010 21:05:40 +0000 (22:05 +0100)] 
Refactoring of conversion ops, part 1: add IR_CONV.

15 years agoUse macro-map for IRT_* enum. Add IRT_FLOAT.
Mike Pall [Tue, 28 Dec 2010 19:58:00 +0000 (20:58 +0100)] 
Use macro-map for IRT_* enum. Add IRT_FLOAT.

15 years agoFFI: Catch various NYI cases while recording.
Mike Pall [Tue, 28 Dec 2010 18:09:01 +0000 (19:09 +0100)] 
FFI: Catch various NYI cases while recording.

15 years agoMake recording of type() independent of LJ_T*/IRT_* mapping.
Mike Pall [Tue, 28 Dec 2010 17:23:41 +0000 (18:23 +0100)] 
Make recording of type() independent of LJ_T*/IRT_* mapping.

15 years agoFFI: Add 64 bit integer arithmetic.
Mike Pall [Sat, 25 Dec 2010 21:54:25 +0000 (22:54 +0100)] 
FFI: Add 64 bit integer arithmetic.

15 years agoFFI: Fix C type representation for valarrays.
Mike Pall [Sat, 25 Dec 2010 21:33:07 +0000 (22:33 +0100)] 
FFI: Fix C type representation for valarrays.

15 years agoFFI: Parse complex and 64 bit integer literals.
Mike Pall [Fri, 24 Dec 2010 00:31:39 +0000 (01:31 +0100)] 
FFI: Parse complex and 64 bit integer literals.

15 years agoFix misnamed macro in Lua parser.
Mike Pall [Fri, 24 Dec 2010 00:23:42 +0000 (01:23 +0100)] 
Fix misnamed macro in Lua parser.

15 years agoFFI: Fix C parser for hex literals.
Mike Pall [Thu, 23 Dec 2010 22:06:04 +0000 (23:06 +0100)] 
FFI: Fix C parser for hex literals.

15 years agoFFI: Add pointer arithmetic.
Mike Pall [Thu, 23 Dec 2010 16:54:54 +0000 (17:54 +0100)] 
FFI: Add pointer arithmetic.

15 years agoFix display of branches to exit stubs in 32 bit disassembly.
Mike Pall [Thu, 23 Dec 2010 00:01:04 +0000 (01:01 +0100)] 
Fix display of branches to exit stubs in 32 bit disassembly.

15 years agoImprove register allocation for loops with variable shifts.
Mike Pall [Wed, 22 Dec 2010 23:55:31 +0000 (00:55 +0100)] 
Improve register allocation for loops with variable shifts.

15 years agoFFI: Record cdata allocations.
Mike Pall [Wed, 22 Dec 2010 22:21:38 +0000 (23:21 +0100)] 
FFI: Record cdata allocations.

15 years agoAvoid compiler warnings.
Mike Pall [Wed, 22 Dec 2010 22:20:50 +0000 (23:20 +0100)] 
Avoid compiler warnings.

15 years agoReassociate XLOAD across PHIs to handle a[i-1] forwarding case.
Mike Pall [Mon, 20 Dec 2010 18:35:57 +0000 (19:35 +0100)] 
Reassociate XLOAD across PHIs to handle a[i-1] forwarding case.

Improved SciMark scores: http://luajit.org/download/scimark.lua

x86      SciMark LARGE | FFT     SOR      MC    SPARSE    LU
-----------------------+---------------------------------------
GCC 4.4.3        623.8 |  91.0   883.5   190.4   784.7  1169.6
LuaJIT git +FFI  651.2 |  97.2  1021.9   323.4   673.7  1139.6
LuaJIT git       527.7 |  91.4  1008.5   225.6   400.0   913.2

x64      SciMark LARGE | FFT     SOR      MC    SPARSE    LU
-----------------------+---------------------------------------
GCC 4.4.3        614.7 |  97.7   883.5   228.5   734.0  1129.9
JVM 1.6.0_22     707.5 |  79.2  1118.1   385.5   658.9  1295.7
LuaJIT git +FFI  632.8 |  89.1  1035.8   298.3   648.1  1092.9
LuaJIT git       516.1 |  88.4   995.4   225.6   382.1   888.9

15 years agoFix XSTORE for IRT_NUM constants.
Mike Pall [Mon, 20 Dec 2010 18:34:15 +0000 (19:34 +0100)] 
Fix XSTORE for IRT_NUM constants.

15 years agoFix dump of pointer constants.
Mike Pall [Mon, 20 Dec 2010 16:12:49 +0000 (17:12 +0100)] 
Fix dump of pointer constants.

15 years agoImprove alias analysis for cdata allocations.
Mike Pall [Mon, 20 Dec 2010 14:26:05 +0000 (15:26 +0100)] 
Improve alias analysis for cdata allocations.

15 years agoFFI: Drop IR_CNEWI. Add IR_CNEWP only for pointers/refs.
Mike Pall [Fri, 17 Dec 2010 16:20:04 +0000 (17:20 +0100)] 
FFI: Drop IR_CNEWI. Add IR_CNEWP only for pointers/refs.

15 years agoFFI: FOLD load of initializers even across PHIs.
Mike Pall [Fri, 17 Dec 2010 15:47:28 +0000 (16:47 +0100)] 
FFI: FOLD load of initializers even across PHIs.

15 years agoFFI: Record copy-by-value for pointer and complex C types.
Mike Pall [Wed, 15 Dec 2010 20:49:40 +0000 (21:49 +0100)] 
FFI: Record copy-by-value for pointer and complex C types.

15 years agoFFI: Simplify copy-by-value. Strip attributes, keep qualifiers.
Mike Pall [Wed, 15 Dec 2010 20:47:46 +0000 (21:47 +0100)] 
FFI: Simplify copy-by-value. Strip attributes, keep qualifiers.

15 years agoFFI: Fix auto-deref of pointers to structs.
Mike Pall [Wed, 15 Dec 2010 18:47:01 +0000 (19:47 +0100)] 
FFI: Fix auto-deref of pointers to structs.

15 years agoFix error location while recording metamethods.
Mike Pall [Wed, 15 Dec 2010 18:44:30 +0000 (19:44 +0100)] 
Fix error location while recording metamethods.

15 years agoFix type-based alias analysis for XLOAD/XSTORE.
Mike Pall [Sun, 12 Dec 2010 22:09:26 +0000 (23:09 +0100)] 
Fix type-based alias analysis for XLOAD/XSTORE.

15 years agoAdd alias analysis for XLOAD/XSTORE. Add DSE for XSTORE.
Mike Pall [Sun, 12 Dec 2010 21:28:48 +0000 (22:28 +0100)] 
Add alias analysis for XLOAD/XSTORE. Add DSE for XSTORE.

15 years agoFOLD (base+k)+(idx*sz)+ofs ==> (base+idx*sz)+(ofs+k).
Mike Pall [Sun, 12 Dec 2010 20:07:23 +0000 (21:07 +0100)] 
FOLD (base+k)+(idx*sz)+ofs ==> (base+idx*sz)+(ofs+k).

15 years agoAdd missing PHI barrier to strength reduction of widening.
Mike Pall [Sun, 12 Dec 2010 20:03:20 +0000 (21:03 +0100)] 
Add missing PHI barrier to strength reduction of widening.

15 years agoExtend all FOLD rules to work on 64 bit integers.
Mike Pall [Sat, 11 Dec 2010 20:20:49 +0000 (21:20 +0100)] 
Extend all FOLD rules to work on 64 bit integers.

15 years agoAdd 64 bit bswap and rotates.
Mike Pall [Sat, 11 Dec 2010 20:20:12 +0000 (21:20 +0100)] 
Add 64 bit bswap and rotates.

15 years agoRegroup FOLD rules for constant folding.
Mike Pall [Sat, 11 Dec 2010 19:08:07 +0000 (20:08 +0100)] 
Regroup FOLD rules for constant folding.

15 years agoFFI: Don't use KNULL for arbitrary NULL pointers.
Mike Pall [Sat, 11 Dec 2010 19:10:52 +0000 (20:10 +0100)] 
FFI: Don't use KNULL for arbitrary NULL pointers.

15 years agoFFI: Add IR_CNEW/IR_CNEWI to allocate/init cdata objects.
Mike Pall [Sat, 11 Dec 2010 18:32:12 +0000 (19:32 +0100)] 
FFI: Add IR_CNEW/IR_CNEWI to allocate/init cdata objects.

15 years agoTurn lj_mem_newgco() into a fastcall.
Mike Pall [Fri, 10 Dec 2010 00:10:52 +0000 (01:10 +0100)] 
Turn lj_mem_newgco() into a fastcall.

15 years agoFFI: Always specialize to the field name for struct access.
Mike Pall [Thu, 9 Dec 2010 21:48:01 +0000 (22:48 +0100)] 
FFI: Always specialize to the field name for struct access.

15 years agoAdd missing guard for check against "#" when recording select().
Mike Pall [Thu, 9 Dec 2010 21:35:49 +0000 (22:35 +0100)] 
Add missing guard for check against "#" when recording select().

15 years agoFFI: Fix alignment of scalars/vectors modified with mode attribute.
Mike Pall [Thu, 9 Dec 2010 17:48:23 +0000 (18:48 +0100)] 
FFI: Fix alignment of scalars/vectors modified with mode attribute.

15 years agoStrength-reduce 32 to 64 bit widening using scalar evolution analysis.
Mike Pall [Thu, 9 Dec 2010 15:12:59 +0000 (16:12 +0100)] 
Strength-reduce 32 to 64 bit widening using scalar evolution analysis.

15 years agoAllow integer literals in FOLD rules.
Mike Pall [Thu, 9 Dec 2010 15:11:15 +0000 (16:11 +0100)] 
Allow integer literals in FOLD rules.

Workaround before refactoring conversion ops.

15 years agox86/x64 backend: keep invariants on the right rather than fusing loads.
Mike Pall [Thu, 9 Dec 2010 15:08:55 +0000 (16:08 +0100)] 
x86/x64 backend: keep invariants on the right rather than fusing loads.

15 years agoApply narrowing optimization to IR_TOI64, too.
Mike Pall [Wed, 8 Dec 2010 20:03:45 +0000 (21:03 +0100)] 
Apply narrowing optimization to IR_TOI64, too.

15 years agoAdd FOLD rule to reassociate 64 bit (x+k1)+k2.
Mike Pall [Wed, 8 Dec 2010 19:57:21 +0000 (20:57 +0100)] 
Add FOLD rule to reassociate 64 bit (x+k1)+k2.

15 years agoFix type-based colorization of snapshot slots in debug output.
Mike Pall [Wed, 8 Dec 2010 19:37:22 +0000 (20:37 +0100)] 
Fix type-based colorization of snapshot slots in debug output.

15 years agoAvoid stack resizes while recording calls to vararg functions.
Mike Pall [Wed, 8 Dec 2010 18:11:58 +0000 (19:11 +0100)] 
Avoid stack resizes while recording calls to vararg functions.

FUNCV might have been recorded twice (with ill effects).

15 years agoFOLD (base+(idx+k)*sz)+ofs ==> (base+idx*sz)+(ofs+k*sz).
Mike Pall [Wed, 8 Dec 2010 02:33:48 +0000 (03:33 +0100)] 
FOLD (base+(idx+k)*sz)+ofs ==> (base+idx*sz)+(ofs+k*sz).

15 years agoAvoid fusing loads if there are multiple references.
Mike Pall [Wed, 8 Dec 2010 02:26:53 +0000 (03:26 +0100)] 
Avoid fusing loads if there are multiple references.

15 years agoFix IRT_NUM support for XLOAD/XSTORE.
Mike Pall [Wed, 8 Dec 2010 02:24:35 +0000 (03:24 +0100)] 
Fix IRT_NUM support for XLOAD/XSTORE.

15 years agoFFI: Turn cdata indexing into x86/x64 [base+idx*sz+ofs] addressing.
Mike Pall [Wed, 8 Dec 2010 01:36:09 +0000 (02:36 +0100)] 
FFI: Turn cdata indexing into x86/x64 [base+idx*sz+ofs] addressing.

15 years agoFFI: Record cdata index operations (preliminary, lots of NYI cases).
Mike Pall [Wed, 8 Dec 2010 01:11:18 +0000 (02:11 +0100)] 
FFI: Record cdata index operations (preliminary, lots of NYI cases).

15 years agoFFI: Treat cdata metatable+methods as immutable in trace recorder.
Mike Pall [Wed, 8 Dec 2010 01:02:21 +0000 (02:02 +0100)] 
FFI: Treat cdata metatable+methods as immutable in trace recorder.

15 years agoFix x64 code generation for A16+REX prefixed instructions.
Mike Pall [Wed, 8 Dec 2010 00:57:50 +0000 (01:57 +0100)] 
Fix x64 code generation for A16+REX prefixed instructions.

15 years agoFix register allocation for 8 bit stores in x86 backend.
Mike Pall [Tue, 7 Dec 2010 00:18:10 +0000 (01:18 +0100)] 
Fix register allocation for 8 bit stores in x86 backend.

15 years agoAdd IRT_NUM support to XLOAD/XSTORE.
Mike Pall [Mon, 6 Dec 2010 18:28:51 +0000 (19:28 +0100)] 
Add IRT_NUM support to XLOAD/XSTORE.

15 years agoAdd IR_TOI64.
Mike Pall [Mon, 6 Dec 2010 15:18:18 +0000 (16:18 +0100)] 
Add IR_TOI64.

15 years agoAdd FOLD rule to turn i << 1 into i + i.
Mike Pall [Mon, 6 Dec 2010 12:26:58 +0000 (13:26 +0100)] 
Add FOLD rule to turn i << 1 into i + i.

15 years agoFix 64 bit shifts in backend. Fix shift by 0.
Mike Pall [Mon, 6 Dec 2010 12:16:35 +0000 (13:16 +0100)] 
Fix 64 bit shifts in backend. Fix shift by 0.

15 years agoFix XLOAD/XSTORE references.
Mike Pall [Mon, 6 Dec 2010 12:15:53 +0000 (13:15 +0100)] 
Fix XLOAD/XSTORE references.

15 years agoAdd support for integer IR_MUL.
Mike Pall [Mon, 6 Dec 2010 11:54:00 +0000 (12:54 +0100)] 
Add support for integer IR_MUL.

15 years agoSupport all kinds of XLOAD/XSTORE references in backend.
Mike Pall [Mon, 6 Dec 2010 02:09:52 +0000 (03:09 +0100)] 
Support all kinds of XLOAD/XSTORE references in backend.

Fuse pointer arithmetic, too.

15 years agoAvoid compiler warnings.
Mike Pall [Mon, 6 Dec 2010 02:07:10 +0000 (03:07 +0100)] 
Avoid compiler warnings.

15 years agoUse native IRT_PTR instead of IRT_LIGHTUD workaround for FILE*.
Mike Pall [Mon, 6 Dec 2010 01:14:39 +0000 (02:14 +0100)] 
Use native IRT_PTR instead of IRT_LIGHTUD workaround for FILE*.

15 years agoSimplify lj_ir_kvalue(). Fix IR_KNULL + IRT_P64 case.
Mike Pall [Mon, 6 Dec 2010 01:12:08 +0000 (02:12 +0100)] 
Simplify lj_ir_kvalue(). Fix IR_KNULL + IRT_P64 case.