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

2 years agoMerge branch 'master' into v2.1
Mike Pall [Wed, 9 Nov 2022 10:06:11 +0000 (11:06 +0100)] 
Merge branch 'master' into v2.1

2 years agoEnsure correct stack top for OOM error message.
Mike Pall [Wed, 9 Nov 2022 10:01:41 +0000 (11:01 +0100)] 
Ensure correct stack top for OOM error message.

Reported by Sergey Kaplun.

2 years agoARM64: Fix IR_SLOAD assembly.
Mike Pall [Tue, 4 Oct 2022 10:04:17 +0000 (12:04 +0200)] 
ARM64: Fix IR_SLOAD assembly.

Reported by Gate88.

2 years agoFix trace join to BC_JLOOP originating from BC_ITERN.
Mike Pall [Wed, 14 Sep 2022 10:26:53 +0000 (12:26 +0200)] 
Fix trace join to BC_JLOOP originating from BC_ITERN.

Reported by OpenResty Inc.

2 years agoFix compiler warnings.
Mike Pall [Tue, 13 Sep 2022 11:43:03 +0000 (13:43 +0200)] 
Fix compiler warnings.

Reported by gan74.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 13 Sep 2022 09:33:12 +0000 (11:33 +0200)] 
Merge branch 'master' into v2.1

2 years agoFix last edit.
Mike Pall [Tue, 13 Sep 2022 09:32:53 +0000 (11:32 +0200)] 
Fix last edit.

2 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 13 Sep 2022 09:22:18 +0000 (11:22 +0200)] 
Merge branch 'master' into v2.1

2 years agoRemove dead Wiki links.
Mike Pall [Tue, 13 Sep 2022 09:21:30 +0000 (11:21 +0200)] 
Remove dead Wiki links.

The lost content may be resurrected later.

2 years agoFix QNX build.
Mike Pall [Mon, 12 Sep 2022 09:16:20 +0000 (11:16 +0200)] 
Fix QNX build.

Note: this is not an officially supported target.
Contributed by Wen Yang.

3 years agoAdd -F option to override filename in jit.bcsave (luajit -b).
Mike Pall [Mon, 15 Aug 2022 12:16:58 +0000 (14:16 +0200)] 
Add -F option to override filename in jit.bcsave (luajit -b).

Suggested by Mathias Westerdahl.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 15 Aug 2022 12:16:39 +0000 (14:16 +0200)] 
Merge branch 'master' into v2.1

3 years agoPatch luajit.pc with INSTALL_INC, if customized.
Mike Pall [Mon, 15 Aug 2022 12:16:14 +0000 (14:16 +0200)] 
Patch luajit.pc with INSTALL_INC, if customized.

Suggested by Henrique Bucher.

3 years agoLJ_GC64: Fix lua_concat().
Mike Pall [Wed, 10 Aug 2022 17:27:53 +0000 (19:27 +0200)] 
LJ_GC64: Fix lua_concat().

Reported by Mathias Westerdahl.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Sun, 7 Aug 2022 18:04:52 +0000 (20:04 +0200)] 
Merge branch 'master' into v2.1

3 years agoPrevent use of RTLD_DEFAULT when NO_RTLD_DEFAULT is defined.
Mike Pall [Sun, 7 Aug 2022 18:02:40 +0000 (20:02 +0200)] 
Prevent use of RTLD_DEFAULT when NO_RTLD_DEFAULT is defined.

Workaround for Android 4.4 bug.
Thanks to gudzpoz.

3 years agoImprove GC estimation for userdata with attached managed memory.
Mike Pall [Thu, 28 Jul 2022 13:40:28 +0000 (15:40 +0200)] 
Improve GC estimation for userdata with attached managed memory.

This works well for string.buffers, but not for userdata or
cdata with attached unmanaged memory (malloc/free, mmap/munmap).

3 years agoAdd missing GC steps to string buffer methods.
Mike Pall [Thu, 28 Jul 2022 13:38:54 +0000 (15:38 +0200)] 
Add missing GC steps to string buffer methods.

Reported by Cosmin Apreutesei.

3 years agox86/x64: Limit VLOAD fusion to simple cases.
Mike Pall [Wed, 27 Jul 2022 09:32:33 +0000 (11:32 +0200)] 
x86/x64: Limit VLOAD fusion to simple cases.

Reported by ccagml.

3 years agoOSX/iOS/ARM64: Fix generation of Mach-O object files.
Mike Pall [Fri, 22 Jul 2022 10:14:40 +0000 (12:14 +0200)] 
OSX/iOS/ARM64: Fix generation of Mach-O object files.

Thanks to Carlo Cabrera.

3 years agoPrevent trace start at BC_ITERL after compiled BC_ITERN.
Mike Pall [Thu, 21 Jul 2022 15:30:56 +0000 (17:30 +0200)] 
Prevent trace start at BC_ITERL after compiled BC_ITERN.

Reported by ccagml.

