diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2025-07-15 19:54:37 -0400 |
|---|---|---|
| committer | Alan Wu <XrXr@users.noreply.github.com> | 2025-07-16 14:10:22 -0400 |
| commit | 95521324de33c8762eb3807f66dd93b4bd6733e8 (patch) | |
| tree | 1abb627201611d946fa40af89feff2c8e96388e1 /test/prism/errors | |
| parent | 0c26dea5bb49ab98d2248f02cbbae82393a3c844 (diff) | |
ZJIT: A64: Fix bad operand swapping in `asm.sub(imm, reg)`
Previously, my buggy optimization would turn `asm.sub(imm, reg)`
into `subs out, reg, imm` since it runs through the addition path which
relies on the commutative property. Don't do that because subtraction
does not commute. Good thing no one seems to use this form.
Also, delete the 2 regs match arm for Add because it's already covered
by the fallback arm -- both split_load_operand() and
split_shifted_immediate() are no-op when the input is a register.
Fixes: 1317377fa74 ("ZJIT: A64: Have add/sub to SP be
single-instruction")
Diffstat (limited to 'test/prism/errors')
0 files changed, 0 insertions, 0 deletions
