crawl:crawl-luajit.git
6 years agoRELEASE LuaJIT-2.0.0-beta6 v2.0.0-beta6
Mike Pall [Fri, 11 Feb 2011 15:28:37 +0000 (16:28 +0100)]
RELEASE LuaJIT-2.0.0-beta6

6 years agoFFI: Disable unused code for some build modes.
Mike Pall [Fri, 11 Feb 2011 15:22:58 +0000 (16:22 +0100)]
FFI: Disable unused code for some build modes.

6 years agoUpdate changelog.
Mike Pall [Fri, 11 Feb 2011 14:52:31 +0000 (15:52 +0100)]
Update changelog.

6 years agoCleanup of docs.
Mike Pall [Fri, 11 Feb 2011 12:50:01 +0000 (13:50 +0100)]
Cleanup of docs.

6 years agoFFI: Finish FFI docs.
Mike Pall [Fri, 11 Feb 2011 00:21:46 +0000 (01:21 +0100)]
FFI: Finish FFI docs.

6 years agoFFI: Finish docs on FFI semantics. Phew.
Mike Pall [Thu, 10 Feb 2011 02:12:09 +0000 (03:12 +0100)]
FFI: Finish docs on FFI semantics. Phew.

6 years agoFix various HTML errors in the docs.
Mike Pall [Thu, 10 Feb 2011 02:10:38 +0000 (03:10 +0100)]
Fix various HTML errors in the docs.

6 years agoFFI: Add more docs on FFI semantics.
Mike Pall [Wed, 9 Feb 2011 00:26:02 +0000 (01:26 +0100)]
FFI: Add more docs on FFI semantics.

6 years agoFFI: Document current FFI implementation status.
Mike Pall [Tue, 8 Feb 2011 00:20:53 +0000 (01:20 +0100)]
FFI: Document current FFI implementation status.

6 years agoFix bytecode optimization of and/or operators.
Mike Pall [Tue, 8 Feb 2011 00:00:47 +0000 (01:00 +0100)]
Fix bytecode optimization of and/or operators.

6 years agoFFI: Record ffi.abi().
Mike Pall [Mon, 7 Feb 2011 23:09:33 +0000 (00:09 +0100)]
FFI: Record ffi.abi().

6 years agoFFI: Record ffi.copy() and ffi.fill().
Mike Pall [Mon, 7 Feb 2011 22:49:27 +0000 (23:49 +0100)]
FFI: Record ffi.copy() and ffi.fill().

6 years agoFFI: Fix recording of pointer arithmetic.
Mike Pall [Mon, 7 Feb 2011 22:42:51 +0000 (23:42 +0100)]
FFI: Fix recording of pointer arithmetic.

6 years agoAdd IR_XBAR, a barrier against XLOAD/XSTORE optimizations.
Mike Pall [Mon, 7 Feb 2011 20:59:25 +0000 (21:59 +0100)]
Add IR_XBAR, a barrier against XLOAD/XSTORE optimizations.

6 years agoImprove static assertion macro.
Mike Pall [Mon, 7 Feb 2011 20:44:01 +0000 (21:44 +0100)]
Improve static assertion macro.

6 years agoFFI: Allow cdata types for integer arguments of ffi.* functions.
Mike Pall [Mon, 7 Feb 2011 16:13:14 +0000 (17:13 +0100)]
FFI: Allow cdata types for integer arguments of ffi.* functions.

6 years agoFFI: Fix handling of enum arguments to C calls.
Mike Pall [Mon, 7 Feb 2011 15:41:51 +0000 (16:41 +0100)]
FFI: Fix handling of enum arguments to C calls.

6 years agoFFI: Perform stricter checks in ffi.cast(). Record ffi.cast().
Mike Pall [Sun, 6 Feb 2011 11:46:18 +0000 (12:46 +0100)]
FFI: Perform stricter checks in ffi.cast(). Record ffi.cast().

6 years agoFFI: Simplify and fix tonumber() for cdata objects.
Mike Pall [Sun, 6 Feb 2011 11:23:58 +0000 (12:23 +0100)]
FFI: Simplify and fix tonumber() for cdata objects.

6 years agoStrength-reduce 32 to 64 bit widening for XLOAD U8/U16 inputs.
Mike Pall [Sat, 5 Feb 2011 23:45:39 +0000 (00:45 +0100)]
Strength-reduce 32 to 64 bit widening for XLOAD U8/U16 inputs.

