]> git.ipfire.org Git - thirdparty/LuaJIT.git/log
thirdparty/LuaJIT.git
18 months agoMerge branch 'master' into v2.1
Mike Pall [Tue, 23 Jan 2024 18:01:46 +0000 (19:01 +0100)] 
Merge branch 'master' into v2.1

18 months agoFix unsinking of IR_FSTORE for NULL metatable.
Mike Pall [Tue, 23 Jan 2024 17:58:52 +0000 (18:58 +0100)] 
Fix unsinking of IR_FSTORE for NULL metatable.

Reported by pwnhacker0x18. #1147

18 months agoDynASM/x86: Add endbr instruction.
Mike Pall [Mon, 22 Jan 2024 18:17:45 +0000 (19:17 +0100)] 
DynASM/x86: Add endbr instruction.

Thanks to Dmitry Stogov. #1143 #1142

18 months agoMIPS64 R2/R6: Fix FP to integer conversions.
Mike Pall [Mon, 22 Jan 2024 18:12:13 +0000 (19:12 +0100)] 
MIPS64 R2/R6: Fix FP to integer conversions.

Thanks to Peter Cawley. #1146

18 months agoAdd cross-32/64 bit and deterministic bytecode generation.
Mike Pall [Mon, 22 Jan 2024 18:06:36 +0000 (19:06 +0100)] 
Add cross-32/64 bit and deterministic bytecode generation.

Contributed by Peter Cawley. #993 #1008

19 months agoDynASM/x86: Allow [&expr] operand.
Mike Pall [Sat, 23 Dec 2023 19:06:17 +0000 (20:06 +0100)] 
DynASM/x86: Allow [&expr] operand.

Thanks to Dmitry Stogov. #1138

19 months agoMerge branch 'master' into v2.1
Mike Pall [Sat, 23 Dec 2023 18:49:43 +0000 (19:49 +0100)] 
Merge branch 'master' into v2.1

19 months agoCheck for IR_HREF vs. IR_HREFK aliasing in non-nil store check.
Mike Pall [Sat, 23 Dec 2023 18:43:03 +0000 (19:43 +0100)] 
Check for IR_HREF vs. IR_HREFK aliasing in non-nil store check.

Thanks to Peter Cawley. #1133

19 months agoMerge branch 'master' into v2.1
Mike Pall [Sat, 23 Dec 2023 18:23:12 +0000 (19:23 +0100)] 
Merge branch 'master' into v2.1

19 months agoRespect jit.off() on pending trace exit.
Mike Pall [Sat, 23 Dec 2023 18:22:34 +0000 (19:22 +0100)] 
Respect jit.off() on pending trace exit.

Thanks to Sergey Kaplun. #1134

19 months agoMerge branch 'master' into v2.1
Mike Pall [Sat, 23 Dec 2023 18:15:57 +0000 (19:15 +0100)] 
Merge branch 'master' into v2.1

19 months agoSimplify handling of instable types in TNEW/TDUP load forwarding.
Mike Pall [Sat, 23 Dec 2023 18:14:32 +0000 (19:14 +0100)] 
Simplify handling of instable types in TNEW/TDUP load forwarding.

Thanks to Peter Cawley. #994

20 months agoMerge branch 'master' into v2.1
Mike Pall [Mon, 11 Dec 2023 12:04:43 +0000 (13:04 +0100)] 
Merge branch 'master' into v2.1

20 months agoOnly emit proper parent references in snapshot replay.
Mike Pall [Mon, 11 Dec 2023 12:01:36 +0000 (13:01 +0100)] 
Only emit proper parent references in snapshot replay.

Thanks to Peter Cawley. #1132

20 months agoFix anchoring for string buffer set() method (again).
Mike Pall [Sun, 10 Dec 2023 18:42:22 +0000 (19:42 +0100)] 
Fix anchoring for string buffer set() method (again).

Thanks to Peter Cawley. #1125

20 months agoMerge branch 'master' into v2.1
Mike Pall [Sun, 10 Dec 2023 15:13:34 +0000 (16:13 +0100)] 
Merge branch 'master' into v2.1

20 months agoARM: Fix stack restore for FP slots.
Mike Pall [Sun, 10 Dec 2023 15:10:48 +0000 (16:10 +0100)] 
ARM: Fix stack restore for FP slots.

