diff options
| author | Mike Pall <mike> | 2023-08-28 22:33:54 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2023-08-28 22:33:54 +0200 |
| commit | 0fa2f1cbcf023ad0549f1428809e506fa2c78552 (patch) | |
| tree | 4a9b939886f6e21f9216dda533b64da7df823ab3 | |
| parent | c0d5240a25f2229e9b2d833eb94bccf3f2d5c568 (diff) | |
| download | luajit-0fa2f1cbcf023ad0549f1428809e506fa2c78552.tar.gz luajit-0fa2f1cbcf023ad0549f1428809e506fa2c78552.tar.bz2 luajit-0fa2f1cbcf023ad0549f1428809e506fa2c78552.zip | |
ARM64: Fix LDP/STP fusing for unaligned accesses.
Thanks to Peter Cawley. #1056
| -rw-r--r-- | src/lj_emit_arm64.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h index 52d010b8..6926c71a 100644 --- a/src/lj_emit_arm64.h +++ b/src/lj_emit_arm64.h | |||
| @@ -142,7 +142,7 @@ static void emit_lso(ASMState *as, A64Ins ai, Reg rd, Reg rn, int64_t ofs) | |||
| 142 | } else { | 142 | } else { |
| 143 | goto nopair; | 143 | goto nopair; |
| 144 | } | 144 | } |
| 145 | if (ofsm >= (int)((unsigned int)-64<<sc) && ofsm <= (63<<sc)) { | 145 | if (lj_ror((unsigned int)ofsm + (64u<<sc), sc) <= 127u) { |
| 146 | *as->mcp = aip | A64F_N(rn) | (((ofsm >> sc) & 0x7f) << 15) | | 146 | *as->mcp = aip | A64F_N(rn) | (((ofsm >> sc) & 0x7f) << 15) | |
| 147 | (ai ^ ((ai == A64I_LDRx || ai == A64I_STRx) ? 0x50000000 : 0x90000000)); | 147 | (ai ^ ((ai == A64I_LDRx || ai == A64I_STRx) ? 0x50000000 : 0x90000000)); |
| 148 | return; | 148 | return; |