6 years agoFFI: Limit number of arguments for recorded calls.
Mike Pall [Sat, 5 Feb 2011 22:01:10 +0000 (23:01 +0100)]
FFI: Limit number of arguments for recorded calls.

6 years agoFFI: Record simple C function calls.
Mike Pall [Sat, 5 Feb 2011 20:50:15 +0000 (21:50 +0100)]
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.

6 years agoFFI: Optimize snapshots for cdata comparisons.
Mike Pall [Sat, 5 Feb 2011 17:54:08 +0000 (18:54 +0100)]
FFI: Optimize snapshots for cdata comparisons.

6 years agoFix metamethod comparisons triggered by BC_ISEQP/BC_ISNEP.
Mike Pall [Sat, 5 Feb 2011 15:32:08 +0000 (16:32 +0100)]
Fix metamethod comparisons triggered by BC_ISEQP/BC_ISNEP.

6 years agoFFI: Record C library namespace lookups.
Mike Pall [Sat, 5 Feb 2011 13:16:16 +0000 (14:16 +0100)]
FFI: Record C library namespace lookups.

6 years agoTreat metatables of special userdata objects as immutable.
Mike Pall [Sat, 5 Feb 2011 13:09:50 +0000 (14:09 +0100)]
Treat metatables of special userdata objects as immutable.

6 years agoFFI: Record ffi.string().
Mike Pall [Sat, 5 Feb 2011 00:05:56 +0000 (01:05 +0100)]
FFI: Record ffi.string().

6 years agoFFI: Avoid intermediate boxes for tonumber(), too.
Mike Pall [Sat, 5 Feb 2011 00:04:41 +0000 (01:04 +0100)]
FFI: Avoid intermediate boxes for tonumber(), too.

6 years agoFFI: Disable MUL => BSHL FOLD rule on 32 bit.
Mike Pall [Thu, 3 Feb 2011 19:10:13 +0000 (20:10 +0100)]
FFI: Disable MUL => BSHL FOLD rule on 32 bit.

6 years agoFFI: Rename IR_CNEWP to IR_CNEWI and use it to box 64 bit integers.
Mike Pall [Thu, 3 Feb 2011 03:13:51 +0000 (04:13 +0100)]
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.

6 years agoRename IR_POWI to IR_POW.
Mike Pall [Wed, 2 Feb 2011 20:33:11 +0000 (21:33 +0100)]
Rename IR_POWI to IR_POW.

6 years agoFFI: Add basic FOLD rules for 64 bit integer DIV, MOD and POWI.
Mike Pall [Wed, 2 Feb 2011 20:25:43 +0000 (21:25 +0100)]
FFI: Add basic FOLD rules for 64 bit integer DIV, MOD and POWI.

6 years agoFFI: Record 64 bit integer divide and modulo.
Mike Pall [Wed, 2 Feb 2011 19:53:10 +0000 (20:53 +0100)]
FFI: Record 64 bit integer divide and modulo.

6 years agoUse names defined in lualib.h for library registration.
Mike Pall [Wed, 2 Feb 2011 01:38:59 +0000 (02:38 +0100)]
Use names defined in lualib.h for library registration.

6 years agoFix OSX build to work with newer ld64 versions.
Mike Pall [Wed, 2 Feb 2011 01:31:59 +0000 (02:31 +0100)]
Fix OSX build to work with newer ld64 versions.

6 years agoAdd SPLIT pass to split 64 bit IR instructions for 32 bit CPUs.
Mike Pall [Wed, 2 Feb 2011 01:29:37 +0000 (02:29 +0100)]
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.

6 years agoAdd SSE3 CPU feature detection.
Mike Pall [Tue, 1 Feb 2011 18:28:03 +0000 (19:28 +0100)]
Add SSE3 CPU feature detection.

6 years agoFFI: Limit index range for complex numbers.
Mike Pall [Sat, 29 Jan 2011 18:47:37 +0000 (19:47 +0100)]
FFI: Limit index range for complex numbers.

6 years agoFFI: Implement POSIX/x64 struct-by-value calling conventions.
Mike Pall [Sat, 29 Jan 2011 12:04:16 +0000 (13:04 +0100)]
FFI: Implement POSIX/x64 struct-by-value calling conventions.

6 years agoFix 64 bit case of (SUB x x) and (BXOR x x) FOLD rules.
Mike Pall [Fri, 28 Jan 2011 01:17:35 +0000 (02:17 +0100)]
Fix 64 bit case of (SUB x x) and (BXOR x x) FOLD rules.

