]> git.ipfire.org Git - thirdparty/LuaJIT.git/log
thirdparty/LuaJIT.git
2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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

2 years agoARM64: Improve integer IR_MUL code generation.
Mike Pall [Sat, 9 Sep 2023 15:36:40 +0000 (17:36 +0200)] 
ARM64: Improve integer IR_MUL code generation.

Thanks to Peter Cawley. #1070

2 years agoARM64: Simplify code generation for IR_STRTO.
Mike Pall [Sat, 9 Sep 2023 15:34:28 +0000 (17:34 +0200)] 
ARM64: Simplify code generation for IR_STRTO.

Thanks to Peter Cawley. #1070

2 years agoARM64: Use RID_TMP instead of scratch register in more places.
Mike Pall [Sat, 9 Sep 2023 15:31:06 +0000 (17:31 +0200)] 
ARM64: Use RID_TMP instead of scratch register in more places.

Thanks to Peter Cawley. #1070

2 years agoARM64: Improve IR_OBAR code generation.
Mike Pall [Sat, 9 Sep 2023 15:21:32 +0000 (17:21 +0200)] 
ARM64: Improve IR_OBAR code generation.

Thanks to Peter Cawley. #1070

2 years agoARM64: Improve IR_UREF code generation.
Mike Pall [Sat, 9 Sep 2023 15:19:02 +0000 (17:19 +0200)] 
ARM64: Improve IR_UREF code generation.

Thanks to Peter Cawley. #1070

2 years agoARM64: Improve IR_HREF code generation.
Mike Pall [Sat, 9 Sep 2023 15:15:26 +0000 (17:15 +0200)] 
ARM64: Improve IR_HREF code generation.

Thanks to Peter Cawley. #1070

2 years agoARM64: Reload BASE via GL instead of spilling it.
Mike Pall [Sat, 9 Sep 2023 14:56:16 +0000 (16:56 +0200)] 
ARM64: Reload BASE via GL instead of spilling it.

Thanks to Peter Cawley. #1068.

2 years agoARM64: Consolidate 32/64-bit constant handling in assembler.
Mike Pall [Sat, 9 Sep 2023 14:30:14 +0000 (16:30 +0200)] 
ARM64: Consolidate 32/64-bit constant handling in assembler.

Thanks to Peter Cawley. #1065

2 years agoARM64: Tune emit_lsptr. Avoid wrong load for asm_prof.
Mike Pall [Sat, 9 Sep 2023 12:20:39 +0000 (14:20 +0200)] 
ARM64: Tune emit_lsptr. Avoid wrong load for asm_prof.

Thanks to Peter Cawley. #1065

2 years agoARM64: Inline only use of emit_loada.
Mike Pall [Sat, 9 Sep 2023 12:15:18 +0000 (14:15 +0200)] 
ARM64: Inline only use of emit_loada.

Thanks to Peter Cawley. #1065

2 years agoARM64: Improve K13 constant rematerialization.
Mike Pall [Sat, 9 Sep 2023 12:11:25 +0000 (14:11 +0200)] 
ARM64: Improve K13 constant rematerialization.

Algorithm by Dougall Johnson: https://dougallj.wordpress.com/2021/10/30/
Thanks to Peter Cawley. #1065

2 years agoMerge branch 'master' into v2.1
Mike Pall [Sat, 9 Sep 2023 11:42:12 +0000 (13:42 +0200)] 
Merge branch 'master' into v2.1

2 years agoAdd NaN check to IR_NEWREF.
Mike Pall [Sat, 9 Sep 2023 11:37:31 +0000 (13:37 +0200)] 
Add NaN check to IR_NEWREF.

Thanks to Peter Cawley. #1069

2 years agoMerge branch 'master' into v2.1
Mike Pall [Sat, 9 Sep 2023 10:50:13 +0000 (12:50 +0200)] 
Merge branch 'master' into v2.1

2 years agoAllow override of paths for genversion.lua.
Mike Pall [Sat, 9 Sep 2023 10:47:27 +0000 (12:47 +0200)] 
Allow override of paths for genversion.lua.

