diff options
author | Mike Pall <mike> | 2022-12-01 12:03:09 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2022-12-01 12:03:09 +0100 |
commit | 564147f518af5a5d8985d9e09fc3a768231f4e75 (patch) | |
tree | c93e9cf493966388973252c2d30af1532f7dd9c0 /src | |
parent | 637721d00f0c9203542657a1acba6f4cc9b78aca (diff) | |
download | luajit-564147f518af5a5d8985d9e09fc3a768231f4e75.tar.gz luajit-564147f518af5a5d8985d9e09fc3a768231f4e75.tar.bz2 luajit-564147f518af5a5d8985d9e09fc3a768231f4e75.zip |
ARM64: Fix code generation for IR_SLOAD with typecheck + conversion.
Reported by memcorrupt.
Diffstat (limited to '')
-rw-r--r-- | src/lj_asm_arm64.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h index 4b7066f2..4e34b3be 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h | |||
@@ -1201,7 +1201,7 @@ dotypecheck: | |||
1201 | tmp = ra_scratch(as, allow); | 1201 | tmp = ra_scratch(as, allow); |
1202 | rset_clear(allow, tmp); | 1202 | rset_clear(allow, tmp); |
1203 | } | 1203 | } |
1204 | if (ra_hasreg(dest) && irt_isnum(t) && !(ir->op2 & IRSLOAD_CONVERT)) | 1204 | if (ra_hasreg(dest) && tmp != dest) |
1205 | emit_dn(as, A64I_FMOV_D_R, (dest & 31), tmp); | 1205 | emit_dn(as, A64I_FMOV_D_R, (dest & 31), tmp); |
1206 | /* Need type check, even if the load result is unused. */ | 1206 | /* Need type check, even if the load result is unused. */ |
1207 | asm_guardcc(as, irt_isnum(t) ? CC_LS : CC_NE); | 1207 | asm_guardcc(as, irt_isnum(t) ? CC_LS : CC_NE); |