Thanks to Peter Cawley. #1131

20 months agoMerge branch 'master' into v2.1
Mike Pall [Sun, 10 Dec 2023 14:50:14 +0000 (15:50 +0100)] 
Merge branch 'master' into v2.1

20 months agoDocument workaround for multilib vs. cross-compiler conflict.
Mike Pall [Sun, 10 Dec 2023 14:45:10 +0000 (15:45 +0100)] 
Document workaround for multilib vs. cross-compiler conflict.

Reported by igorpupkinable. #1126

20 months agoFix anchoring for string buffer set() method.
Mike Pall [Sun, 10 Dec 2023 14:33:47 +0000 (15:33 +0100)] 
Fix anchoring for string buffer set() method.

Thanks to Peter Cawley. #1125

20 months agoMerge branch 'master' into v2.1
Mike Pall [Sun, 10 Dec 2023 14:02:26 +0000 (15:02 +0100)] 
Merge branch 'master' into v2.1

20 months agoFix runtime library flags for MSVC debug builds.
Mike Pall [Sun, 10 Dec 2023 14:00:52 +0000 (15:00 +0100)] 
Fix runtime library flags for MSVC debug builds.

Reported by igor725. #1127

20 months agoMerge branch 'master' into v2.1
Mike Pall [Sun, 10 Dec 2023 13:50:29 +0000 (14:50 +0100)] 
Merge branch 'master' into v2.1

20 months agoFix .debug_abbrev section in GDB JIT API.
Mike Pall [Sun, 10 Dec 2023 13:48:34 +0000 (14:48 +0100)] 
Fix .debug_abbrev section in GDB JIT API.

Thanks to Dmitry Stogov. #1129

20 months agoOptimize table.new() with constant args to (sinkable) IR_TNEW.
Mike Pall [Sun, 10 Dec 2023 13:41:56 +0000 (14:41 +0100)] 
Optimize table.new() with constant args to (sinkable) IR_TNEW.

Thanks to Peter Cawley. #1128

20 months agoMerge branch 'master' into v2.1
Mike Pall [Sun, 10 Dec 2023 13:33:48 +0000 (14:33 +0100)] 
Merge branch 'master' into v2.1

20 months agoEmit sunk IR_NEWREF only once per key on snapshot replay.
Mike Pall [Sun, 10 Dec 2023 13:29:45 +0000 (14:29 +0100)] 
Emit sunk IR_NEWREF only once per key on snapshot replay.

Thanks to Sergey Kaplun and Peter Cawley. #1128

21 months agoFix last commit.
Mike Pall [Wed, 15 Nov 2023 00:41:31 +0000 (01:41 +0100)] 
Fix last commit.

21 months agoMerge branch 'master' into v2.1
Mike Pall [Tue, 14 Nov 2023 21:56:09 +0000 (22:56 +0100)] 
Merge branch 'master' into v2.1

21 months agox86/x64: Don't fuse loads across IR_NEWREF.
Mike Pall [Tue, 14 Nov 2023 21:50:21 +0000 (22:50 +0100)] 
x86/x64: Don't fuse loads across IR_NEWREF.

Reported by Peter Cawley. #1117

21 months agoImprove last commit.
Mike Pall [Sun, 12 Nov 2023 15:11:11 +0000 (16:11 +0100)] 
Improve last commit.

21 months agox86/x64: Don't fuse loads across table.clear.
Mike Pall [Sun, 12 Nov 2023 14:41:52 +0000 (15:41 +0100)] 
x86/x64: Don't fuse loads across table.clear.

Reported by Peter Cawley. #1117

21 months agoMerge branch 'master' into v2.1
Mike Pall [Sun, 12 Nov 2023 14:25:14 +0000 (15:25 +0100)] 
Merge branch 'master' into v2.1

21 months agox86/x64: Add more red zone checks to assembler backend.
Mike Pall [Sun, 12 Nov 2023 14:18:44 +0000 (15:18 +0100)] 
x86/x64: Add more red zone checks to assembler backend.

Thanks to Peter Cawley. #1116

21 months agoMerge branch 'master' into v2.1
Mike Pall [Sun, 12 Nov 2023 14:11:29 +0000 (15:11 +0100)] 
Merge branch 'master' into v2.1