Thanks to arch1t3cht. #1067

2 years agoFix native MinGW build.
Mike Pall [Sat, 9 Sep 2023 10:41:47 +0000 (12:41 +0200)] 
Fix native MinGW build.

Thanks to Victor Bombi. #1071

2 years agoAdd randomized register allocation for fuzz testing.
Mike Pall [Tue, 29 Aug 2023 23:10:52 +0000 (01:10 +0200)] 
Add randomized register allocation for fuzz testing.

This must be explicitly enabled with: -DLUAJIT_RANDOM_RA
Thanks to Peter Cawley. #1062

2 years agoARM64: Improve register allocation for integer IR_MUL/IR_MULOV.
Mike Pall [Tue, 29 Aug 2023 20:38:20 +0000 (22:38 +0200)] 
ARM64: Improve register allocation for integer IR_MUL/IR_MULOV.

Thanks to Peter Cawley. #1062

2 years agoARM64: Fix register allocation for IR_*LOAD.
Mike Pall [Tue, 29 Aug 2023 20:35:10 +0000 (22:35 +0200)] 
ARM64: Fix register allocation for IR_*LOAD.

Thanks to Peter Cawley. #1062

2 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 29 Aug 2023 20:30:57 +0000 (22:30 +0200)] 
Merge branch 'master' into v2.1

2 years agoUpdate external MSDN URL in code.
Mike Pall [Tue, 29 Aug 2023 20:27:38 +0000 (22:27 +0200)] 
Update external MSDN URL in code.

Thanks to Kyle Marshall. #1060

2 years agoFFI/ARM64/OSX: Handle non-standard OSX C calling conventions.
Mike Pall [Tue, 29 Aug 2023 00:21:51 +0000 (02:21 +0200)] 
FFI/ARM64/OSX: Handle non-standard OSX C calling conventions.

Contributed by Peter Cawley. #205

2 years agoFFI: Unify stack setup for C calls in interpreter.
Mike Pall [Tue, 29 Aug 2023 00:12:13 +0000 (02:12 +0200)] 
FFI: Unify stack setup for C calls in interpreter.

2 years agoARM64: Prevent STP fusion for conditional code emitted by TBAR.
Mike Pall [Mon, 28 Aug 2023 20:39:35 +0000 (22:39 +0200)] 
ARM64: Prevent STP fusion for conditional code emitted by TBAR.

Thanks to Peter Cawley. #1057

2 years agoARM64: Fix LDP/STP fusing for unaligned accesses.
Mike Pall [Mon, 28 Aug 2023 20:33:54 +0000 (22:33 +0200)] 
ARM64: Fix LDP/STP fusing for unaligned accesses.

Thanks to Peter Cawley. #1056

2 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 28 Aug 2023 20:24:36 +0000 (22:24 +0200)] 
Merge branch 'master' into v2.1

2 years agoHandle table unsinking in the presence of IRFL_TAB_NOMM.
Mike Pall [Mon, 28 Aug 2023 20:15:42 +0000 (22:15 +0200)] 
Handle table unsinking in the presence of IRFL_TAB_NOMM.

Reported by Sergey Kaplun. #1052

2 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 28 Aug 2023 20:02:06 +0000 (22:02 +0200)] 
Merge branch 'master' into v2.1

2 years agoUse fallback name for install files without valid .git or .relver.
Mike Pall [Mon, 28 Aug 2023 19:25:51 +0000 (21:25 +0200)] 
Use fallback name for install files without valid .git or .relver.

2 years agoHandle non-.git checkout with .relver in .bat-file builds.
Mike Pall [Mon, 28 Aug 2023 19:59:01 +0000 (21:59 +0200)] 
Handle non-.git checkout with .relver in .bat-file builds.

Thanks to Simon Cooke.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 28 Aug 2023 19:08:00 +0000 (21:08 +0200)] 
Merge branch 'master' into v2.1

2 years agoFix external C call stack check when using LUAJIT_MODE_WRAPCFUNC.
Mike Pall [Mon, 28 Aug 2023 19:04:01 +0000 (21:04 +0200)] 
Fix external C call stack check when using LUAJIT_MODE_WRAPCFUNC.

