Ilya Leoshkevich
035f133798
Add s390x architecture support
...
This is a cumulative patch that adds the s390x LuaJIT implementation
by @ketank-new, @mundaym and @niravthakkar and others. It contains all
their contributions squashed together, plus minor stylistic cleanups.
It passes all the tests from LuaJIT-test-cleanup, except for
contents.lua, which fails on x86_64 as well.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
2024-11-14 12:26:21 +01:00
Ilya Leoshkevich
dee73f516f
Add s390x architecture support to DynASM
...
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
GCC, LLVM, OpenJDK, eBPF, QEMU, Valgrind and Cranelift. One of the
missing pieces in the ecosystem support is LuaJIT.
The s390x support for LuaJIT was initially developed by @ketank-new,
@mundaym and @niravthakkar. It found its way into moonjit and luajit2
forks, as well as Fedora distro (as a patch). There were also smaller
contributions by @preetikhorjuvenkar, @Bisht13, @velemas,
@AlekseiNikiforovIBM, and @iii-i.
This is a cumulative patch of the DynASM changes from this work. It
contains all the contributions squashed together, plus minor stylistic
cleanups.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
2024-11-14 12:25:58 +01:00
Mike Pall
69bbf3c1b0
Fix bit op coercion for shifts in DUALNUM builds.
...
Reported by Junlong Li. Followup to #1273
2024-11-13 09:18:32 +01:00
Mike Pall
97813fb924
macOS: Remove obsolete -single_module flag.
...
Thanks to dundargoc. #1284
2024-10-02 13:59:42 +02:00
Mike Pall
b2915e9ab5
macOS: Workaround for buggy XCode 15.0 - 15.2 linker.
...
Thanks to Carlo Cabrera. #1283
2024-10-02 12:12:56 +02:00
Mike Pall
2240d84464
macOS: Fix macOS 15 / Clang 16 build.
...
Note: The -Wl,-no_deduplicate workaround is NOT needed anymore.
Thanks to fxcoudert, corsix, clason, baconpaul, mvf. #1275 #1266
2024-10-02 02:06:25 +02:00
Mike Pall
f5fd22203e
Fix bit op coercion in DUALNUM builds.
...
Thanks to Sergey Kaplun. #1273
2024-09-29 16:46:29 +02:00
Mike Pall
0ae532c9aa
Merge branch 'master' into v2.1
2024-09-29 16:11:15 +02:00
Mike Pall
5141cbc20c
Fix compiliation of getmetatable() for UDTYPE_IO_FILE.
...
Reported by Sergey Bronnikov. #1279
2024-09-29 16:03:37 +02:00
Mike Pall
c63a160706
Remove ancient RtlUnwindEx workaround for MinGW64.
...
Thanks to Kacper Michajłow. #1272
2024-09-29 15:33:32 +02:00
Mike Pall
87ae18af97
Drop unused function wrapper.
...
Follow-up to #1247 .
2024-09-04 14:32:08 +02:00
Mike Pall
f725e44cda
Merge branch 'master' into v2.1
2024-08-24 17:14:51 +02:00
Mike Pall
e45fd4cb71
Fix limit check in narrow_conv_backprop().
...
Thanks to Sergey Kaplun. #1262
2024-08-24 17:11:45 +02:00
Mike Pall
9bb6b35f7f
Always use IRT_NIL for IR_TBAR.
...
Thanks to Peter Cawley. #1258
2024-08-24 17:03:17 +02:00
Mike Pall
c68711cc87
ARM64: Use ldr literal to load FP constants.
...
Thanks to Peter Cawley. #1255
2024-08-21 11:31:29 +02:00
Mike Pall
304da39cc5
FFI: Add missing coercion when recording 64-bit bit.*().
...
Thanks to Peter Cawley. #1252
2024-08-20 19:13:59 +02:00
Mike Pall
cdc2db3aea
ARM64: Make tobit conversions match JIT backend behavior.
...
Thanks to Peter Cawley. #1253
2024-08-20 19:01:51 +02:00
Mike Pall
f4fa5646a8
Merge branch 'master' into v2.1
2024-08-20 19:01:38 +02:00
Mike Pall
32a683d226
ARM: Make hard-float tobit conversions match JIT backend behavior.
...
Reported by Peter Cawley. #1253
2024-08-20 19:00:47 +02:00
Mike Pall
fb22d0f80f
FFI: Drop finalizer table rehash after GC cycle.
...
Reported by Sergey Kaplun. #1247
2024-08-19 20:00:21 +02:00
Mike Pall
fb5e1c9f0d
Merge branch 'master' into v2.1
2024-08-19 17:33:23 +02:00
Mike Pall
ab39082fdd
Fix another potential file descriptor leak in luaL_loadfile*().
...
Reported by Peter Cawley. #1249
2024-08-19 17:31:15 +02:00
Mike Pall
fddc9650d8
Merge branch 'master' into v2.1
2024-08-19 16:22:55 +02:00
Mike Pall
bcc6cbb188
MIPS32: Fix little-endian IR_RETF.
...
Thanks to Peter Cawley. #1250
2024-08-19 16:17:44 +02:00
Mike Pall
5ca25ee83e
Correctly close VM state after early OOM during open.
...
Reported by Assumeru. #1248
2024-08-19 16:14:55 +02:00
Mike Pall
19db4e9b7c
Fix potential file descriptor leak in luaL_loadfile*().
...
Reported by Assumeru. #1249
2024-08-19 16:11:36 +02:00
Mike Pall
ae4735f621
Reflect override of INSTALL_LJLIBD in package.path.
...
Suggested by GitSparTV. #1239
2024-08-15 00:38:43 +02:00
Mike Pall
6f834087d0
ARM64: Use movi to materialize FP constants.
...
Thanks to Peter Cawley. #1245
2024-08-15 00:22:47 +02:00
Mike Pall
2d54213e7c
Add more FOLD rules for integer conversions.
...
Thanks to Peter Cawley. #1246
2024-08-15 00:20:54 +02:00
Mike Pall
833600390c
Merge branch 'master' into v2.1
2024-08-15 00:19:35 +02:00
Mike Pall
86e7123bb1
Different fix for partial snapshot restore due to stack overflow.
...
Reported by Junlong Li. Fixed by Peter Cawley. #1196
2024-08-15 00:17:19 +02:00
Mike Pall
7369eff67d
Fix IR_ABC hoisting.
...
Reported by pwnhacker0x18. Fixed by Peter Cawley. #1194
2024-08-15 00:10:01 +02:00
Mike Pall
3bdc6498c4
Limit CSE for IR_CARG to fix loop optimizations.
...
Thanks to Peter Cawley. #1244
2024-08-15 00:07:34 +02:00
Mike Pall
04dca7911e
Call math.randomseed() without arguments to seed from system entropy.
...
Reminder: the math.random() PRNG is NOT SUITABLE FOR CRYPTOGRAPHIC USE.
2024-07-04 01:26:29 +02:00
Mike Pall
7421a1b33c
Restore state when recording __concat metamethod throws an error.
...
Thanks to Sergey Kaplun. #1234
2024-07-04 00:48:49 +02:00
Mike Pall
510f88d468
Add build flag LUAJIT_DISABLE_TAILCALL to disable tailcall generation.
...
Only use this for debugging purposes. NEVER set it for regular builds
or distro builds! In Lua, tailcalls are a language guarantee.
Suggested by Steve Vermeulen. #1220
2024-07-04 00:13:58 +02:00
Mike Pall
444c8ff19a
Clarify that lj_buf_shrink() does not keep any buffer data.
...
https://www.freelists.org/post/luajit/lj-buf-shrink-may-truncate-the-data-and-sbw-point-over-the-end-of-the-buffer,1
Thanks to Junlong li.
2024-07-04 00:03:40 +02:00
Mike Pall
747fc02eb9
OSX: Fix installed luajit.pc.
...
Reported by leleliu008. #1221
2024-07-03 23:59:59 +02:00
Mike Pall
8038430110
Merge branch 'master' into v2.1
2024-07-03 23:59:03 +02:00
Mike Pall
7a608e4425
FFI: Fix various issues in recff_cdata_arith.
...
Thanks to Sergey Kaplun. #1224
2024-07-03 23:46:47 +02:00
Mike Pall
f602f0154b
Fix predict_next() in parser (for real now).
...
Reported by Sergey Kaplun. #1226 #1054
2024-07-03 23:45:16 +02:00
Mike Pall
f2a1cd4328
FFI: Fix __tostring metamethod access to enum cdata value.
...
Thanks to Sergey Kaplun. #1232
2024-07-03 23:43:57 +02:00
Mike Pall
0f8b878e2f
Fix typo.
...
Reported by Sergey Bronnikov. #1223
2024-07-03 23:43:29 +02:00
Mike Pall
6885efb73e
Merge branch 'master' into v2.1
2024-07-03 23:42:38 +02:00
Mike Pall
811c5322c8
Handle partial snapshot restore due to stack overflow.
...
Reported by pwnhacker0x18. Fixed by Peter Cawley. #1196
2024-07-03 21:42:21 +02:00
Mike Pall
93e87998b2
Update Nintendo Switch build script.
...
Thanks to IoriBranford. #1214
2024-05-25 19:01:18 +02:00
Mike Pall
f5587f5eb3
Merge branch 'master' into v2.1
2024-05-25 16:41:53 +02:00
Mike Pall
4a22050df9
Prevent sanitizer warning in snap_restoredata().
...
Thanks to Sergey Kaplun. #1193
2024-05-25 16:38:05 +02:00
Mike Pall
80c1c65bce
Typo.
2024-05-25 16:25:35 +02:00
Mike Pall
4fc48c50fe
Limit number of string format elements to compile.
...
Reported by pwnhacker0x18. #1203
2024-05-25 16:22:39 +02:00