21 months agoAdd stack check to pcall/xpcall.
Mike Pall [Sun, 12 Nov 2023 13:42:24 +0000 (14:42 +0100)] 
Add stack check to pcall/xpcall.

Analyzed by Peter Cawley. #1048

21 months agoMerge branch 'master' into v2.1
Mike Pall [Thu, 9 Nov 2023 10:05:27 +0000 (11:05 +0100)] 
Merge branch 'master' into v2.1

21 months agoInvalidate SCEV entry when returning to lower frame.
Mike Pall [Thu, 9 Nov 2023 10:02:36 +0000 (11:02 +0100)] 
Invalidate SCEV entry when returning to lower frame.

Thanks to Zhongwei Yao. #1115

21 months agoMerge branch 'master' into v2.1
Mike Pall [Tue, 7 Nov 2023 21:28:53 +0000 (22:28 +0100)] 
Merge branch 'master' into v2.1

21 months agoFFI: Fix pragma push stack limit check and throw on overflow.
Mike Pall [Tue, 7 Nov 2023 21:25:42 +0000 (22:25 +0100)] 
FFI: Fix pragma push stack limit check and throw on overflow.

Reported by Sergey Kaplun. #1114

21 months agoARM64: Fix disassembly of ldp/stp offsets.
Mike Pall [Mon, 6 Nov 2023 22:14:22 +0000 (23:14 +0100)] 
ARM64: Fix disassembly of ldp/stp offsets.

Thanks to Peter Cawley. #1113

21 months agoCheck for upvalue state transition in IR_UREFO.
Mike Pall [Sun, 5 Nov 2023 15:34:46 +0000 (16:34 +0100)] 
Check for upvalue state transition in IR_UREFO.

Thanks to Peter Cawley. #1085

21 months agoMerge branch 'master' into v2.1
Mike Pall [Sun, 5 Nov 2023 10:37:57 +0000 (11:37 +0100)] 
Merge branch 'master' into v2.1

21 months agox64: Properly fix __call metamethod return dispatch.
Mike Pall [Sun, 5 Nov 2023 10:31:08 +0000 (11:31 +0100)] 
x64: Properly fix __call metamethod return dispatch.

Reported by Sergey Kaplun. #1110

21 months agoWindows/x86: _BitScan*64 are only available on 64 bit archs.
Mike Pall [Sun, 5 Nov 2023 10:27:35 +0000 (11:27 +0100)] 
Windows/x86: _BitScan*64 are only available on 64 bit archs.

Reported by memcorrupt. #1109

21 months agoAdd 'cc' file type for saving bytecode.
Mike Pall [Sat, 21 Oct 2023 11:31:45 +0000 (13:31 +0200)] 
Add 'cc' file type for saving bytecode.

Contributed by Sergey Bronnikov. #1105

21 months agoFFI/Windows: Fix type declaration for int64_t and uint64_t.
Mike Pall [Sat, 21 Oct 2023 11:18:51 +0000 (13:18 +0200)] 
FFI/Windows: Fix type declaration for int64_t and uint64_t.

Thanks to Peter Cawley. #1106

21 months agoMerge branch 'master' into v2.1
Mike Pall [Sat, 21 Oct 2023 11:13:34 +0000 (13:13 +0200)] 
Merge branch 'master' into v2.1

21 months agoFFI: Fix dangling reference to CType in carith_checkarg().
Mike Pall [Sat, 21 Oct 2023 11:11:50 +0000 (13:11 +0200)] 
FFI: Fix dangling reference to CType in carith_checkarg().

Reported by Sergey Kaplun. #1108

22 months agoDynASM/ARM64: Support ldp/stp of q registers.
Mike Pall [Sun, 8 Oct 2023 20:12:01 +0000 (22:12 +0200)] 
DynASM/ARM64: Support ldp/stp of q registers.

Thanks to Peter Cawley. #1096

22 months agoARM64: Use ADR and ADRP to form constants.
Mike Pall [Sun, 8 Oct 2023 20:10:02 +0000 (22:10 +0200)] 
ARM64: Use ADR and ADRP to form constants.

Thanks to Peter Cawley. #1100

22 months agoARM64: Fix disassembly of U12 loads.
Mike Pall [Sun, 8 Oct 2023 19:57:04 +0000 (21:57 +0200)] 
ARM64: Fix disassembly of U12 loads.

