diff options
author | Mike Pall <mike> | 2023-09-21 02:38:29 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2023-09-21 02:38:29 +0200 |
commit | fca1f51bf8209a41f8d7cd13ff09f113ac0d87b6 (patch) | |
tree | d429d815ad97f140794e4794873d796087168d58 /src | |
parent | 4b605a7da85f4c82d40f54635d1880e1d858c785 (diff) | |
download | luajit-fca1f51bf8209a41f8d7cd13ff09f113ac0d87b6.tar.gz luajit-fca1f51bf8209a41f8d7cd13ff09f113ac0d87b6.tar.bz2 luajit-fca1f51bf8209a41f8d7cd13ff09f113ac0d87b6.zip |
ARM64: Fuse negative 32 bit constants into arithmetic ops again.
Thanks to Peter Cawley. #1065
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_asm_arm64.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h index c2b17737..8673f7df 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h | |||
@@ -222,7 +222,8 @@ static uint32_t asm_fuseopm(ASMState *as, A64Ins ai, IRRef ref, RegSet allow) | |||
222 | return A64F_M(ir->r); | 222 | return A64F_M(ir->r); |
223 | } else if (irref_isk(ref)) { | 223 | } else if (irref_isk(ref)) { |
224 | int64_t k = get_k64val(as, ref); | 224 | int64_t k = get_k64val(as, ref); |
225 | uint32_t m = logical ? emit_isk13(k, irt_is64(ir->t)) : emit_isk12(k); | 225 | uint32_t m = logical ? emit_isk13(k, irt_is64(ir->t)) : |
226 | emit_isk12(irt_is64(ir->t) ? k : (int32_t)k); | ||
226 | if (m) | 227 | if (m) |
227 | return m; | 228 | return m; |
228 | } else if (mayfuse(as, ref)) { | 229 | } else if (mayfuse(as, ref)) { |