Thanks to Peter Cawley. #1047

2 years agoFix predict_next() in parser (again).
Mike Pall [Mon, 28 Aug 2023 19:00:37 +0000 (21:00 +0200)] 
Fix predict_next() in parser (again).

Reported by Sergey Bronnikov. #1054

2 years agoFix typo.
Mike Pall [Tue, 22 Aug 2023 15:06:34 +0000 (17:06 +0200)] 
Fix typo.

Thanks to Simon Cooke.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 22 Aug 2023 15:06:14 +0000 (17:06 +0200)] 
Merge branch 'master' into v2.1

2 years agoHandle the case when .git is not a directory.
Mike Pall [Tue, 22 Aug 2023 15:04:22 +0000 (17:04 +0200)] 
Handle the case when .git is not a directory.

Thanks to Alexander Shpilkin.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 22 Aug 2023 13:37:21 +0000 (15:37 +0200)] 
Merge branch 'master' into v2.1

2 years agoAdd .gitattributes to dynamically resolve .relver.
Mike Pall [Tue, 22 Aug 2023 13:36:55 +0000 (15:36 +0200)] 
Add .gitattributes to dynamically resolve .relver.

Thanks to Alexander Shpilkin.

2 years agoAdd .gitattributes to dynamically resolve .relver.
Mike Pall [Tue, 22 Aug 2023 13:30:27 +0000 (15:30 +0200)] 
Add .gitattributes to dynamically resolve .relver.

Thanks to Alexander Shpilkin.

2 years agoFix for last commit: also remove symlink on uninstall.
Mike Pall [Tue, 22 Aug 2023 09:46:12 +0000 (11:46 +0200)] 
Fix for last commit: also remove symlink on uninstall.

2 years agoSwitch to rolling releases: mark v2.1 as production.
Mike Pall [Tue, 22 Aug 2023 09:13:45 +0000 (11:13 +0200)] 
Switch to rolling releases: mark v2.1 as production.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 21 Aug 2023 11:09:52 +0000 (13:09 +0200)] 
Merge branch 'master' into v2.1

2 years agoFix Windows build scripts for rolling releases.
Mike Pall [Mon, 21 Aug 2023 11:08:00 +0000 (13:08 +0200)] 
Fix Windows build scripts for rolling releases.

Reported by Miku AuahDark.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 21 Aug 2023 02:03:25 +0000 (04:03 +0200)] 
Merge branch 'master' into v2.1

2 years agoSwitch MSVC and console build scripts to rolling releases.
Mike Pall [Mon, 21 Aug 2023 01:59:03 +0000 (03:59 +0200)] 
Switch MSVC and console build scripts to rolling releases.

2 years agoMerge branch 'master' into v2.1 v2.1.ROLLING
Mike Pall [Mon, 21 Aug 2023 01:18:35 +0000 (03:18 +0200)] 
Merge branch 'master' into v2.1

2 years agoSwitch build system to rolling releases. v2.0.ROLLING
Mike Pall [Mon, 21 Aug 2023 01:06:26 +0000 (03:06 +0200)] 
Switch build system to rolling releases.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 21 Aug 2023 00:38:56 +0000 (02:38 +0200)] 
Merge branch 'master' into v2.1

2 years agoUpdate documentation for switch to rolling releases.
Mike Pall [Mon, 21 Aug 2023 00:28:49 +0000 (02:28 +0200)] 
Update documentation for switch to rolling releases.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Sun, 20 Aug 2023 19:33:37 +0000 (21:33 +0200)] 
Merge branch 'master' into v2.1

2 years agoBump copyright date.
Mike Pall [Sun, 20 Aug 2023 19:25:30 +0000 (21:25 +0200)] 
Bump copyright date.

2 years agoRemove work-in-progress notice in string buffer docs.
Mike Pall [Sun, 20 Aug 2023 19:14:37 +0000 (21:14 +0200)] 
Remove work-in-progress notice in string buffer docs.

