]>
git.ipfire.org Git - thirdparty/LuaJIT.git/log
Mike Pall [Sat, 30 Jan 2010 13:33:08 +0000 (14:33 +0100)]
Revise hardcoded inlining in lj_asm.c. Saves 1-2K.
Mike Pall [Sat, 30 Jan 2010 05:50:39 +0000 (06:50 +0100)]
Add support for weak IR references to register allocator.
Spilling a weak ref forces a spill slot, but omits the restore.
Spill slots for snapshot refs override the register, anyway.
Marking snapshot refs weak avoids pointless restores.
Mike Pall [Fri, 29 Jan 2010 14:07:40 +0000 (15:07 +0100)]
Loop formation test must check for return to lower frame.
Mike Pall [Fri, 29 Jan 2010 02:32:37 +0000 (03:32 +0100)]
Compile return to lower frame. Only for Lua frames right now.
Mike Pall [Thu, 28 Jan 2010 03:29:15 +0000 (04:29 +0100)]
Followup fix: set maxslot for continuation return.
Mike Pall [Thu, 28 Jan 2010 03:20:20 +0000 (04:20 +0100)]
Drop obsolete frame shrinking after continuation return.
Mike Pall [Thu, 28 Jan 2010 03:02:32 +0000 (04:02 +0100)]
Fix recording of metamethod result adjustment.
Mike Pall [Thu, 28 Jan 2010 01:30:12 +0000 (02:30 +0100)]
Don't modify jit_State and exit counters while in vmevent.
Fixes crash with hot loop in TEXIT callback which cleared J->parent.
Mike Pall [Thu, 28 Jan 2010 01:02:08 +0000 (02:02 +0100)]
Fix snapshot dumps.
Mike Pall [Wed, 27 Jan 2010 21:09:43 +0000 (22:09 +0100)]
Avoid reuse of PHI registers, even for duplicate right PHIs.
Mike Pall [Wed, 27 Jan 2010 19:06:03 +0000 (20:06 +0100)]
Expose compressed snapshot map to reflection API.
Update jit.dump module and restore printing of frame separators.
Mike Pall [Wed, 27 Jan 2010 02:50:29 +0000 (03:50 +0100)]
Eliminate IR_FRAME. Replace with KGC and TRef/SnapEntry flags.
Mike Pall [Wed, 27 Jan 2010 01:17:56 +0000 (02:17 +0100)]
Add frame and continuation flags to TRef and SnapEntry.
Mike Pall [Wed, 27 Jan 2010 00:57:15 +0000 (01:57 +0100)]
Add missing check for return to lower frame.
Mike Pall [Tue, 26 Jan 2010 23:39:22 +0000 (00:39 +0100)]
Cleanup types for narrowing stack machine.
Mike Pall [Tue, 26 Jan 2010 20:49:04 +0000 (21:49 +0100)]
Compress snapshots using a simple, extensible 1D-compression.
Typically reduces storage overhead for snapshot maps by 60%.
The extensible format is a prerequisite for the next redesign steps:
Eliminate IR_FRAME and implement return-to-lower-frame.
Mike Pall [Tue, 26 Jan 2010 01:56:00 +0000 (02:56 +0100)]
Add missing eviction in asm_obar().
Mike Pall [Mon, 25 Jan 2010 23:45:30 +0000 (00:45 +0100)]
Fill gaps in frames (caused by metamethod calls) with nil.
Simplifies storing snapshots to stack.
Mike Pall [Mon, 25 Jan 2010 18:51:52 +0000 (19:51 +0100)]
Use dedicated type for snapshot map entry.
Preparatory work for compressed snapshots.
Mike Pall [Sun, 24 Jan 2010 14:50:59 +0000 (15:50 +0100)]
Force error if lua_newstate() is used in 64 bit mode.
Mike Pall [Fri, 22 Jan 2010 00:56:49 +0000 (01:56 +0100)]
Integrate MinGW build with DWARF2 exception handling.
Only works with DWARF2-enabled GCC 4.x (not the default MinGW GCC).
Fix fastcall symbol names for COFF assembler output.
Add DWARF2 unwind info to COFF assembler output.
Use COFF assembler mode for MinGW builds.
Always enable the DWARF2 handler if compiled with GCC.
Mike Pall [Thu, 21 Jan 2010 18:42:51 +0000 (19:42 +0100)]
Fix undefined behavior in table resizing calculation.
Mike Pall [Thu, 21 Jan 2010 14:29:23 +0000 (15:29 +0100)]
Fix ordered string comparisons. Unsigned arithmetic is evil.
Mike Pall [Wed, 20 Jan 2010 11:24:56 +0000 (12:24 +0100)]
Update docs about exception handling.
Mike Pall [Tue, 19 Jan 2010 15:58:26 +0000 (16:58 +0100)]
Decouple guard vs. INT check vs. TYPECHECK semantics for SLOAD.
Mike Pall [Tue, 19 Jan 2010 00:45:39 +0000 (01:45 +0100)]
Fix broken intarith + testop optimization.
Mike Pall [Mon, 18 Jan 2010 00:32:33 +0000 (01:32 +0100)]
Add some sanity checks for allocator in 64 bit mode.
Mike Pall [Sun, 17 Jan 2010 23:42:34 +0000 (00:42 +0100)]
Reduce non-numeric tag range by bumping up 64 bit lightud tag.
Mike Pall [Sun, 17 Jan 2010 21:02:13 +0000 (22:02 +0100)]
Update docs with x64 build instructions.
Mike Pall [Sun, 17 Jan 2010 19:47:10 +0000 (20:47 +0100)]
Fix more 64 bit conversion warnings.
Mike Pall [Sun, 17 Jan 2010 19:36:04 +0000 (20:36 +0100)]
Silence 64 bit conversion warning.
Mike Pall [Sun, 17 Jan 2010 19:33:13 +0000 (20:33 +0100)]
Enable build for x64 interpreter on WIN64.
To build the x64 interpreter open a "Windows SDK Command Shell".
Then set the compiler environment: setenv /release /x64
Then cd to the src directory and run msvcbuild.bat.
Mike Pall [Sun, 17 Jan 2010 19:20:43 +0000 (20:20 +0100)]
Allocate 32 bit memory on WIN64 using NtAllocateVirtualMemory.
Mike Pall [Sun, 17 Jan 2010 18:58:31 +0000 (19:58 +0100)]
Fix off-by-one error in x64 PE object symbol mangling.
Mike Pall [Sat, 16 Jan 2010 01:04:12 +0000 (02:04 +0100)]
Error for blacklisted loop bytecodes has no info argument.
Mike Pall [Thu, 14 Jan 2010 11:28:16 +0000 (12:28 +0100)]
Add build infrastructure for x64 interpreter.
Must be explicitly enabled with: make clean && make "CC=gcc -m64"
Only works on Linux/x64. Does not work on WIN64 or OSX/x64 (yet).
Mike Pall [Thu, 14 Jan 2010 11:08:32 +0000 (12:08 +0100)]
Shorten %p format for pure 32 bit pointers on x64.
Mike Pall [Sun, 10 Jan 2010 08:39:05 +0000 (09:39 +0100)]
Strip '@' suffix from external symbols for MACH-O, too.
Fixes OSX build.
Mike Pall [Sat, 9 Jan 2010 22:59:43 +0000 (23:59 +0100)]
Improve alias analysis of upvalues using a disambiguation hash value.
All upvalue objects hold a disambiguation hash value now.
It's built from the parent prototype and the slot number.
Different hash values imply the upvalues cannot alias.
Same hash values don't imply anything (collision or different closures).
Upvalue disambiguation makes use of a reduced hash due to IR contraints.
Mike Pall [Sat, 9 Jan 2010 21:41:08 +0000 (22:41 +0100)]
Avoid int16_t widening for pt->uv elements.
Mike Pall [Sat, 9 Jan 2010 20:11:35 +0000 (21:11 +0100)]
Fix 32/64 bit portability issue with upval->v.
Mike Pall [Sat, 9 Jan 2010 20:10:22 +0000 (21:10 +0100)]
Fix x64 PE object emitter.
Mike Pall [Sat, 9 Jan 2010 13:28:11 +0000 (14:28 +0100)]
Bump all copyright dates to 2010.
Mike Pall [Tue, 5 Jan 2010 21:39:46 +0000 (22:39 +0100)]
Add support for WIN64 exception handling to external unwinder.
Modify unwinding to always return _ff or _c unwind type.
Generate PE object .pdata/.xdata sections for x64 interpreter.
Can drop r12-r15 saves in Windows/x64 interpreter now.
Mike Pall [Tue, 5 Jan 2010 21:13:20 +0000 (22:13 +0100)]
Fix PE object build for fastcall entry points into interpreter.
Mike Pall [Tue, 5 Jan 2010 21:07:54 +0000 (22:07 +0100)]
Allow @ in DynASM globals.
Mike Pall [Sat, 2 Jan 2010 16:42:11 +0000 (17:42 +0100)]
Major rewrite of error handling to allow external/internal unwinding.
Make external unwinding the default on x64.
It's mandatory on WIN64 due to the abundance of callee-saved regs.
Allow piecewise internal frame unwinding and optional cleanup.
Store ERRMEM, ERRERR and ERRCPP early and copy down later.
Use FRAME_CP for lj_vm_resume.
Add lj_vm_unwind_*_eh variants as landing pads for external unwinder.
Use fastcall for lj_vm_unwind_*.
Can drop r12/r13 saves in POSIX/x64 interpreter now.
Mike Pall [Wed, 30 Dec 2009 01:38:40 +0000 (02:38 +0100)]
Rename NRESULTS to MULTRES on the assembler side, too.
Mike Pall [Wed, 30 Dec 2009 01:37:57 +0000 (02:37 +0100)]
Implement yield from C hooks.
Get number of multiple results from C frame.
Add lj_cont_hook: restores multres and dispatch to static ins.
Can use fastcall for lj_dispatch_ins() now.
Mike Pall [Tue, 29 Dec 2009 19:19:54 +0000 (20:19 +0100)]
Fix narrowing casts of pointer differences for x64.
Mike Pall [Tue, 29 Dec 2009 19:16:29 +0000 (20:16 +0100)]
Minor fixes for x64 interpreter.
Mike Pall [Tue, 29 Dec 2009 19:13:34 +0000 (20:13 +0100)]
Fix PE object build on x64 and with disabled interpreter.
Mike Pall [Tue, 29 Dec 2009 04:25:24 +0000 (05:25 +0100)]
Add DWARF2 unwind info for x64 interpreter.
Mike Pall [Tue, 29 Dec 2009 03:36:35 +0000 (04:36 +0100)]
Fix alloc/free sizes of internal GCRef arrays.
Mike Pall [Tue, 29 Dec 2009 02:03:09 +0000 (03:03 +0100)]
Fix various 32/64 bit issues in interpreter.
Mike Pall [Tue, 29 Dec 2009 01:34:15 +0000 (02:34 +0100)]
Fix bad stack setup in collectgarbage().
Mike Pall [Tue, 29 Dec 2009 01:16:52 +0000 (02:16 +0100)]
Fix x64 lj_vm_pow_sse().
Mike Pall [Tue, 29 Dec 2009 01:04:20 +0000 (02:04 +0100)]
Save all callee-saved x64 integer regs for unwinding.
Temporary measure. Does not cover xmm saves on WIN64.
May have to use unwind info or waste another 160 bytes per CFRAME.
Mike Pall [Tue, 29 Dec 2009 00:38:26 +0000 (01:38 +0100)]
Logical 'not' must be sign-extended for address operands.
Mike Pall [Mon, 28 Dec 2009 22:45:32 +0000 (23:45 +0100)]
Define CFRAME structure for x64 interpreter.
Mike Pall [Mon, 28 Dec 2009 22:33:10 +0000 (23:33 +0100)]
Linux/x64 mremap() does not obey MAP_32BIT, so make it non-moving.
Mike Pall [Mon, 28 Dec 2009 21:15:00 +0000 (22:15 +0100)]
Fix size calculation for closure structs.
Mike Pall [Mon, 28 Dec 2009 20:32:15 +0000 (21:32 +0100)]
Fix POSIX/x64 call argument order.
Mike Pall [Mon, 28 Dec 2009 20:18:44 +0000 (21:18 +0100)]
Change callee-save regs for x64 interpreter to shorten code.
Mike Pall [Mon, 28 Dec 2009 20:00:03 +0000 (21:00 +0100)]
Fix DynASM x64 encoding for qword-only instructions.
Mike Pall [Mon, 28 Dec 2009 19:05:31 +0000 (20:05 +0100)]
Final calling convention cleanup for x64 interpreter.
Mike Pall [Sun, 27 Dec 2009 17:44:12 +0000 (18:44 +0100)]
More calling convention cleanups for x64 interpreter.
Mike Pall [Sun, 27 Dec 2009 17:25:01 +0000 (18:25 +0100)]
Ignore lea operand size in DynASM x86/x64.
Mike Pall [Sun, 27 Dec 2009 16:42:41 +0000 (17:42 +0100)]
Use fastcall for remaining 1-arg/2-arg calls from interpreter.
Simplifies conversion to x64 calling conventions.
Mike Pall [Fri, 25 Dec 2009 22:12:30 +0000 (23:12 +0100)]
Add SSE variant of pow/powi to interpreter.
Use SSE pow/powi helper functions from compiled code.
Cleanup use of helper functions.
Related cleanups of folding functions in x64 interpreter.
Mike Pall [Tue, 22 Dec 2009 19:27:20 +0000 (20:27 +0100)]
Add build infrastructure for the SSE2-enabled interpreter.
Works on x86 now. Will be enabled by default on x64 (not ready, yet).
Mike Pall [Tue, 22 Dec 2009 05:23:22 +0000 (06:23 +0100)]
Fix last commit.
Mike Pall [Tue, 22 Dec 2009 05:16:29 +0000 (06:16 +0100)]
Miscellaneous cleanups for x64 interpreter.
Mike Pall [Tue, 22 Dec 2009 04:40:49 +0000 (05:40 +0100)]
Use SSE variants for IRFPM_FLOOR/CEIL/TRUNC unless SSE4.1 available.
Mike Pall [Tue, 22 Dec 2009 04:04:21 +0000 (05:04 +0100)]
Add SSE2 variants for all FP ops (except vm_pow*) in interpreter.
Mike Pall [Mon, 21 Dec 2009 19:11:02 +0000 (20:11 +0100)]
Add SSE2 variants of basic arithmetic ops in interpreter.
Mike Pall [Mon, 21 Dec 2009 15:41:03 +0000 (16:41 +0100)]
Fix memory operand sizes for some SSE ops in DynASM.
Mike Pall [Sun, 20 Dec 2009 17:41:55 +0000 (18:41 +0100)]
Properly compile on Debian kFreeBSD.
Mike Pall [Sat, 19 Dec 2009 16:25:54 +0000 (17:25 +0100)]
Adapt most outbound calls in interpreter to x64 calling conventions.
Mike Pall [Thu, 17 Dec 2009 21:20:31 +0000 (22:20 +0100)]
Better change the saved regs for the x64 interpreter, too.
Mike Pall [Thu, 17 Dec 2009 21:14:24 +0000 (22:14 +0100)]
Change KBASE/PC regs for x64/POSIX to get shorter encodings.
Mike Pall [Thu, 17 Dec 2009 21:08:20 +0000 (22:08 +0100)]
Adapt primary inbound calls in x64 interpreter.
Change argument order for lj_vm_cpcall() to simplify x64 interpreter.
Mike Pall [Thu, 17 Dec 2009 21:03:33 +0000 (22:03 +0100)]
Allow quadword lea for DynASM x64.
Mike Pall [Wed, 16 Dec 2009 21:31:15 +0000 (22:31 +0100)]
Cleanup DynASM action list flushes.
Mike Pall [Wed, 16 Dec 2009 20:58:15 +0000 (21:58 +0100)]
Fix handling of byte-addressable registers in DynASM x64.
Mike Pall [Wed, 16 Dec 2009 04:47:52 +0000 (05:47 +0100)]
Add support for rip-relative displacements to DynASM x64.
Mike Pall [Wed, 16 Dec 2009 03:37:30 +0000 (04:37 +0100)]
Change some misuses of esp in x64 interpreter.
Mike Pall [Wed, 16 Dec 2009 03:34:54 +0000 (04:34 +0100)]
Warn about use of esp with DynASM x64.
Mike Pall [Wed, 16 Dec 2009 00:29:07 +0000 (01:29 +0100)]
Define x64 interpreter frame and cleanup use of stack temps.
Mike Pall [Tue, 15 Dec 2009 20:36:42 +0000 (21:36 +0100)]
Unify interpreter reg saves/restores for WIN64 prolog/epilog req.
Mike Pall [Tue, 15 Dec 2009 04:40:44 +0000 (05:40 +0100)]
First bunch of register definitions for x64 interpreter.
Mike Pall [Tue, 15 Dec 2009 03:45:34 +0000 (04:45 +0100)]
Allow 32 bit regs for indexing even for DynASM x64.
Mike Pall [Tue, 15 Dec 2009 03:29:22 +0000 (04:29 +0100)]
Make DynASM conditionals available before .arch statement.
Mike Pall [Tue, 15 Dec 2009 03:22:42 +0000 (04:22 +0100)]
Add usage message for mov64 to DynASM x64.
Mike Pall [Mon, 14 Dec 2009 01:28:22 +0000 (02:28 +0100)]
Fix off-by-one error in err_chunkid().
Mike Pall [Sun, 13 Dec 2009 18:11:11 +0000 (19:11 +0100)]
Add support for 64 bit immediates/displacements to DynASM x64.
Mike Pall [Thu, 10 Dec 2009 11:52:32 +0000 (12:52 +0100)]
Pick unused X char to force REX.W in DynASM x64.
Mike Pall [Thu, 10 Dec 2009 04:59:42 +0000 (05:59 +0100)]
Add 64 bit instruction templates to DynASM x64 and fix REX encoding.
Mike Pall [Thu, 10 Dec 2009 04:55:24 +0000 (05:55 +0100)]
Show memory operand size in cvtsi2sd/cvtsi2ss disassembly.
Mike Pall [Thu, 10 Dec 2009 03:01:57 +0000 (04:01 +0100)]
Add REX encoding to DynASM x64.