Thanks to Peter Cawley. #1100

22 months agoARM64: Unify constant register handling in interpreter.
Mike Pall [Sun, 8 Oct 2023 19:39:40 +0000 (21:39 +0200)] 
ARM64: Unify constant register handling in interpreter.

Plus minor optimizations. Simplifications for out-of-tree ARM64EC.
Thanks to Peter Cawley. #1096

22 months agoARM: Fix register hint for FFI calls with FP results.
Mike Pall [Sun, 8 Oct 2023 19:22:50 +0000 (21:22 +0200)] 
ARM: Fix register hint for FFI calls with FP results.

22 months agoARM64: Fix register hint for FFI calls with FP results.
Mike Pall [Sun, 8 Oct 2023 19:20:10 +0000 (21:20 +0200)] 
ARM64: Fix register hint for FFI calls with FP results.

Thanks to Peter Cawley. #1096

22 months agoARM64: Restore fp before sp in C stack unwinders.
Mike Pall [Sun, 8 Oct 2023 19:17:43 +0000 (21:17 +0200)] 
ARM64: Restore fp before sp in C stack unwinders.

Thanks to Peter Cawley. #1096

22 months agoFFI: Fix ffi.abi("pauth").
Mike Pall [Mon, 25 Sep 2023 14:56:17 +0000 (16:56 +0200)] 
FFI: Fix ffi.abi("pauth").

Thanks to Peter Cawley. #1098

22 months agoMerge branch 'master' into v2.1
Mike Pall [Fri, 22 Sep 2023 19:07:20 +0000 (21:07 +0200)] 
Merge branch 'master' into v2.1

22 months agoMaintain chain invariant in DCE.
Mike Pall [Fri, 22 Sep 2023 19:04:22 +0000 (21:04 +0200)] 
Maintain chain invariant in DCE.

Thanks to Peter Cawley. #1094

22 months agoLJ_FR2: Fix stack checks in vararg calls.
Mike Pall [Thu, 21 Sep 2023 03:19:55 +0000 (05:19 +0200)] 
LJ_FR2: Fix stack checks in vararg calls.

Thanks to Peter Cawley. #1048

22 months agoMerge branch 'master' into v2.1
Mike Pall [Thu, 21 Sep 2023 02:44:37 +0000 (04:44 +0200)] 
Merge branch 'master' into v2.1

22 months agoFollow-up fix for stack overflow handling cleanup.
Mike Pall [Thu, 21 Sep 2023 02:43:40 +0000 (04:43 +0200)] 
Follow-up fix for stack overflow handling cleanup.

22 months agoHandle OOM error on stack resize in coroutine.resume and lua_checkstack.
Mike Pall [Thu, 21 Sep 2023 02:40:48 +0000 (04:40 +0200)] 
Handle OOM error on stack resize in coroutine.resume and lua_checkstack.

Thanks to Peter Cawley. #1066

22 months agoRestore cur_L for specific Lua/C API use case.
Mike Pall [Thu, 21 Sep 2023 01:54:08 +0000 (03:54 +0200)] 
Restore cur_L for specific Lua/C API use case.

Thanks to Peter Cawley. #1066

22 months agoConsistently use 64 bit constants for 64 bit IR instructions.
Mike Pall [Thu, 21 Sep 2023 01:46:33 +0000 (03:46 +0200)] 
Consistently use 64 bit constants for 64 bit IR instructions.

Thanks to Peter Cawley. #1084

22 months agoARM64: Fix IR_HREF code generation for constant FP keys.
Mike Pall [Thu, 21 Sep 2023 00:48:12 +0000 (02:48 +0200)] 
ARM64: Fix IR_HREF code generation for constant FP keys.

Reported by swarn. Fix for 435d8c63 by Peter Cawley. #1090

22 months agoARM64: Fuse negative 32 bit constants into arithmetic ops again.
Mike Pall [Thu, 21 Sep 2023 00:38:29 +0000 (02:38 +0200)] 
ARM64: Fuse negative 32 bit constants into arithmetic ops again.

Thanks to Peter Cawley. #1065

22 months agoMerge branch 'master' into v2.1
Mike Pall [Thu, 21 Sep 2023 00:23:25 +0000 (02:23 +0200)] 
Merge branch 'master' into v2.1

