]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
ARM64: Fix assembly of HREFK.
authorMike Pall <mike>
Sun, 9 Jul 2023 19:15:01 +0000 (21:15 +0200)
committerMike Pall <mike>
Sun, 9 Jul 2023 19:15:01 +0000 (21:15 +0200)
Reported by caohongqing. #1026
Fix contributed by Peter Cawley.

src/lj_asm_arm64.h

index 805ea54bb9e33a4ee01e9d77fa6dcfbf3e3a9c01..95138fe919640410a3571bf11e9372c3978a88f5 100644 (file)
@@ -909,7 +909,7 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
   IRIns *irkey = IR(kslot->op1);
   int32_t ofs = (int32_t)(kslot->op2 * sizeof(Node));
   int32_t kofs = ofs + (int32_t)offsetof(Node, key);
-  int bigofs = !emit_checkofs(A64I_LDRx, ofs);
+  int bigofs = !emit_checkofs(A64I_LDRx, kofs);
   Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE;
   Reg node = ra_alloc1(as, ir->op1, RSET_GPR);
   Reg key, idx = node;