diff options
author | Mike Pall <mike> | 2023-09-09 17:36:40 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2023-09-09 17:36:40 +0200 |
commit | 6c599960d15888baa717956faaae83170188800d (patch) | |
tree | c83679ebca8f50aef979830cc615830da86e6d67 /src | |
parent | 4ed83bd990cbe2062a2a7392d7f5d65bc7c2ba04 (diff) | |
download | luajit-6c599960d15888baa717956faaae83170188800d.tar.gz luajit-6c599960d15888baa717956faaae83170188800d.tar.bz2 luajit-6c599960d15888baa717956faaae83170188800d.zip |
ARM64: Improve integer IR_MUL code generation.
Thanks to Peter Cawley. #1070
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_asm_arm64.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h index d2cb7823..d9866e9d 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h | |||
@@ -1391,8 +1391,7 @@ static void asm_intmul(ASMState *as, IRIns *ir) | |||
1391 | if (irt_isguard(ir->t)) { /* IR_MULOV */ | 1391 | if (irt_isguard(ir->t)) { /* IR_MULOV */ |
1392 | asm_guardcc(as, CC_NE); | 1392 | asm_guardcc(as, CC_NE); |
1393 | emit_dm(as, A64I_MOVw, dest, dest); /* Zero-extend. */ | 1393 | emit_dm(as, A64I_MOVw, dest, dest); /* Zero-extend. */ |
1394 | emit_nm(as, A64I_CMPw | A64F_SH(A64SH_ASR, 31), RID_TMP, dest); | 1394 | emit_nm(as, A64I_CMPx | A64F_EX(A64EX_SXTW), dest, dest); |
1395 | emit_dn(as, A64I_ASRx | A64F_IMMR(32), RID_TMP, dest); | ||
1396 | emit_dnm(as, A64I_SMULL, dest, right, left); | 1395 | emit_dnm(as, A64I_SMULL, dest, right, left); |
1397 | } else { | 1396 | } else { |
1398 | emit_dnm(as, irt_is64(ir->t) ? A64I_MULx : A64I_MULw, dest, left, right); | 1397 | emit_dnm(as, irt_is64(ir->t) ? A64I_MULx : A64I_MULw, dest, left, right); |