]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
ARM64: Fix IR_SLOAD assembly.
authorMike Pall <mike>
Tue, 4 Oct 2022 10:04:17 +0000 (12:04 +0200)
committerMike Pall <mike>
Tue, 4 Oct 2022 10:04:17 +0000 (12:04 +0200)
Reported by Gate88.

src/lj_asm_arm64.h

index 1f44d023dd73cf38a348884a0791b7cfc8c0165e..4b7066f2827fc23fcf502a0d47e9e3ccf8c9ce18 100644 (file)
@@ -1201,7 +1201,7 @@ dotypecheck:
       tmp = ra_scratch(as, allow);
       rset_clear(allow, tmp);
     }
-    if (irt_isnum(t) && !(ir->op2 & IRSLOAD_CONVERT))
+    if (ra_hasreg(dest) && irt_isnum(t) && !(ir->op2 & IRSLOAD_CONVERT))
       emit_dn(as, A64I_FMOV_D_R, (dest & 31), tmp);
     /* Need type check, even if the load result is unused. */
     asm_guardcc(as, irt_isnum(t) ? CC_LS : CC_NE);