ARM64: Fix IR_SLOAD assembly.

Reported by Gate88.
This commit is contained in:
Mike Pall 2022-10-04 12:04:17 +02:00
parent dad04f1754
commit 6c4826f12c

View 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);