2 years agoMIPS: Fix "bad FP FLOAD" assertion.
Mike Pall [Sun, 13 Aug 2023 01:02:25 +0000 (03:02 +0200)] 
MIPS: Fix "bad FP FLOAD" assertion.

Reported by Sergey Kaplun. #1043

2 years agoEnsure forward progress on trace exit to BC_ITERN.
Mike Pall [Sun, 13 Aug 2023 00:25:12 +0000 (02:25 +0200)] 
Ensure forward progress on trace exit to BC_ITERN.

Also use a safer way to force a static dispatch for BC_RET*.
Reported by Bartel Eerdekens. Analyzed by Peter Cawley. #1000 #1045

2 years agoARM64: Add support for ARM64e pointer authentication codes (PAC).
Mike Pall [Sat, 12 Aug 2023 20:25:40 +0000 (22:25 +0200)] 
ARM64: Add support for ARM64e pointer authentication codes (PAC).

Contributed by Peter Cawley. #559

2 years agoDynASM/ARM64: Add instructions for ARM64e PAC.
Mike Pall [Sat, 12 Aug 2023 20:24:00 +0000 (22:24 +0200)] 
DynASM/ARM64: Add instructions for ARM64e PAC.

Contributed by Peter Cawley. #559

2 years agoMerge branch 'master' into v2.1
Mike Pall [Sat, 12 Aug 2023 20:20:33 +0000 (22:20 +0200)] 
Merge branch 'master' into v2.1

2 years agoFix maxslots when recording BC_VARG, part 3.
Mike Pall [Sat, 12 Aug 2023 18:16:56 +0000 (20:16 +0200)] 
Fix maxslots when recording BC_VARG, part 3.

Thanks to Peter Cawley. #1046

2 years agoFix predict_next() in parser.
Mike Pall [Sat, 12 Aug 2023 14:21:41 +0000 (16:21 +0200)] 
Fix predict_next() in parser.

Reported by Sergey Kaplun. #1033

2 years agoMIPS32: Declare that the assembler part uses the FR=0 model.
Mike Pall [Sat, 12 Aug 2023 13:02:51 +0000 (15:02 +0200)] 
MIPS32: Declare that the assembler part uses the FR=0 model.

Thanks to Peter Cawley. #1040

2 years agoARM64: Fix assembly of HREFK (again).
Mike Pall [Sat, 12 Aug 2023 12:52:48 +0000 (14:52 +0200)] 
ARM64: Fix assembly of HREFK (again).

Thanks to Peter Cawley. #1026

2 years agoFix frame for more types of on-trace error messages.
Mike Pall [Sat, 12 Aug 2023 12:48:34 +0000 (14:48 +0200)] 
Fix frame for more types of on-trace error messages.

Thanks to Maxim Kokryashkin. #1034

2 years agoAdd workaround for bytecode dump of builtins.
Mike Pall [Sat, 12 Aug 2023 12:37:35 +0000 (14:37 +0200)] 
Add workaround for bytecode dump of builtins.

Reported by Hang Zhou. Thanks to Sergey Kaplun. #1038

2 years agoDynASM: Fix regression due to warning fix.
Mike Pall [Sat, 12 Aug 2023 12:29:02 +0000 (14:29 +0200)] 
DynASM: Fix regression due to warning fix.

Thanks to Dmitry Stogov. #1041 #970

2 years agoMerge branch 'master' into v2.1
Mike Pall [Wed, 12 Jul 2023 20:34:46 +0000 (22:34 +0200)] 
Merge branch 'master' into v2.1

2 years agoFix base register coalescing in side trace.
Mike Pall [Wed, 12 Jul 2023 19:56:17 +0000 (21:56 +0200)] 
Fix base register coalescing in side trace.

Thanks to Sergey Kaplun, NiLuJe and Peter Cawley. #1031 #1016

2 years agoARM64: Fix assembly of HREFK.
Mike Pall [Sun, 9 Jul 2023 19:15:01 +0000 (21:15 +0200)] 
ARM64: Fix assembly of HREFK.

Reported by caohongqing. #1026
Fix contributed by Peter Cawley.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Sun, 9 Jul 2023 19:09:21 +0000 (21:09 +0200)] 
Merge branch 'master' into v2.1

