Sync from SUSE:SLFO:Main luajit revision b91aea2d02169d8f5ebd327afc19bd00

This commit is contained in:
Adrian Schröter 2025-02-20 09:49:40 +01:00
parent fc687abb8c
commit 4221829bf7
10 changed files with 268 additions and 50 deletions

View File

@ -34,11 +34,12 @@ Subject: Get rid of LUAJIT_VERSION_SYM that changes ABI on every patch release
if (argn < 0) { /* Invalid args? */ if (argn < 0) { /* Invalid args? */
--- a/src/luajit_rolling.h --- a/src/luajit_rolling.h
+++ b/src/luajit_rolling.h +++ b/src/luajit_rolling.h
@@ -73,7 +73,4 @@ LUA_API void luaJIT_profile_stop(lua_Sta @@ -73,8 +73,5 @@ LUA_API void luaJIT_profile_stop(lua_Sta
LUA_API const char *luaJIT_profile_dumpstack(lua_State *L, const char *fmt, LUA_API const char *luaJIT_profile_dumpstack(lua_State *L, const char *fmt,
int depth, size_t *len); int depth, size_t *len);
-/* Enforce (dynamic) linker error for version mismatches. Call from main. */ -/* Enforce (dynamic) linker error for version mismatches. Call from main. */
-LUA_API void LUAJIT_VERSION_SYM(void); -LUA_API void LUAJIT_VERSION_SYM(void);
- -
#error "DO NOT USE luajit_rolling.h -- only include build-generated luajit.h"
#endif #endif

BIN
LuaJIT-5.1.2.1.0+git.1731601260.fe71d0f.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

4
LuaJIT.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: LuaJIT
version: 5.1.2.1.0+git.1731601260.fe71d0f
mtime: 1731601260
commit: fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059

View File

@ -1,5 +1,5 @@
<services> <services>
<service name="tar_scm" mode="manual"> <service name="obs_scm" mode="manual">
<param name="scm">git</param> <param name="scm">git</param>
<param name="url">https://github.com/LuaJIT/LuaJIT.git</param> <param name="url">https://github.com/LuaJIT/LuaJIT.git</param>
<param name="versionprefix">5.1.2.1.0+git</param> <param name="versionprefix">5.1.2.1.0+git</param>
@ -8,7 +8,9 @@
<param name="changesgenerate">enable</param> <param name="changesgenerate">enable</param>
<param name="changesauthor">mcepl@cepl.eu</param> <param name="changesauthor">mcepl@cepl.eu</param>
</service> </service>
<service name="recompress" mode="manual"> <service name="tar" mode="buildtime">
</service>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param> <param name="file">*.tar</param>
<param name="compression">xz</param> <param name="compression">xz</param>
</service> </service>

View File

@ -1,4 +1,4 @@
<servicedata> <servicedata>
<service name="tar_scm"> <service name="tar_scm">
<param name="url">https://github.com/LuaJIT/LuaJIT.git</param> <param name="url">https://github.com/LuaJIT/LuaJIT.git</param>
<param name="changesrevision">41fb94defa8f830ce69a8122b03f6ac3216d392a</param></service></servicedata> <param name="changesrevision">fe71d0fb54ceadfb5b5f3b6baf29e486d97f6059</param></service></servicedata>

Binary file not shown.

View File

@ -23,7 +23,7 @@
VERSION= $(MMVERSION).$(RELVER) VERSION= $(MMVERSION).$(RELVER)
############################################################################## ##############################################################################
@@ -51,7 +52,7 @@ INSTALL_MAN= $(INSTALL_SHARE)/man/man1 @@ -52,7 +53,7 @@ INSTALL_MAN= $(INSTALL_SHARE)/man/man1
INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
INSTALL_TNAME= luajit-$(VERSION) INSTALL_TNAME= luajit-$(VERSION)
@ -32,7 +32,7 @@
INSTALL_ANAME= libluajit-$(ABIVER).a INSTALL_ANAME= libluajit-$(ABIVER).a
INSTALL_SOSHORT1= libluajit-$(ABIVER).so INSTALL_SOSHORT1= libluajit-$(ABIVER).so
INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER) INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER)
@@ -89,7 +90,7 @@ ifneq ($(INSTALL_DEFINC),$(INSTALL_INC)) @@ -90,7 +91,7 @@ ifneq ($(INSTALL_DEFINC),$(INSTALL_INC))
SED_PC+= -e "s|^includedir=.*|includedir=$(INSTALL_INC)|" SED_PC+= -e "s|^includedir=.*|includedir=$(INSTALL_INC)|"
endif endif
@ -41,7 +41,7 @@
FILE_A= libluajit.a FILE_A= libluajit.a
FILE_SO= libluajit.so FILE_SO= libluajit.so
FILE_MAN= luajit.1 FILE_MAN= luajit.1
@@ -136,7 +137,7 @@ install: $(INSTALL_DEP) @@ -138,7 +139,7 @@ install: $(INSTALL_DEP)
( $(LDCONFIG) $(INSTALL_LIB) || : ) && \ ( $(LDCONFIG) $(INSTALL_LIB) || : ) && \
$(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \ $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \
$(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || : $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || :
@ -71,7 +71,7 @@
############################################################################## ##############################################################################
############################# COMPILER OPTIONS ############################# ############################# COMPILER OPTIONS #############################
@@ -520,7 +521,7 @@ LIB_VMDEFP= $(LIB_VMDEF) @@ -527,7 +528,7 @@ LIB_VMDEFP= $(LIB_VMDEF)
LUAJIT_O= luajit.o LUAJIT_O= luajit.o
LUAJIT_A= libluajit.a LUAJIT_A= libluajit.a
LUAJIT_SO= libluajit.so LUAJIT_SO= libluajit.so
@ -82,12 +82,12 @@
ALL_HDRGEN= lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h \ ALL_HDRGEN= lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h \
--- a/src/luaconf.h --- a/src/luaconf.h
+++ b/src/luaconf.h +++ b/src/luaconf.h
@@ -37,7 +37,7 @@ @@ -51,7 +51,7 @@
#endif #endif
#define LUA_LROOT "/usr/local"
#define LUA_LUADIR "/lua/5.1/"
-#define LUA_LJDIR "/luajit-2.1/"
+#define LUA_LJDIR "/luajit-5_1-2.1/"
#ifdef LUA_ROOT #ifndef LUA_LJDIR
#define LUA_JROOT LUA_ROOT -#define LUA_LJDIR LUA_JROOT "/share/luajit-2.1"
+#define LUA_LJDIR "/luajit-5_1-2.1/"
#endif
#define LUA_JPATH ";" LUA_LJDIR "/?.lua"

View File

@ -1,7 +1,7 @@
From ad1d41ea8bd3454c066172c99e94cc6848e470ce Mon Sep 17 00:00:00 2001 From dee73f516f0da49e930dcfa1dd61720dcb69b7dd Mon Sep 17 00:00:00 2001
From: Ilya Leoshkevich <iii@linux.ibm.com> From: Ilya Leoshkevich <iii@linux.ibm.com>
Date: Fri, 11 Aug 2023 13:51:19 +0200 Date: Thu, 31 Aug 2023 11:18:32 +0200
Subject: [PATCH] Add s390x architecture support Subject: [PATCH 1/2] Add s390x architecture support to DynASM
s390x (IBM Z) is an architecture of server computers produced by IBM. s390x (IBM Z) is an architecture of server computers produced by IBM.
It is supported by a number of open source code generators, such as It is supported by a number of open source code generators, such as
@ -11,12 +11,12 @@ missing pieces in the ecosystem support is LuaJIT.
The s390x support for LuaJIT was initially developed by @ketank-new, The s390x support for LuaJIT was initially developed by @ketank-new,
@mundaym and @niravthakkar. It found its way into moonjit and luajit2 @mundaym and @niravthakkar. It found its way into moonjit and luajit2
forks, as well as Fedora distro (as a patch). There were also smaller forks, as well as Fedora distro (as a patch). There were also smaller
contributions by @preetikhorjuvenkar, @Bisht13, @velemas and @iii-i. contributions by @preetikhorjuvenkar, @Bisht13, @velemas,
@AlekseiNikiforovIBM, and @iii-i.
This is a cumulative patch of the work mentioned above. It contains This is a cumulative patch of the DynASM changes from this work. It
all the contributions squashed together, plus minor stylistic contains all the contributions squashed together, plus minor stylistic
cleanups. It passes all the tests from LuaJIT-test-cleanup, except cleanups.
for contents.lua, which fails on x86_64 as well.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
--- ---
@ -25,24 +25,22 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
src/Makefile | 4 src/Makefile | 4
src/host/buildvm.c | 2 src/host/buildvm.c | 2
src/host/buildvm_asm.c | 53 src/host/buildvm_asm.c | 53
src/jit/bcsave.lua | 1
src/jit/dis_s390x.lua | 1 src/jit/dis_s390x.lua | 1
src/lib_jit.c | 2 src/lib_jit.c | 2
src/lj_arch.h | 19 src/lj_arch.h | 19
src/lj_asm.c | 2 src/lj_asm.c | 2
src/lj_ccall.c | 47 src/lj_ccall.c | 50
src/lj_ccall.h | 15 src/lj_ccall.h | 15
src/lj_ccallback.c | 9 src/lj_ccallback.c | 9
src/lj_err.c | 3 src/lj_err.c | 3
src/lj_frame.h | 14 src/lj_frame.h | 14
src/lj_target.h | 2 src/lj_target.h | 2
src/lj_target_s390x.h | 80 src/lj_target_s390x.h | 80
src/vm_s390x.dasc | 4261 +++++++++++++++++++++++++++++++++++++++++++++++++ src/vm_s390x.dasc | 4269 +++++++++++++++++++++++++++++++++++++++++++++++++
17 files changed, 6693 insertions(+), 1 deletion(-) 18 files changed, 6706 insertions(+)
create mode 100644 dynasm/dasm_s390x.h create mode 100644 dynasm/dasm_s390x.h
create mode 100644 dynasm/dasm_s390x.lua create mode 100644 dynasm/dasm_s390x.lua
create mode 100644 src/jit/dis_s390x.lua
create mode 100644 src/lj_target_s390x.h
create mode 100644 src/vm_s390x.dasc
--- /dev/null --- /dev/null
+++ b/dynasm/dasm_s390x.h +++ b/dynasm/dasm_s390x.h
@ -2337,13 +2335,23 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
#else #else
emit_asm_words(ctx, ctx->code+ofs, next-ofs); emit_asm_words(ctx, ctx->code+ofs, next-ofs);
#endif #endif
--- a/src/jit/bcsave.lua
+++ b/src/jit/bcsave.lua
@@ -101,6 +101,7 @@ local map_arch = {
mips64el = { e = "le", b = 64, m = 8, f = 0x80000007, },
mips64r6 = { e = "be", b = 64, m = 8, f = 0xa0000407, },
mips64r6el = { e = "le", b = 64, m = 8, f = 0xa0000407, },
+ s390x = { e = "be", b = 64, m = 22, },
}
local map_os = {
--- /dev/null --- /dev/null
+++ b/src/jit/dis_s390x.lua +++ b/src/jit/dis_s390x.lua
@@ -0,0 +1 @@ @@ -0,0 +1 @@
+-- Not yet implemented. +-- Not yet implemented.
--- a/src/lib_jit.c --- a/src/lib_jit.c
+++ b/src/lib_jit.c +++ b/src/lib_jit.c
@@ -720,6 +720,8 @@ static uint32_t jit_cpudetect(void) @@ -702,6 +702,8 @@ static uint32_t jit_cpudetect(void)
} }
#endif #endif
@ -2365,14 +2373,14 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
#define LUAJIT_OS_OTHER 0 #define LUAJIT_OS_OTHER 0
@@ -59,6 +61,8 @@ @@ -59,6 +61,8 @@
#define LUAJIT_TARGET LUAJIT_ARCH_ARM #define LUAJIT_TARGET LUAJIT_ARCH_ARM
#elif defined(__aarch64__) #elif defined(__aarch64__) || defined(_M_ARM64)
#define LUAJIT_TARGET LUAJIT_ARCH_ARM64 #define LUAJIT_TARGET LUAJIT_ARCH_ARM64
+#elif defined(__s390x__) || defined(__s390x) +#elif defined(__s390x__) || defined(__s390x)
+#define LUAJIT_TARGET LUAJIT_ARCH_S390X +#define LUAJIT_TARGET LUAJIT_ARCH_S390X
#elif defined(__ppc__) || defined(__ppc) || defined(__PPC__) || defined(__PPC) || defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) || defined(__POWERPC) || defined(_M_PPC) #elif defined(__ppc__) || defined(__ppc) || defined(__PPC__) || defined(__PPC) || defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) || defined(__POWERPC) || defined(_M_PPC)
#define LUAJIT_TARGET LUAJIT_ARCH_PPC #define LUAJIT_TARGET LUAJIT_ARCH_PPC
#elif defined(__mips64__) || defined(__mips64) || defined(__MIPS64__) || defined(__MIPS64) #elif defined(__mips64__) || defined(__mips64) || defined(__MIPS64__) || defined(__MIPS64)
@@ -438,6 +442,21 @@ @@ -439,6 +443,21 @@
#define LJ_ARCH_VERSION 10 #define LJ_ARCH_VERSION 10
#endif #endif
@ -2396,7 +2404,7 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
#endif #endif
--- a/src/lj_asm.c --- a/src/lj_asm.c
+++ b/src/lj_asm.c +++ b/src/lj_asm.c
@@ -1704,6 +1704,8 @@ static void asm_loop(ASMState *as) @@ -1708,6 +1708,8 @@ static void asm_loop(ASMState *as)
#include "lj_asm_ppc.h" #include "lj_asm_ppc.h"
#elif LJ_TARGET_MIPS #elif LJ_TARGET_MIPS
#include "lj_asm_mips.h" #include "lj_asm_mips.h"
@ -2448,24 +2456,27 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
#else #else
#error "Missing calling convention definitions for this architecture" #error "Missing calling convention definitions for this architecture"
#endif #endif
@@ -990,7 +1024,7 @@ static int ccall_set_args(lua_State *L, @@ -999,6 +1033,9 @@ static int ccall_set_args(lua_State *L,
CTypeID did;
CType *d; CType *d;
CTSize sz; CTSize sz;
- MSize n, isfp = 0, isva = 0; MSize n, isfp = 0, isva = 0;
+ MSize n, isfp = 0, isva = 0, onstack = 0; +#if LJ_TARGET_S390X
+ MSize onstack = 0;
+#endif
void *dp, *rp = NULL; void *dp, *rp = NULL;
if (fid) { /* Get argument type from field. */ if (fid) { /* Get argument type from field. */
@@ -1029,6 +1063,7 @@ static int ccall_set_args(lua_State *L, @@ -1037,6 +1074,9 @@ static int ccall_set_args(lua_State *L,
CCALL_HANDLE_REGARG /* Handle register arguments. */ CCALL_HANDLE_REGARG /* Handle register arguments. */
/* Otherwise pass argument on stack. */ /* Otherwise pass argument on stack. */
+#if LJ_TARGET_S390X
+ onstack = 1; + onstack = 1;
+#endif
if (CCALL_ALIGN_STACKARG) { /* Align argument on stack. */ if (CCALL_ALIGN_STACKARG) { /* Align argument on stack. */
MSize align = (1u << ctype_align(d->info)) - 1; MSize align = (1u << ctype_align(d->info)) - 1;
if (rp || (CCALL_PACK_STACKARG && isva && align < CTSIZE_PTR-1)) if (rp || (CCALL_PACK_STACKARG && isva && align < CTSIZE_PTR-1))
@@ -1073,6 +1108,16 @@ static int ccall_set_args(lua_State *L, @@ -1086,6 +1126,16 @@ static int ccall_set_args(lua_State *L,
*(int64_t *)dp = (int64_t)*(int32_t *)dp; /* Sign-extend to 64 bit. */ *(int64_t *)dp = (int64_t)*(int32_t *)dp; /* Sign-extend to 64 bit. */
} }
#endif #endif
@ -2526,7 +2537,7 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
#endif #endif
--- a/src/lj_err.c --- a/src/lj_err.c
+++ b/src/lj_err.c +++ b/src/lj_err.c
@@ -419,6 +419,9 @@ LJ_FUNCA int lj_err_unwind_dwarf(int ver @@ -442,6 +442,9 @@ LJ_FUNCA int lj_err_unwind_dwarf(int ver
if (version != 1) if (version != 1)
return _URC_FATAL_PHASE1_ERROR; return _URC_FATAL_PHASE1_ERROR;
cf = (void *)_Unwind_GetCFA(ctx); cf = (void *)_Unwind_GetCFA(ctx);
@ -2561,7 +2572,7 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
#endif #endif
--- a/src/lj_target.h --- a/src/lj_target.h
+++ b/src/lj_target.h +++ b/src/lj_target.h
@@ -146,6 +146,8 @@ typedef uint32_t RegCost; @@ -143,6 +143,8 @@ typedef uint32_t RegCost;
#include "lj_target_ppc.h" #include "lj_target_ppc.h"
#elif LJ_TARGET_MIPS #elif LJ_TARGET_MIPS
#include "lj_target_mips.h" #include "lj_target_mips.h"
@ -2655,7 +2666,7 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
+#endif +#endif
--- /dev/null --- /dev/null
+++ b/src/vm_s390x.dasc +++ b/src/vm_s390x.dasc
@@ -0,0 +1,4261 @@ @@ -0,0 +1,4269 @@
+|// Low-level VM code for IBM z/Architecture (s390x) CPUs in LJ_GC64 mode. +|// Low-level VM code for IBM z/Architecture (s390x) CPUs in LJ_GC64 mode.
+|// Bytecode interpreter, fast functions and helper functions. +|// Bytecode interpreter, fast functions and helper functions.
+|// Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h +|// Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h
@ -3967,6 +3978,10 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
+ |//-- Base library: catch errors ---------------------------------------- + |//-- Base library: catch errors ----------------------------------------
+ | + |
+ |.ffunc_1 pcall + |.ffunc_1 pcall
+ | lg L:RB, SAVE_L
+ | sllg RA, NARGS:RD, 3
+ | la RA, 0(RA, BASE)
+ | clg RA, L:RB->maxstack; jh ->fff_fallback
+ | la RA, 16(BASE) + | la RA, 16(BASE)
+ | aghi NARGS:RD, -1 + | aghi NARGS:RD, -1
+ | lghi PC, 16+FRAME_PCALL + | lghi PC, 16+FRAME_PCALL
@ -3986,6 +4001,10 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
+ | j ->vm_call_dispatch + | j ->vm_call_dispatch
+ | + |
+ |.ffunc_2 xpcall + |.ffunc_2 xpcall
+ | lg L:RB, SAVE_L
+ | sllg RA, NARGS:RD, 3
+ | la RA, 0(RA, BASE)
+ | clg RA, L:RB->maxstack; jh ->fff_fallback
+ | lg LFUNC:RA, 8(BASE) + | lg LFUNC:RA, 8(BASE)
+ | checktp_nc LFUNC:RA, LJ_TFUNC, ->fff_fallback + | checktp_nc LFUNC:RA, LJ_TFUNC, ->fff_fallback
+ | lg LFUNC:RB, 0(BASE) // Swap function and traceback. + | lg LFUNC:RB, 0(BASE) // Swap function and traceback.

View File

@ -1,3 +1,194 @@
-------------------------------------------------------------------
Fri Dec 6 07:23:43 UTC 2024 - Adrian Schröter <adrian@suse.de>
- No loongarch64 support yet
- turn around the logic to known supported architectures
-------------------------------------------------------------------
Wed Nov 20 07:23:12 UTC 2024 - mcepl@cepl.eu
- Update to version 5.1.2.1.0+git.1731601260.fe71d0f:
* Windows: Allow amalgamated static builds with msvcbuild.bat.
* Always close profiler output file.
* Fix override of INSTALL_LJLIBD in the presence of DESTDIR.
* Fix bit op coercion for shifts in DUALNUM builds.
-------------------------------------------------------------------
Wed Nov 06 16:31:22 UTC 2024 - mcepl@cepl.eu
- Update to version 5.1.2.1.0+git.1727870382.97813fb:
* macOS: Remove obsolete -single_module flag.
* macOS: Workaround for buggy XCode 15.0 - 15.2 linker.
* macOS: Fix macOS 15 / Clang 16 build.
* Fix bit op coercion in DUALNUM builds.
* Fix compiliation of getmetatable() for UDTYPE_IO_FILE.
* Remove ancient RtlUnwindEx workaround for MinGW64.
* Drop unused function wrapper.
-------------------------------------------------------------------
Wed Nov 6 16:25:34 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Update luajit-s390x.patch from
gh#openresty/luajit2!195 (following the advice on
gh#LuaJIT/LuaJIT!631#issuecomment-2459913131).
-------------------------------------------------------------------
Mon Aug 26 18:41:09 UTC 2024 - mcepl@cepl.eu
- Update to version 5.1.2.1.0+git.1724512491.f725e44:
* Fix limit check in narrow_conv_backprop().
* Always use IRT_NIL for IR_TBAR.
* ARM64: Use ldr literal to load FP constants.
* FFI: Add missing coercion when recording 64-bit bit.*().
* ARM64: Make tobit conversions match JIT backend behavior.
* ARM: Make hard-float tobit conversions match JIT backend behavior.
* FFI: Drop finalizer table rehash after GC cycle.
* Fix another potential file descriptor leak in luaL_loadfile*().
* MIPS32: Fix little-endian IR_RETF.
* Correctly close VM state after early OOM during open.
* Fix potential file descriptor leak in luaL_loadfile*().
* Reflect override of INSTALL_LJLIBD in package.path.
* ARM64: Use movi to materialize FP constants.
* Add more FOLD rules for integer conversions.
* Different fix for partial snapshot restore due to stack overflow.
* Fix IR_ABC hoisting.
* Limit CSE for IR_CARG to fix loop optimizations.
* Call math.randomseed() without arguments to seed from system entropy.
* Restore state when recording __concat metamethod throws an error.
* Add build flag LUAJIT_DISABLE_TAILCALL to disable tailcall generation.
* Clarify that lj_buf_shrink() does not keep any buffer data.
* OSX: Fix installed luajit.pc.
* FFI: Fix various issues in recff_cdata_arith.
* Fix predict_next() in parser (for real now).
* FFI: Fix __tostring metamethod access to enum cdata value.
* Fix typo.
* Handle partial snapshot restore due to stack overflow.
* Update Nintendo Switch build script.
* Prevent sanitizer warning in snap_restoredata().
* Typo.
* Limit number of string format elements to compile.
* FFI: Clarify scalar boxing behavior.
* Fix internal link in docs.
* OSX/iOS: Fix SDK incompatibility.
* Windows/MSVC: Cleanup msvcbuild.bat and always generate PDB.
* Fix segment release check in internal memory allocator.
* Fix compiler warning.
* FFI: Turn FFI finalizer table into a proper GC root.
* OSX/iOS: Always generate 64 bit non-FAT Mach-O object files.
* Show name of NYI bytecode in -jv and -jdump.
* Use generic trace error for OOM during trace stitching.
* Fix serialization format docs.
* Handle all types of errors during trace stitching.
* Fix recording of __concat metamethod.
* Prevent down-recursion for side traces.
* Check frame size limit before returning to a lower frame.
* FFI: Treat cdata finalizer table as a GC root.
* Handle stack reallocation in debug.setmetatable() and lua_setmetatable().
- Update patches:
- luajit-lua-versioned.patch
- luajit-s390x.patch (update to the latest base code)
-------------------------------------------------------------------
Fri Mar 01 20:05:18 UTC 2024 - mcepl@cepl.eu
- Update to version 5.1.2.1.0+git.1707061634.0d313b2:
* Rework stack overflow handling.
* Preserve keys with dynamic values in template tables when saving bytecode.
* Prevent include of luajit_rolling.h.
* Fix documentation bug about '\z' string escape.
* Fix zero stripping in %g number formatting.
* Fix unsinking of IR_FSTORE for NULL metatable.
* DynASM/x86: Add endbr instruction.
* MIPS64 R2/R6: Fix FP to integer conversions.
* Add cross-32/64 bit and deterministic bytecode generation.
* DynASM/x86: Allow [&expr] operand.
* Check for IR_HREF vs. IR_HREFK aliasing in non-nil store check.
* Respect jit.off() on pending trace exit.
* Simplify handling of instable types in TNEW/TDUP load forwarding.
* Only emit proper parent references in snapshot replay.
* Fix anchoring for string buffer set() method (again).
* ARM: Fix stack restore for FP slots.
* Document workaround for multilib vs. cross-compiler conflict.
* Fix anchoring for string buffer set() method.
* Fix runtime library flags for MSVC debug builds.
* Fix .debug_abbrev section in GDB JIT API.
* Optimize table.new() with constant args to (sinkable) IR_TNEW.
* Emit sunk IR_NEWREF only once per key on snapshot replay.
* Fix last commit.
* x86/x64: Don't fuse loads across IR_NEWREF.
* Improve last commit.
* x86/x64: Don't fuse loads across table.clear.
* x86/x64: Add more red zone checks to assembler backend.
* Add stack check to pcall/xpcall.
* Invalidate SCEV entry when returning to lower frame.
* FFI: Fix pragma push stack limit check and throw on overflow.
* ARM64: Fix disassembly of ldp/stp offsets.
* Check for upvalue state transition in IR_UREFO.
* x64: Properly fix __call metamethod return dispatch.
* Windows/x86: _BitScan*64 are only available on 64 bit archs.
* Add 'cc' file type for saving bytecode.
* FFI/Windows: Fix type declaration for int64_t and uint64_t.
* FFI: Fix dangling reference to CType in carith_checkarg().
* DynASM/ARM64: Support ldp/stp of q registers.
* ARM64: Use ADR and ADRP to form constants.
* ARM64: Fix disassembly of U12 loads.
* ARM64: Unify constant register handling in interpreter.
* ARM: Fix register hint for FFI calls with FP results.
* ARM64: Fix register hint for FFI calls with FP results.
* ARM64: Restore fp before sp in C stack unwinders.
* FFI: Fix ffi.abi("pauth").
* Maintain chain invariant in DCE.
* LJ_FR2: Fix stack checks in vararg calls.
* Follow-up fix for stack overflow handling cleanup.
* Handle OOM error on stack resize in coroutine.resume and lua_checkstack.
* Restore cur_L for specific Lua/C API use case.
* Consistently use 64 bit constants for 64 bit IR instructions.
* ARM64: Fix IR_HREF code generation for constant FP keys.
* ARM64: Fuse negative 32 bit constants into arithmetic ops again.
* Handle all stack layouts in (delayed) TRACE vmevent.
* Add missing coercion when recording select(string, ...)
* Cleanup stack overflow handling.
* Windows/ARM64: Add MSVC cross-build support for x64 to ARM64.
* IR_MIN/IR_MAX is non-commutative due to underlying FPU ops.
* ARM64: Set fixed interpreter registers before rethrow.
* Windows/ARM64: Update install docs.
* Windows: Call C++ destructors without compiling with /EHa.
* Windows: Pass scratch CONTEXT record to RtlUnwindEx.
* ARM64: External unwinder already restores non-volatile registers.
* Windows/ARM64: Fix exception unwinding (again).
* Windows/ARM64: Fix typo in exception unwinding.
* FFI: Fix 64 bit shift fold rules.
* Windows/ARM64: Support Windows calling conventions.
* Windows/ARM64: Fix exception unwinding.
* ARM64: Remove unneeded IRCALL_* defs for math intrinsics.
* Fix Cygwin build.
* Allow path overrides in genversion.lua with minilua, too.
* Windows/ARM64: Add initial support.
* Improve architecture detection error messages.
* ARM64: Fuse rotates into logical operands.
* ARM64: Don't fuse sign extensions into logical operands.
* ARM64: Disassemble rotates on logical operands.
* ARM: Fix stack check code generation.
* ARM64: Fix LDP/STP fusion (again).
* ARM64: Ensure branch is in range before emitting TBZ/TBNZ.
* Fix mcode limit check for non-x86 archs.
* ARM64: Improve BC_JLOOP.
* ARM64: Improve integer IR_MUL code generation.
* ARM64: Simplify code generation for IR_STRTO.
* ARM64: Use RID_TMP instead of scratch register in more places.
* ARM64: Improve IR_OBAR code generation.
* ARM64: Improve IR_UREF code generation.
* ARM64: Improve IR_HREF code generation.
* ARM64: Reload BASE via GL instead of spilling it.
* ARM64: Consolidate 32/64-bit constant handling in assembler.
* ARM64: Tune emit_lsptr. Avoid wrong load for asm_prof.
* ARM64: Inline only use of emit_loada.
* ARM64: Improve K13 constant rematerialization.
* Add NaN check to IR_NEWREF.
* Allow override of paths for genversion.lua.
* Fix native MinGW build.
- Also refresh luajit-s390x.patch from the rebased pull request.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 9 20:09:43 UTC 2023 - Matej Cepl <mcepl@cepl.eu> Mon Oct 9 20:09:43 UTC 2023 - Matej Cepl <mcepl@cepl.eu>

View File

@ -1,7 +1,7 @@
# #
# spec file for package luajit # spec file for package luajit
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -19,13 +19,14 @@
# These numbers are from readelf -a /usr/lib*/lib*.so* |grep soname (dots replaced by underscores) # These numbers are from readelf -a /usr/lib*/lib*.so* |grep soname (dots replaced by underscores)
%define lib_version 5_1 %define lib_version 5_1
%define so_version 2 %define so_version 2
%define upname LuaJIT
Name: luajit Name: luajit
Version: 5.1.2.1.0+git.1693350652.41fb94d Version: 5.1.2.1.0+git.1731601260.fe71d0f
Release: 0 Release: 0
Summary: JIT compiler for Lua language Summary: JIT compiler for Lua language
License: MIT License: MIT
URL: https://luajit.org/ URL: https://luajit.org/
Source0: %{name}-%{version}.tar.xz Source0: %{upname}-%{version}.tar.xz
Source1: baselibs.conf Source1: baselibs.conf
# PATCH-FIX-OPENSUSE luajit-lua-versioned.patch mcepl@suse.com # PATCH-FIX-OPENSUSE luajit-lua-versioned.patch mcepl@suse.com
# Because we obsolete moonjit with version number higher than %%{version} we have to emulate Epoch # Because we obsolete moonjit with version number higher than %%{version} we have to emulate Epoch
@ -49,7 +50,7 @@ Obsoletes: lua51-luajit <= 2.2.0
Provides: moonjit = %{version}-%{release} Provides: moonjit = %{version}-%{release}
Obsoletes: moonjit <= 2.2.0 Obsoletes: moonjit <= 2.2.0
# lj_arch.h:441:2: error: #error "No target architecture defined" # lj_arch.h:441:2: error: #error "No target architecture defined"
ExcludeArch: riscv64 ppc64 ppc64le ExclusiveArch: x86_64 %ix86 aarch64 %arm ppc mips mips64 mips64el s390x
%description %description
A Just-In-Time Compiler for Lua language A Just-In-Time Compiler for Lua language
@ -73,7 +74,7 @@ Provides: libluajit-devel = %{version}-%{release}
Devel files for luajit package Devel files for luajit package
%prep %prep
%autosetup -p1 %autosetup -p1 -n %{upname}-%{version}
# Fix variables # Fix variables
sed -i "s,PREFIX= %{_prefix}/local,PREFIX= %{_prefix}," Makefile sed -i "s,PREFIX= %{_prefix}/local,PREFIX= %{_prefix}," Makefile