From 6c4826f12c4d33b8b978004bc681eb1eef2be977 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 4 Oct 2022 12:04:17 +0200 Subject: [PATCH] ARM64: Fix IR_SLOAD assembly. Reported by Gate88. --- src/lj_asm_arm64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h index 1f44d023..4b7066f2 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h @@ -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);