2 years agoFix maxslots when recording BC_VARG, part 2.
Mike Pall [Sun, 9 Jul 2023 19:08:12 +0000 (21:08 +0200)] 
Fix maxslots when recording BC_VARG, part 2.

Analyzed by Sergey Kaplun. #1024

2 years agoFix maxslots when recording BC_TSETM.
Mike Pall [Sat, 8 Jul 2023 17:44:48 +0000 (19:44 +0200)] 
Fix maxslots when recording BC_TSETM.

Analyzed by Sergey Kaplun. #1025

2 years agoMerge branch 'master' into v2.1
Mike Pall [Sat, 8 Jul 2023 17:43:08 +0000 (19:43 +0200)] 
Merge branch 'master' into v2.1

2 years agoFix maxslots when recording BC_VARG.
Mike Pall [Sat, 8 Jul 2023 17:40:12 +0000 (19:40 +0200)] 
Fix maxslots when recording BC_VARG.

Analyzed by Sergey Kaplun. #1024

2 years agoFix register mask for stack check in head of side trace.
Mike Pall [Sat, 8 Jul 2023 17:36:24 +0000 (19:36 +0200)] 
Fix register mask for stack check in head of side trace.

Analyzed by Sergey Kaplun. #1016

2 years agoFFI: Fix ffi.metatype() for non-raw types.
Mike Pall [Sat, 8 Jul 2023 17:30:56 +0000 (19:30 +0200)] 
FFI: Fix ffi.metatype() for non-raw types.

Reported by 999pingGG. #1005

2 years agoARM64: Fix LDP code generation.
Mike Pall [Sat, 8 Jul 2023 10:10:18 +0000 (12:10 +0200)] 
ARM64: Fix LDP code generation.

Thanks to Zhongwei Yao. #1028

2 years agoMIPSr6: Add missing files to Makefile install target.
Mike Pall [Mon, 12 Jun 2023 07:19:58 +0000 (09:19 +0200)] 
MIPSr6: Add missing files to Makefile install target.

Reported by FractalU.

2 years agoDynASM: Fix warnings.
Mike Pall [Fri, 2 Jun 2023 10:54:46 +0000 (12:54 +0200)] 
DynASM: Fix warnings.

Reported by Ilija Tovilo.

2 years agoFix frame for on-trace out-of-memory error.
Mike Pall [Fri, 2 Jun 2023 09:42:58 +0000 (11:42 +0200)] 
Fix frame for on-trace out-of-memory error.

Reported by ruidong007.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Fri, 2 Jun 2023 09:42:24 +0000 (11:42 +0200)] 
Merge branch 'master' into v2.1

2 years agoFix handling of instable types in TNEW/TDUP load forwarding.
Mike Pall [Fri, 2 Jun 2023 09:38:45 +0000 (11:38 +0200)] 
Fix handling of instable types in TNEW/TDUP load forwarding.

Analyzed by Sergey Kaplun. #994

2 years agoFix compiler warning.
Mike Pall [Fri, 2 Jun 2023 09:36:24 +0000 (11:36 +0200)] 
Fix compiler warning.

Reported by Myriachan.

2 years agoFix last commit.
Mike Pall [Sun, 30 Apr 2023 11:38:29 +0000 (13:38 +0200)] 
Fix last commit.

Reported by PluMGMK.

2 years agoPrint errors from __gc finalizers instead of rethrowing them.
Mike Pall [Sun, 16 Apr 2023 16:13:48 +0000 (18:13 +0200)] 
Print errors from __gc finalizers instead of rethrowing them.

Finalizers are not supposed to throw errors -- this is undefined behavior.
Lua 5.1 - 5.3 and (previously) LuaJIT rethrow the error. This randomly
breaks some unrelated code that just happens to do an allocation. Bad.
Lua 5.4 catches the error and emits a warning instead. But warnings are
not enabled by default, so it fails silently. Even worse.
LuaJIT (now) catches the error and emits a VM event. The default event
handler function prints "ERROR in finalizer: ...".
Set a custom handler function with: jit.attach(handler, "errfin")