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

2 years agoMerge branch 'master' into v2.1
Mike Pall [Sun, 16 Apr 2023 11:29:58 +0000 (13:29 +0200)] 
Merge branch 'master' into v2.1

2 years agoFix TDUP load forwarding after table rehash.
Mike Pall [Sun, 16 Apr 2023 11:26:18 +0000 (13:26 +0200)] 
Fix TDUP load forwarding after table rehash.

Reported by Sergey Kaplun. #980

2 years agoFix canonicalization of +-0.0 keys for IR_NEWREF.
Mike Pall [Sun, 16 Apr 2023 11:24:08 +0000 (13:24 +0200)] 
Fix canonicalization of +-0.0 keys for IR_NEWREF.

Reported by Sergey Kaplun. #981

2 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 21 Feb 2023 16:07:37 +0000 (17:07 +0100)] 
Merge branch 'master' into v2.1

2 years agoImprove error reporting on stack overflow.
Mike Pall [Tue, 21 Feb 2023 16:05:12 +0000 (17:05 +0100)] 
Improve error reporting on stack overflow.

Thanks to Nicolas Lebedenco.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 21 Feb 2023 15:53:51 +0000 (16:53 +0100)] 
Merge branch 'master' into v2.1

2 years agoAllow building sources with mixed LF/CRLF line-endings.
Mike Pall [Tue, 21 Feb 2023 15:49:51 +0000 (16:49 +0100)] 
Allow building sources with mixed LF/CRLF line-endings.

Reported by mgood7123.

2 years agoFix compiler warning.
Mike Pall [Wed, 4 Jan 2023 09:44:18 +0000 (10:44 +0100)] 
Fix compiler warning.

Reported by Christopher Ng.

2 years agoDon't fail for Clang builds, which pretend to be an ancient GCC.
Mike Pall [Wed, 4 Jan 2023 09:30:59 +0000 (10:30 +0100)] 
Don't fail for Clang builds, which pretend to be an ancient GCC.

Reported by pkubaj.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Wed, 21 Dec 2022 23:52:04 +0000 (00:52 +0100)] 
Merge branch 'master' into v2.1

2 years agoAvoid negation of signed integers in C that may hold INT*_MIN.
Mike Pall [Wed, 21 Dec 2022 23:03:06 +0000 (00:03 +0100)] 
Avoid negation of signed integers in C that may hold INT*_MIN.

Reported by minoki.
Recent C compilers 'take advantage' of the undefined behavior.
This completely changes the meaning of expressions like (k == -k).

2 years agoMerge branch 'master' into v2.1
Mike Pall [Thu, 8 Dec 2022 23:21:40 +0000 (00:21 +0100)] 
Merge branch 'master' into v2.1

2 years agoCorrect fix for stack check when recording BC_VARG.
Mike Pall [Thu, 8 Dec 2022 23:20:05 +0000 (00:20 +0100)] 
Correct fix for stack check when recording BC_VARG.

Reported by Yichun Zhang.

2 years agoDisable FMA by default. Use -Ofma or jit.opt.start("+fma") to enable.
Mike Pall [Wed, 7 Dec 2022 17:38:22 +0000 (18:38 +0100)] 
Disable FMA by default. Use -Ofma or jit.opt.start("+fma") to enable.

See the discussion in #918 for the rationale.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Wed, 7 Dec 2022 16:21:36 +0000 (17:21 +0100)] 
Merge branch 'master' into v2.1

2 years agoFFI: Fix dangling reference to CType. Improve checks.
Mike Pall [Wed, 7 Dec 2022 16:19:29 +0000 (17:19 +0100)] 
FFI: Fix dangling reference to CType. Improve checks.

Reported by elmknot.

2 years agoARM64: Fix code generation for IR_SLOAD with typecheck + conversion.
Mike Pall [Thu, 1 Dec 2022 11:03:09 +0000 (12:03 +0100)] 
ARM64: Fix code generation for IR_SLOAD with typecheck + conversion.

Reported by memcorrupt.

2 years agoPS4/PS5: Fix build scripts.
Mike Pall [Sun, 27 Nov 2022 14:36:11 +0000 (15:36 +0100)] 
PS4/PS5: Fix build scripts.

Thanks to Mathias Westerdahl.

2 years agoAvoid assertion in case of stack overflow from stitched trace.
Mike Pall [Sun, 27 Nov 2022 14:25:32 +0000 (15:25 +0100)] 
Avoid assertion in case of stack overflow from stitched trace.

Reported by Sergey Bronnikov. Fixed by Sergey Kaplun.

2 years agoNX: Always compile with -fPIC.
Mike Pall [Tue, 22 Nov 2022 08:52:56 +0000 (09:52 +0100)] 
NX: Always compile with -fPIC.

Suggested by Mathias Westerdahl.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 14 Nov 2022 08:56:07 +0000 (09:56 +0100)] 
Merge branch 'master' into v2.1

2 years agoClarify contact page.
Mike Pall [Mon, 14 Nov 2022 08:55:38 +0000 (09:55 +0100)] 
Clarify contact page.