-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace luajit patch with ones from kong-ee 2.8.x.x branch
- Loading branch information
Showing
4 changed files
with
173 additions
and
106 deletions.
There are no files selected for viewing
19 changes: 0 additions & 19 deletions
19
...patches/LuaJIT-2.1-20210510_06_Revert_bugfix_fixed_compatibility_regression_with_Mi.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,29 @@ | ||
diff --git a/bundle/LuaJIT-2.1-20231117/src/Makefile b/bundle/LuaJIT-2.1-20231117/src/Makefile | ||
index f87762e..d12217a 100644 | ||
--- a/bundle/LuaJIT-2.1-20231117/src/Makefile | ||
+++ b/bundle/LuaJIT-2.1-20231117/src/Makefile | ||
@@ -527,16 +527,10 @@ LJCORE_O= lj_assert.o lj_gc.o lj_err.o lj_char.o lj_bc.o lj_obj.o lj_buf.o \ | ||
From db0824835876d11bf88b0c8ad9791019ea969ef7 Mon Sep 17 00:00:00 2001 | ||
From: Zhongwei Yao <[email protected]> | ||
Date: Fri, 31 May 2024 11:39:51 -0700 | ||
Subject: [PATCH] Revert "Detect SSE4.2 support dynamically" | ||
|
||
This reverts commit 34b63ba83542cad8675f875c9aa849653ead378d. | ||
--- | ||
src/Makefile | 18 +-- | ||
src/lj_arch.h | 4 - | ||
src/lj_init.c | 69 ------------ | ||
src/lj_jit.h | 1 - | ||
src/lj_str.c | 25 ++--- | ||
src/lj_str.h | 12 -- | ||
src/ljamalg.c | 1 + | ||
.../src/lj_str_hash_x64.h} | 106 +++++++----------- | ||
src/x64/test/benchmark.cxx | 13 +-- | ||
src/x64/test/test.cpp | 10 +- | ||
10 files changed, 64 insertions(+), 195 deletions(-) | ||
delete mode 100644 src/lj_init.c | ||
rename src/{lj_str_hash.c => x64/src/lj_str_hash_x64.h} (76%) | ||
|
||
diff --git a/bundle/LuaJIT-2.1-20210510/src/Makefile b/bundle/LuaJIT-2.1-20210510/src/Makefile | ||
index 287e4cd2..9fcf9316 100644 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/Makefile | ||
+++ b/bundle/LuaJIT-2.1-20210510/src/Makefile | ||
@@ -512,16 +512,10 @@ | ||
lj_ctype.o lj_cdata.o lj_cconv.o lj_ccall.o lj_ccallback.o \ | ||
lj_carith.o lj_clib.o lj_cparse.o \ | ||
lj_lib.o lj_alloc.o lib_aux.o \ | ||
|
@@ -21,7 +42,7 @@ index f87762e..d12217a 100644 | |
|
||
LIB_VMDEF= jit/vmdef.lua | ||
LIB_VMDEFP= $(LIB_VMDEF) | ||
@@ -558,7 +552,7 @@ ALL_RM= $(ALL_T) $(ALL_GEN) *.o host/*.o $(WIN_RM) | ||
@@ -543,7 +537,7 @@ | ||
############################################################################## | ||
|
||
# Mixed mode defaults. | ||
|
@@ -30,7 +51,7 @@ index f87762e..d12217a 100644 | |
TARGET_T= $(LUAJIT_T) $(LUAJIT_SO) | ||
TARGET_DEP= $(LIB_VMDEF) $(LUAJIT_SO) | ||
|
||
@@ -640,7 +634,7 @@ E= @echo | ||
@@ -625,7 +619,7 @@ | ||
default all: $(TARGET_T) | ||
|
||
amalg: | ||
|
@@ -39,7 +60,7 @@ index f87762e..d12217a 100644 | |
|
||
clean: | ||
$(HOST_RM) $(ALL_RM) | ||
@@ -722,8 +716,8 @@ lj_folddef.h: $(BUILDVM_T) lj_opt_fold.c | ||
@@ -702,8 +696,8 @@ | ||
|
||
%.o: %.c | ||
$(E) "CC $@" | ||
|
@@ -50,12 +71,12 @@ index f87762e..d12217a 100644 | |
|
||
%.o: %.S | ||
$(E) "ASM $@" | ||
diff --git a/bundle/LuaJIT-2.1-20231117/src/lj_arch.h b/bundle/LuaJIT-2.1-20231117/src/lj_arch.h | ||
index fbd18b3..2b3a936 100644 | ||
--- a/bundle/LuaJIT-2.1-20231117/src/lj_arch.h | ||
+++ b/bundle/LuaJIT-2.1-20231117/src/lj_arch.h | ||
@@ -220,10 +220,6 @@ | ||
#error "macOS requires GC64 -- don't disable it" | ||
diff --git a/bundle/LuaJIT-2.1-20210510/src/lj_arch.h b/bundle/LuaJIT-2.1-20210510/src/lj_arch.h | ||
index 326c7148..1ea68032 100644 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/lj_arch.h | ||
+++ b/bundle/LuaJIT-2.1-20210510/src/lj_arch.h | ||
@@ -209,10 +209,6 @@ | ||
#define LJ_TARGET_GC64 1 | ||
#endif | ||
|
||
-#ifdef __GNUC__ | ||
|
@@ -65,10 +86,10 @@ index fbd18b3..2b3a936 100644 | |
#elif LUAJIT_TARGET == LUAJIT_ARCH_ARM | ||
|
||
#define LJ_ARCH_NAME "arm" | ||
diff --git a/bundle/LuaJIT-2.1-20231117/src/lj_init.c b/bundle/LuaJIT-2.1-20231117/src/lj_init.c | ||
diff --git a/bundle/LuaJIT-2.1-20210510/src/lj_init.c b/bundle/LuaJIT-2.1-20210510/src/lj_init.c | ||
deleted file mode 100644 | ||
index a6816e1..0000000 | ||
--- a/bundle/LuaJIT-2.1-20231117/src/lj_init.c | ||
index a6816e1e..00000000 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/lj_init.c | ||
+++ /dev/null | ||
@@ -1,69 +0,0 @@ | ||
-#include <stdint.h> | ||
|
@@ -140,31 +161,31 @@ index a6816e1..0000000 | |
- str_hash_init (flags); | ||
-} | ||
-#endif | ||
diff --git a/bundle/LuaJIT-2.1-20231117/src/lj_jit.h b/bundle/LuaJIT-2.1-20231117/src/lj_jit.h | ||
index a60a9ae..c44eaf7 100644 | ||
--- a/bundle/LuaJIT-2.1-20231117/src/lj_jit.h | ||
+++ b/bundle/LuaJIT-2.1-20231117/src/lj_jit.h | ||
@@ -23,7 +23,6 @@ | ||
diff --git a/bundle/LuaJIT-2.1-20210510/src/lj_jit.h b/bundle/LuaJIT-2.1-20210510/src/lj_jit.h | ||
index 8993354f..c834d80a 100644 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/lj_jit.h | ||
+++ b/bundle/LuaJIT-2.1-20210510/src/lj_jit.h | ||
@@ -22,7 +22,6 @@ | ||
#define JIT_F_SSE3 (JIT_F_CPU << 0) | ||
#define JIT_F_SSE4_1 (JIT_F_CPU << 1) | ||
#define JIT_F_BMI2 (JIT_F_CPU << 2) | ||
-#define JIT_F_SSE4_2 (JIT_F_CPU << 3) | ||
|
||
|
||
#define JIT_F_CPUSTRING "\4SSE3\6SSE4.1\4BMI2" | ||
diff --git a/bundle/LuaJIT-2.1-20231117/src/lj_str.c b/bundle/LuaJIT-2.1-20231117/src/lj_str.c | ||
index 1255670..9624cdf 100644 | ||
--- a/bundle/LuaJIT-2.1-20231117/src/lj_str.c | ||
+++ b/bundle/LuaJIT-2.1-20231117/src/lj_str.c | ||
diff --git a/bundle/LuaJIT-2.1-20210510/src/lj_str.c b/bundle/LuaJIT-2.1-20210510/src/lj_str.c | ||
index d37f3b22..c0e2dfad 100644 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/lj_str.c | ||
+++ b/bundle/LuaJIT-2.1-20210510/src/lj_str.c | ||
@@ -12,6 +12,7 @@ | ||
#include "lj_str.h" | ||
#include "lj_char.h" | ||
#include "lj_prng.h" | ||
+#include "x64/src/lj_str_hash_x64.h" | ||
|
||
/* -- String helpers ------------------------------------------------------ */ | ||
|
||
@@ -82,22 +83,9 @@ int lj_str_haspattern(GCstr *s) | ||
/* -- String helpers ------------------------------------------------------ */ | ||
@@ -83,22 +84,9 @@ int lj_str_haspattern(GCstr *s) | ||
|
||
/* -- String hashing ------------------------------------------------------ */ | ||
|
||
|
@@ -189,7 +210,7 @@ index 1255670..9624cdf 100644 | |
{ | ||
/* Constants taken from lookup3 hash by Bob Jenkins. */ | ||
StrHash a, b, h = len ^ (StrHash)seed; | ||
@@ -118,11 +106,12 @@ static StrHash hash_sparse_def(uint64_t seed, const char *str, MSize len) | ||
@@ -119,11 +107,12 @@ static StrHash hash_sparse_def(uint64_t seed, const char *str, MSize len) | ||
h ^= b; h -= lj_rol(b, 16); | ||
return h; | ||
} | ||
|
@@ -205,10 +226,10 @@ index 1255670..9624cdf 100644 | |
{ | ||
StrHash b = lj_bswap(lj_rol(h ^ (StrHash)(seed >> 32), 4)); | ||
if (len > 12) { | ||
diff --git a/bundle/LuaJIT-2.1-20231117/src/lj_str.h b/bundle/LuaJIT-2.1-20231117/src/lj_str.h | ||
index 94537b4..2a5a819 100644 | ||
--- a/bundle/LuaJIT-2.1-20231117/src/lj_str.h | ||
+++ b/bundle/LuaJIT-2.1-20231117/src/lj_str.h | ||
diff --git a/bundle/LuaJIT-2.1-20210510/src/lj_str.h b/bundle/LuaJIT-2.1-20210510/src/lj_str.h | ||
index f7b9234b..28edb5a5 100644 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/lj_str.h | ||
+++ b/bundle/LuaJIT-2.1-20210510/src/lj_str.h | ||
@@ -28,16 +28,4 @@ LJ_FUNC void LJ_FASTCALL lj_str_init(lua_State *L); | ||
#define lj_str_newlit(L, s) (lj_str_new(L, "" s, sizeof(s)-1)) | ||
#define lj_str_size(len) (sizeof(GCstr) + (((len)+4) & ~(MSize)3)) | ||
|
@@ -226,22 +247,22 @@ index 94537b4..2a5a819 100644 | |
-#endif | ||
- | ||
#endif | ||
diff --git a/bundle/LuaJIT-2.1-20231117/src/ljamalg.c b/bundle/LuaJIT-2.1-20231117/src/ljamalg.c | ||
index 9a5108f..f1dce6a 100644 | ||
--- a/bundle/LuaJIT-2.1-20231117/src/ljamalg.c | ||
+++ b/bundle/LuaJIT-2.1-20231117/src/ljamalg.c | ||
@@ -88,3 +88,4 @@ | ||
diff --git a/bundle/LuaJIT-2.1-20210510/src/ljamalg.c b/bundle/LuaJIT-2.1-20210510/src/ljamalg.c | ||
index 36ad2f6d..34922650 100644 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/ljamalg.c | ||
+++ b/bundle/LuaJIT-2.1-20210510/src/ljamalg.c | ||
@@ -87,3 +87,4 @@ | ||
#include "lib_ffi.c" | ||
#include "lib_buffer.c" | ||
#include "lib_kprof.c" | ||
#include "lib_init.c" | ||
+ | ||
diff --git a/bundle/LuaJIT-2.1-20231117/src/lj_str_hash.c b/bundle/LuaJIT-2.1-20231117/src/x64/src/lj_str_hash_x64.h | ||
diff --git a/bundle/LuaJIT-2.1-20210510/src/lj_str_hash.c b/bundle/LuaJIT-2.1-20210510/src/x64/src/lj_str_hash_x64.h | ||
similarity index 76% | ||
rename from bundle/LuaJIT-2.1-20231117/src/lj_str_hash.c | ||
rename to bundle/LuaJIT-2.1-20231117/src/x64/src/lj_str_hash_x64.h | ||
index 0ee4b5f..e653895 100644 | ||
--- a/bundle/LuaJIT-2.1-20231117/src/lj_str_hash.c | ||
+++ b/bundle/LuaJIT-2.1-20231117/src/x64/src/lj_str_hash_x64.h | ||
rename from src/lj_str_hash.c | ||
rename to src/x64/src/lj_str_hash_x64.h | ||
index 0ee4b5f6..e6538953 100644 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/lj_str_hash.c | ||
+++ b/bundle/LuaJIT-2.1-20210510/src/x64/src/lj_str_hash_x64.h | ||
@@ -5,48 +5,23 @@ | ||
* to 128 bytes of given string. | ||
*/ | ||
|
@@ -458,10 +479,10 @@ index 0ee4b5f..e653895 100644 | |
+#undef ARCH_HASH_DENSE | ||
#endif | ||
+#endif /*_LJ_STR_HASH_X64_H_*/ | ||
diff --git a/bundle/LuaJIT-2.1-20231117/src/x64/test/benchmark.cxx b/bundle/LuaJIT-2.1-20231117/src/x64/test/benchmark.cxx | ||
index 1ea8fb6..ee247c1 100644 | ||
--- a/bundle/LuaJIT-2.1-20231117/src/x64/test/benchmark.cxx | ||
+++ b/bundle/LuaJIT-2.1-20231117/src/x64/test/benchmark.cxx | ||
diff --git a/bundle/LuaJIT-2.1-20210510/src/x64/test/benchmark.cxx b/bundle/LuaJIT-2.1-20210510/src/x64/test/benchmark.cxx | ||
index 1ea8fb6b..ee247c1c 100644 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/x64/test/benchmark.cxx | ||
+++ b/bundle/LuaJIT-2.1-20210510/src/x64/test/benchmark.cxx | ||
@@ -1,10 +1,7 @@ | ||
#include <sys/time.h> // for gettimeofday() | ||
extern "C" { | ||
|
@@ -504,10 +525,10 @@ index 1ea8fb6..ee247c1 100644 | |
|
||
conflictWasSparse[h1 & mask]++; | ||
conflictIsSparse[h2 & mask]++; | ||
diff --git a/bundle/LuaJIT-2.1-20231117/src/x64/test/test.cpp b/bundle/LuaJIT-2.1-20231117/src/x64/test/test.cpp | ||
index 432c7bb..75f34e9 100644 | ||
--- a/bundle/LuaJIT-2.1-20231117/src/x64/test/test.cpp | ||
+++ b/bundle/LuaJIT-2.1-20231117/src/x64/test/test.cpp | ||
diff --git a/bundle/LuaJIT-2.1-20210510/src/x64/test/test.cpp b/bundle/LuaJIT-2.1-20210510/src/x64/test/test.cpp | ||
index 432c7bbb..75f34e9f 100644 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/x64/test/test.cpp | ||
+++ b/bundle/LuaJIT-2.1-20210510/src/x64/test/test.cpp | ||
@@ -4,14 +4,10 @@ | ||
#include <map> | ||
#define LUAJIT_SECURITY_STRHASH 1 | ||
|
@@ -536,3 +557,6 @@ index 432c7bb..75f34e9 100644 | |
} | ||
|
||
return true; | ||
-- | ||
2.43.0 | ||
|
30 changes: 30 additions & 0 deletions
30
...patches/LuaJIT-2.1-20210510_08_Revert_bugfix_fixed_compatibility_regression_with_Mi.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 01a9e4c7b67adb9f53cee915633bb754bd9300ee Mon Sep 17 00:00:00 2001 | ||
From: Zhongwei Yao <[email protected]> | ||
Date: Fri, 31 May 2024 11:40:58 -0700 | ||
Subject: [PATCH] Revert "bugfix: fixed compatibility regression with MinGW | ||
gcc" | ||
|
||
This reverts commit b882bdb6d65156249fd9119152826e2d1e0ab01c. | ||
--- | ||
src/x64/src/lj_str_hash_x64.h | 5 ----- | ||
1 file changed, 5 deletions(-) | ||
|
||
diff --git a/bundle/LuaJIT-2.1-20210510/src/x64/src/lj_str_hash_x64.h b/bundle/LuaJIT-2.1-20210510/src/x64/src/lj_str_hash_x64.h | ||
index e6538953..8f6b8e1b 100644 | ||
--- a/bundle/LuaJIT-2.1-20210510/src/x64/src/lj_str_hash_x64.h | ||
+++ b/bundle/LuaJIT-2.1-20210510/src/x64/src/lj_str_hash_x64.h | ||
@@ -21,11 +21,6 @@ | ||
#undef LJ_AINLINE | ||
#define LJ_AINLINE | ||
|
||
-#ifdef __MINGW32__ | ||
-#define random() ((long) rand()) | ||
-#define srandom(seed) srand(seed) | ||
-#endif | ||
- | ||
static const uint64_t* cast_uint64p(const char* str) | ||
{ | ||
return (const uint64_t*)(void*)str; | ||
-- | ||
2.43.0 | ||
|
Oops, something went wrong.