22 months agoHandle all stack layouts in (delayed) TRACE vmevent.
Mike Pall [Thu, 21 Sep 2023 00:15:16 +0000 (02:15 +0200)] 
Handle all stack layouts in (delayed) TRACE vmevent.

Thanks to Sergey Bronnikov and Peter Cawley. #1087

22 months agoAdd missing coercion when recording select(string, ...)
Mike Pall [Thu, 21 Sep 2023 00:10:18 +0000 (02:10 +0200)] 
Add missing coercion when recording select(string, ...)

Thanks to Peter Cawley. #1083

22 months agoCleanup stack overflow handling.
Mike Pall [Wed, 20 Sep 2023 23:58:43 +0000 (01:58 +0200)] 
Cleanup stack overflow handling.

Reported by Peter Cawley. #962

22 months agoWindows/ARM64: Add MSVC cross-build support for x64 to ARM64.
Mike Pall [Sun, 17 Sep 2023 08:44:04 +0000 (10:44 +0200)] 
Windows/ARM64: Add MSVC cross-build support for x64 to ARM64.

Thanks to invertego. #1081

22 months agoIR_MIN/IR_MAX is non-commutative due to underlying FPU ops.
Mike Pall [Sun, 17 Sep 2023 08:31:00 +0000 (10:31 +0200)] 
IR_MIN/IR_MAX is non-commutative due to underlying FPU ops.

Thanks to Peter Cawley. #1082

22 months agoARM64: Set fixed interpreter registers before rethrow.
Mike Pall [Sun, 17 Sep 2023 08:09:58 +0000 (10:09 +0200)] 
ARM64: Set fixed interpreter registers before rethrow.

Thanks to Peter Cawley. #593

23 months agoWindows/ARM64: Update install docs.
Mike Pall [Fri, 15 Sep 2023 04:10:58 +0000 (06:10 +0200)] 
Windows/ARM64: Update install docs.

23 months agoWindows: Call C++ destructors without compiling with /EHa.
Mike Pall [Fri, 15 Sep 2023 03:47:29 +0000 (05:47 +0200)] 
Windows: Call C++ destructors without compiling with /EHa.

Thanks to Peter Cawley. #593

23 months agoWindows: Pass scratch CONTEXT record to RtlUnwindEx.
Mike Pall [Fri, 15 Sep 2023 03:31:26 +0000 (05:31 +0200)] 
Windows: Pass scratch CONTEXT record to RtlUnwindEx.

Thanks to Peter Cawley. #593

23 months agoARM64: External unwinder already restores non-volatile registers.
Mike Pall [Fri, 15 Sep 2023 03:27:29 +0000 (05:27 +0200)] 
ARM64: External unwinder already restores non-volatile registers.

Thanks to Peter Cawley. #593

23 months agoWindows/ARM64: Fix exception unwinding (again).
Mike Pall [Fri, 15 Sep 2023 03:23:29 +0000 (05:23 +0200)] 
Windows/ARM64: Fix exception unwinding (again).

Thanks to Peter Cawley. #593

23 months agoWindows/ARM64: Fix typo in exception unwinding.
Mike Pall [Mon, 11 Sep 2023 21:00:36 +0000 (23:00 +0200)] 
Windows/ARM64: Fix typo in exception unwinding.

Thanks to Peter Cawley. #593

23 months agoFFI: Fix 64 bit shift fold rules.
Mike Pall [Mon, 11 Sep 2023 19:06:25 +0000 (21:06 +0200)] 
FFI: Fix 64 bit shift fold rules.

Thanks to Peter Cawley. #1079

23 months agoWindows/ARM64: Support Windows calling conventions.
Mike Pall [Mon, 11 Sep 2023 14:35:28 +0000 (16:35 +0200)] 
Windows/ARM64: Support Windows calling conventions.

Dear Microsoft: your butchering of the (perfectly fine) ARM64 ABI is a disgrace.
Thanks to Peter Cawley. #593

23 months agoWindows/ARM64: Fix exception unwinding.
Mike Pall [Mon, 11 Sep 2023 11:33:27 +0000 (13:33 +0200)] 
Windows/ARM64: Fix exception unwinding.

Thanks to Peter Cawley. #593