6 years agoFFI: Split up 64 bit x^k helper into signed/unsigned.
Mike Pall [Fri, 28 Jan 2011 01:15:30 +0000 (02:15 +0100)]
FFI: Split up 64 bit x^k helper into signed/unsigned.

6 years agoFFI: Fix various issues with C type table reallocations.
Mike Pall [Thu, 27 Jan 2011 15:28:24 +0000 (16:28 +0100)]
FFI: Fix various issues with C type table reallocations.

6 years agoFFI: Fix symbol name redirection.
Mike Pall [Thu, 27 Jan 2011 15:07:02 +0000 (16:07 +0100)]
FFI: Fix symbol name redirection.

6 years agoFFI: Move code for cdata arithmetic to lj_carith.c.
Mike Pall [Wed, 26 Jan 2011 20:46:02 +0000 (21:46 +0100)]
FFI: Move code for cdata arithmetic to lj_carith.c.

6 years agoFFI: Record cdata indexing with integer cdata.
Mike Pall [Wed, 26 Jan 2011 20:14:58 +0000 (21:14 +0100)]
FFI: Record cdata indexing with integer cdata.

6 years agoFFI: Allow cdata indexing with integer cdata.
Mike Pall [Wed, 26 Jan 2011 20:12:54 +0000 (21:12 +0100)]
FFI: Allow cdata indexing with integer cdata.

6 years agoFix comments for BC_ITERN.
Mike Pall [Wed, 26 Jan 2011 18:55:55 +0000 (19:55 +0100)]
Fix comments for BC_ITERN.

6 years agoFFI: Convert enum return value of C function to underlying type.
Mike Pall [Wed, 26 Jan 2011 13:18:12 +0000 (14:18 +0100)]
FFI: Convert enum return value of C function to underlying type.

6 years agoOne more fix for the trace flush logic. Sigh.
Mike Pall [Wed, 26 Jan 2011 01:34:30 +0000 (02:34 +0100)]
One more fix for the trace flush logic. Sigh.

6 years agoFFI: Add symbol name redirection.
Mike Pall [Wed, 26 Jan 2011 01:31:19 +0000 (02:31 +0100)]
FFI: Add symbol name redirection.

This works like the GCC extension, e.g.:
FILE *fopen(const char *fn, const char *mode) __asm__("" "fopen64");

6 years agoARM: Add ARM target architecture selection (disabled).
Mike Pall [Tue, 25 Jan 2011 17:50:24 +0000 (18:50 +0100)]
ARM: Add ARM target architecture selection (disabled).

6 years agoFFI: Don't force zero terminator on string to array conversion.
Mike Pall [Mon, 24 Jan 2011 14:51:33 +0000 (15:51 +0100)]
FFI: Don't force zero terminator on string to array conversion.

6 years agoClear bytecode penalty cache in jit.flush().
Mike Pall [Sun, 23 Jan 2011 18:06:19 +0000 (19:06 +0100)]
Clear bytecode penalty cache in jit.flush().

6 years agoFFI: Fix ffi.load() error message on Windows.
Mike Pall [Sun, 23 Jan 2011 13:28:01 +0000 (14:28 +0100)]
FFI: Fix ffi.load() error message on Windows.

6 years agoFFI: Simplify initializer rules. Clarify docs.
Mike Pall [Sun, 23 Jan 2011 13:23:21 +0000 (14:23 +0100)]
FFI: Simplify initializer rules. Clarify docs.

6 years agoAnother fix for the trace flush logic. I'll get this right someday.
Mike Pall [Sat, 22 Jan 2011 19:32:23 +0000 (20:32 +0100)]
Another fix for the trace flush logic. I'll get this right someday.

Thanks to David Manura.

6 years agoFFI: Add preliminary FFI documentation (still incomplete).
Mike Pall [Thu, 20 Jan 2011 21:14:17 +0000 (22:14 +0100)]
FFI: Add preliminary FFI documentation (still incomplete).

6 years agoPPC: Fix ipairs() for keys in the hash part.
Mike Pall [Thu, 20 Jan 2011 11:25:56 +0000 (12:25 +0100)]
PPC: Fix ipairs() for keys in the hash part.

6 years agoAdd compile-time option LUAJIT_ENABLE_CHECKHOOK. Disabled by default.
Mike Pall [Wed, 19 Jan 2011 01:05:37 +0000 (02:05 +0100)]
Add compile-time option LUAJIT_ENABLE_CHECKHOOK. Disabled by default.

