Add RISC-V 64 Support for LuaJIT v2.1#236
Conversation
|
Oops, seems we have some issues with amd64 target…… |
Should have been fixed. |
b2c6b14 to
74fe9b0
Compare
|
Can we rerun Travis CI? |
I'll do a patch refresh soon. Btw, I'm considering dropping DynASM |
74fe9b0 to
72932c4
Compare
Done, all passing. |
|
@zhuizhuhaomeng PTAL, thanks |
cac9628 to
59e9671
Compare
59e9671 to
f25e678
Compare
4e7448d to
887b468
Compare
3a2022a to
ea214b2
Compare
|
@zhuizhuhaomeng Could you please take a look? 😇 |
|
Is there a chance this can be reviewed? |
Ultimately, it depends on upstream opinion (i.e., Mike). I am currently employed full-time at PLCT Lab. As Mike focuses on version 3.0, we will ensure that a functional fork for version 2.1 is available. |
|
@andreas-schwab I've identified the bug and drafted a patch. Again, thanks for your report! diff --git a/src/vm_riscv64.dasc b/src/vm_riscv64.dasc
index 8ba54b50..3e60f3cd 100644
--- a/src/vm_riscv64.dasc
+++ b/src/vm_riscv64.dasc
@@ -2876,8 +2876,10 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
| // Check if RA or RD is a cdata.
| xori TMP0, CARG3, LJ_TCDATA
| xori TMP1, CARG4, LJ_TCDATA
- | and TMP0, TMP0, TMP1
- | bxeqz TMP0, ->vmeta_equal_cd
+ | seqz TMP0, TMP0
+ | seqz TMP1, TMP1
+ | or TMP0, TMP0, TMP1
+ | bxnez TMP0, ->vmeta_equal_cd
|.endif
| lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4
| decode_BC4b TMP2 |
|
Thanks, I can confirm that this fixes the problem. |
Co-authored-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Current SIGILL handler appears to have weird issues with libluajit on some platform. Considering 6.6 kernel is becoming more common, switch to HWPROBE for better compatibility.
f8b9fbb to
8f5c498
Compare
|
Bumped to LJRV 1ce02dd, based-off OpenResty LuaJIT v2.1-20260606. |
https://build.opensuse.org/request/show/1359644 by user mcepl + anag_factory - riscv64-support.patch: apply bugfix from openresty/luajit2/pull/236#issuecomment-4706366520
This set of patches adds support for RV64G LP64D on Linux, with full interpreter and JIT support.
Patch ported from PLCT LuaJIT, tested with LuaJIT/LuaJIT-test-cleanup.
See also upstream pr LuaJIT/LuaJIT#1267