3 years agoARM64: Allow building with unwinding disabled.
Mike Pall [Tue, 19 Jul 2022 10:53:34 +0000 (12:53 +0200)] 
ARM64: Allow building with unwinding disabled.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Tue, 12 Jul 2022 22:37:14 +0000 (00:37 +0200)] 
Merge branch 'master' into v2.1

3 years agoFFI: Fix sizeof expression in C parser for reference types.
Mike Pall [Tue, 12 Jul 2022 22:32:31 +0000 (00:32 +0200)] 
FFI: Fix sizeof expression in C parser for reference types.

3 years agoFFI: Fix ffi.alignof() for reference types.
Mike Pall [Tue, 12 Jul 2022 22:32:04 +0000 (00:32 +0200)] 
FFI: Fix ffi.alignof() for reference types.

Reported by Eric Gouyer.

3 years agoFFI: Allow ffi.metatype() for typedefs with attributes.
Mike Pall [Tue, 12 Jul 2022 22:30:23 +0000 (00:30 +0200)] 
FFI: Allow ffi.metatype() for typedefs with attributes.

Reported by Eric Gouyer.

3 years agoOSX/iOS/ARM64: Fix bytecode embedding in Mach-O object file.
Mike Pall [Tue, 12 Jul 2022 20:25:33 +0000 (22:25 +0200)] 
OSX/iOS/ARM64: Fix bytecode embedding in Mach-O object file.

Thanks to Carlo Cabrera.

3 years agoLJ_GC64: Fix IR_VARG offset for fixed number of results.
Mike Pall [Tue, 12 Jul 2022 20:21:26 +0000 (22:21 +0200)] 
LJ_GC64: Fix IR_VARG offset for fixed number of results.

Reported by George Vaintrub. Fixed by Sergey Kaplun.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Fri, 8 Jul 2022 13:12:43 +0000 (15:12 +0200)] 
Merge branch 'master' into v2.1

3 years agox86/x64: Fix math.ceil(-0.9) result sign.
Mike Pall [Fri, 8 Jul 2022 12:57:01 +0000 (14:57 +0200)] 
x86/x64: Fix math.ceil(-0.9) result sign.

Reported by minoki.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Thu, 23 Jun 2022 07:10:43 +0000 (09:10 +0200)] 
Merge branch 'master' into v2.1

3 years agoGrammar and spell check.
Mike Pall [Thu, 23 Jun 2022 07:10:09 +0000 (09:10 +0200)] 
Grammar and spell check.

3 years agoMake embedded bytecode readable and forward-compatible.
Mike Pall [Mon, 13 Jun 2022 19:23:16 +0000 (21:23 +0200)] 
Make embedded bytecode readable and forward-compatible.

3 years agoDynASM: Fix warnings.
Mike Pall [Wed, 8 Jun 2022 14:21:01 +0000 (16:21 +0200)] 
DynASM: Fix warnings.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Wed, 8 Jun 2022 13:36:47 +0000 (15:36 +0200)] 
Merge branch 'master' into v2.1

3 years agoFix warnings in minilua.c.
Mike Pall [Wed, 8 Jun 2022 13:35:12 +0000 (15:35 +0200)] 
Fix warnings in minilua.c.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Wed, 8 Jun 2022 13:03:52 +0000 (15:03 +0200)] 
Merge branch 'master' into v2.1

3 years agoUpdate console build instructions.
Mike Pall [Wed, 8 Jun 2022 12:55:59 +0000 (14:55 +0200)] 
Update console build instructions.

3 years agoAdd Nintendo Switch port.
Mike Pall [Wed, 8 Jun 2022 12:24:57 +0000 (14:24 +0200)] 
Add Nintendo Switch port.

Contributed by Swyter and vdweller84.

3 years agoAvoid zero-sized arrays in jit_State.
Mike Pall [Wed, 8 Jun 2022 09:26:50 +0000 (11:26 +0200)] 
Avoid zero-sized arrays in jit_State.

3 years agoDon't use jit_State during build with JIT disabled.
Mike Pall [Wed, 8 Jun 2022 09:20:28 +0000 (11:20 +0200)] 
Don't use jit_State during build with JIT disabled.

3 years agoDynASM/ARM64: Fix LSL/BFI* encoding with variable registers.
Mike Pall [Thu, 2 Jun 2022 11:48:04 +0000 (13:48 +0200)] 
DynASM/ARM64: Fix LSL/BFI* encoding with variable registers.

Thanks to Dmitry Stogov.

3 years agoFix ITERN loop detection when hook checks are enabled.
Mike Pall [Thu, 2 Jun 2022 11:18:10 +0000 (13:18 +0200)] 
Fix ITERN loop detection when hook checks are enabled.

Reported by Myria.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Sat, 21 May 2022 10:02:32 +0000 (12:02 +0200)] 
Merge branch 'master' into v2.1

3 years agoPrevent C compiler undefined-behavior optimization.
Mike Pall [Sat, 21 May 2022 10:00:10 +0000 (12:00 +0200)] 
Prevent C compiler undefined-behavior optimization.