23 months agoARM64: Remove unneeded IRCALL_* defs for math intrinsics.
Mike Pall [Mon, 11 Sep 2023 11:14:09 +0000 (13:14 +0200)] 
ARM64: Remove unneeded IRCALL_* defs for math intrinsics.

Workaround for MSVC issue.
Thanks to Peter Cawley. #593

23 months agoFix Cygwin build.
Mike Pall [Mon, 11 Sep 2023 11:10:17 +0000 (13:10 +0200)] 
Fix Cygwin build.

Thanks to Christopher Ng. #1077 #1078

23 months agoMerge branch 'master' into v2.1
Mike Pall [Sun, 10 Sep 2023 03:26:27 +0000 (05:26 +0200)] 
Merge branch 'master' into v2.1

23 months agoAllow path overrides in genversion.lua with minilua, too.
Mike Pall [Sun, 10 Sep 2023 03:23:10 +0000 (05:23 +0200)] 
Allow path overrides in genversion.lua with minilua, too.

Thanks to arch1t3cht. #1067

23 months agoWindows/ARM64: Add initial support.
Mike Pall [Sun, 10 Sep 2023 03:20:22 +0000 (05:20 +0200)] 
Windows/ARM64: Add initial support.

Only builds with native ARM64 Visual Studio for now.
Thanks to vanc and Stephen Just. #593 #964

23 months agoMerge branch 'master' into v2.1
Mike Pall [Sat, 9 Sep 2023 21:20:57 +0000 (23:20 +0200)] 
Merge branch 'master' into v2.1

23 months agoImprove architecture detection error messages.
Mike Pall [Sat, 9 Sep 2023 21:01:26 +0000 (23:01 +0200)] 
Improve architecture detection error messages.

23 months agoARM64: Fuse rotates into logical operands.
Mike Pall [Sat, 9 Sep 2023 18:59:18 +0000 (20:59 +0200)] 
ARM64: Fuse rotates into logical operands.

Thanks to Peter Cawley. #1076

23 months agoARM64: Don't fuse sign extensions into logical operands.
Mike Pall [Sat, 9 Sep 2023 18:57:46 +0000 (20:57 +0200)] 
ARM64: Don't fuse sign extensions into logical operands.

Thanks to Peter Cawley. #1076

23 months agoARM64: Disassemble rotates on logical operands.
Mike Pall [Sat, 9 Sep 2023 18:52:02 +0000 (20:52 +0200)] 
ARM64: Disassemble rotates on logical operands.

Thanks to Peter Cawley. #1076

23 months agoMerge branch 'master' into v2.1
Mike Pall [Sat, 9 Sep 2023 16:18:48 +0000 (18:18 +0200)] 
Merge branch 'master' into v2.1

23 months agoARM: Fix stack check code generation.
Mike Pall [Sat, 9 Sep 2023 16:16:31 +0000 (18:16 +0200)] 
ARM: Fix stack check code generation.

Thanks to Peter Cawley. #1068

23 months agoARM64: Fix LDP/STP fusion (again).
Mike Pall [Sat, 9 Sep 2023 16:01:37 +0000 (18:01 +0200)] 
ARM64: Fix LDP/STP fusion (again).

Reported and analyzed by Zhongwei Yao. Fix by Peter Cawley. #1075

23 months agoARM64: Ensure branch is in range before emitting TBZ/TBNZ.
Mike Pall [Sat, 9 Sep 2023 15:52:43 +0000 (17:52 +0200)] 
ARM64: Ensure branch is in range before emitting TBZ/TBNZ.

Thanks to Peter Cawley. #1074

23 months agoMerge branch 'master' into v2.1
Mike Pall [Sat, 9 Sep 2023 15:46:10 +0000 (17:46 +0200)] 
Merge branch 'master' into v2.1

23 months agoFix mcode limit check for non-x86 archs.
Mike Pall [Sat, 9 Sep 2023 15:44:54 +0000 (17:44 +0200)] 
Fix mcode limit check for non-x86 archs.

Thanks to Peter Cawley.

23 months agoARM64: Improve BC_JLOOP.
Mike Pall [Sat, 9 Sep 2023 15:38:44 +0000 (17:38 +0200)] 
ARM64: Improve BC_JLOOP.

Thanks to Peter Cawley. #1070