This checks for asynchronously set hooks from compiled code.

6 years agoCombine i8/u8 XLOAD with BAND+comparison into test byte mrm, imm8.
Mike Pall [Wed, 19 Jan 2011 01:05:26 +0000 (02:05 +0100)]
Combine i8/u8 XLOAD with BAND+comparison into test byte mrm, imm8.

6 years agoAdd volatile XLOADs.
Mike Pall [Wed, 19 Jan 2011 01:05:12 +0000 (02:05 +0100)]
Add volatile XLOADs.

6 years agoDifferentiate between IR_KPTR and IR_KKPTR.
Mike Pall [Tue, 18 Jan 2011 23:40:03 +0000 (00:40 +0100)]
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.

6 years agoFix for the fix for the trace flush logic.
Mike Pall [Tue, 18 Jan 2011 21:17:27 +0000 (22:17 +0100)]
Fix for the fix for the trace flush logic.

6 years agoCleanup and fix trace flush logic.
Mike Pall [Tue, 18 Jan 2011 20:08:23 +0000 (21:08 +0100)]
Cleanup and fix trace flush logic.

6 years agoFFI: Record 64 bit integer comparisons and pointer comparisons.
Mike Pall [Mon, 17 Jan 2011 00:23:04 +0000 (01:23 +0100)]
FFI: Record 64 bit integer comparisons and pointer comparisons.

6 years agoFFI: Record conversions from bool ctype.
Mike Pall [Mon, 17 Jan 2011 00:21:57 +0000 (01:21 +0100)]
FFI: Record conversions from bool ctype.

6 years agoAdd trace recorder infrastructure for instruction post-processing.
Mike Pall [Mon, 17 Jan 2011 00:20:10 +0000 (01:20 +0100)]
Add trace recorder infrastructure for instruction post-processing.

6 years agoFFI: Don't swap operands for cdata __eq metamethod call.
Mike Pall [Mon, 17 Jan 2011 00:09:43 +0000 (01:09 +0100)]
FFI: Don't swap operands for cdata __eq metamethod call.

6 years agoFFI: Record conversions to bool ctype.
Mike Pall [Sun, 16 Jan 2011 18:42:53 +0000 (19:42 +0100)]
FFI: Record conversions to bool ctype.

6 years agoFix assertion.
Mike Pall [Sun, 16 Jan 2011 18:24:50 +0000 (19:24 +0100)]
Fix assertion.

6 years agoFFI: Allow indexing a struct constructor to get constants.
Mike Pall [Sun, 16 Jan 2011 17:32:33 +0000 (18:32 +0100)]
FFI: Allow indexing a struct constructor to get constants.

Specialize to the CTypeID held by a constructor in all cases.

6 years agoFFI: Record conversions from strings to enums or pointers.
Mike Pall [Thu, 13 Jan 2011 16:20:29 +0000 (17:20 +0100)]
FFI: Record conversions from strings to enums or pointers.

6 years agoAdd FOLD rule for CONV.num.u32 KINT.
Mike Pall [Thu, 13 Jan 2011 16:18:08 +0000 (17:18 +0100)]
Add FOLD rule for CONV.num.u32 KINT.

6 years agoFix recording of select() with multi-char string as 1st argument.
Mike Pall [Thu, 13 Jan 2011 16:16:22 +0000 (17:16 +0100)]
Fix recording of select() with multi-char string as 1st argument.

6 years agoFFI: Cleanup some type conversions.
Mike Pall [Thu, 13 Jan 2011 15:39:42 +0000 (16:39 +0100)]
FFI: Cleanup some type conversions.

Remove pointless conversions to booleans.
Allow assigning functions to function pointers.

6 years agoFFI: Add 64 bit integer comparisons and pointer comparisons.
Mike Pall [Thu, 13 Jan 2011 01:35:29 +0000 (02:35 +0100)]
FFI: Add 64 bit integer comparisons and pointer comparisons.

6 years agoFFI: Simplify logic for pointer arithmetic.
Mike Pall [Wed, 12 Jan 2011 20:34:11 +0000 (21:34 +0100)]
FFI: Simplify logic for pointer arithmetic.

6 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.

6 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.

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

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

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

6 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.

6 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.

6 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.

6 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.

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

6 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.

6 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.

6 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.

6 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.

6 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.

6 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.

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

6 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.