3 years agoFix alias analysis for table length forwarding.
Mike Pall [Fri, 20 May 2022 10:16:25 +0000 (12:16 +0200)] 
Fix alias analysis for table length forwarding.

Contributed by Maxim Sokolov.

3 years agoFix loop initialization in table.foreach().
Mike Pall [Fri, 20 May 2022 09:54:20 +0000 (11:54 +0200)] 
Fix loop initialization in table.foreach().

Reported by Daniel Steinberg.

3 years agoLJ_GC64: Fix HREFK optimization.
Mike Pall [Tue, 3 May 2022 18:51:29 +0000 (20:51 +0200)] 
LJ_GC64: Fix HREFK optimization.

Contributed by XmiliaH.

3 years agoFix recording of __concat metamethod.
Mike Pall [Mon, 2 May 2022 20:33:35 +0000 (22:33 +0200)] 
Fix recording of __concat metamethod.

Reported by Elias Oelschner. Analyzed by XmiliaH.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 18 Apr 2022 00:02:56 +0000 (02:02 +0200)] 
Merge branch 'master' into v2.1

3 years agoCleanup of system and architecture support docs.
Mike Pall [Sun, 17 Apr 2022 23:54:00 +0000 (01:54 +0200)] 
Cleanup of system and architecture support docs.

3 years agoAdd PS5 port.
Mike Pall [Sun, 17 Apr 2022 21:41:39 +0000 (23:41 +0200)] 
Add PS5 port.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Sun, 17 Apr 2022 08:57:43 +0000 (10:57 +0200)] 
Merge branch 'master' into v2.1

3 years agoFix assertions.
Mike Pall [Sun, 17 Apr 2022 08:56:11 +0000 (10:56 +0200)] 
Fix assertions.

Reported by ssdr.

3 years agox64: Fix RETHI/RETLO swap after call.
Mike Pall [Tue, 5 Apr 2022 07:55:15 +0000 (09:55 +0200)] 
x64: Fix RETHI/RETLO swap after call.

Reported by savilli.

3 years agoFix assertion for LJ_KEYINDEX.
Mike Pall [Sun, 3 Apr 2022 08:35:42 +0000 (10:35 +0200)] 
Fix assertion for LJ_KEYINDEX.

Thanks to XmiliaH.

3 years agoAdd missing check for LJ_KEYINDEX in ITERN recording.
Mike Pall [Sat, 2 Apr 2022 19:24:18 +0000 (21:24 +0200)] 
Add missing check for LJ_KEYINDEX in ITERN recording.

Reported by dragonorloong. Analyzed by vfprintf. #827

3 years agoDynASM/ARM64: Fix NOP instruction for aligment
Mike Pall [Fri, 25 Mar 2022 14:31:17 +0000 (15:31 +0100)] 
DynASM/ARM64: Fix NOP instruction for aligment

Reported by Marius Wachtler.

3 years agoFix soft-float IR_POW splitting.
Mike Pall [Sun, 20 Mar 2022 10:29:17 +0000 (11:29 +0100)] 
Fix soft-float IR_POW splitting.

Reported by lison0322.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Sun, 13 Mar 2022 17:34:59 +0000 (18:34 +0100)] 
Merge branch 'master' into v2.1

3 years agoFix BC_UCLO insertion for returns.
Mike Pall [Sun, 13 Mar 2022 17:32:32 +0000 (18:32 +0100)] 
Fix BC_UCLO insertion for returns.

Contributed by XmiliaH.

3 years agoFix compiler warning.
Mike Pall [Tue, 8 Mar 2022 19:05:33 +0000 (20:05 +0100)] 
Fix compiler warning.

3 years agoRevert to trival pow() optimizations to prevent inaccuracies.
Mike Pall [Tue, 8 Mar 2022 18:44:10 +0000 (19:44 +0100)] 
Revert to trival pow() optimizations to prevent inaccuracies.

3 years agoFix string buffer COW handling, part 2.
Mike Pall [Mon, 7 Mar 2022 14:46:51 +0000 (15:46 +0100)] 
Fix string buffer COW handling, part 2.

Reported by XmiliaH.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Mon, 7 Mar 2022 08:51:40 +0000 (09:51 +0100)] 
Merge branch 'master' into v2.1

3 years agoFix install docs for Android.
Mike Pall [Mon, 7 Mar 2022 08:50:25 +0000 (09:50 +0100)] 
Fix install docs for Android.

Thanks to GuDzpoz.

3 years ago*BSD: Fix getentropy() declaration.
Mike Pall [Mon, 7 Mar 2022 08:45:04 +0000 (09:45 +0100)] 
*BSD: Fix getentropy() declaration.

Thanks to dundargoc.

3 years agoFix string buffer COW handling.
Mike Pall [Mon, 7 Mar 2022 08:42:59 +0000 (09:42 +0100)] 
Fix string buffer COW handling.

Reported by XmiliaH.

3 years agoMerge branch 'master' into v2.1
Mike Pall [Thu, 27 Jan 2022 21:26:14 +0000 (22:26 +0100)] 
Merge branch 'master' into v2.1