JitArm64: Use ADDI2R for psq_lXX/psq_stXX immediate offsets

This simplifies the source code, and slightly improves the emitted code
in some cases.
This commit is contained in:
JosJuice 2023-12-01 21:14:53 +01:00
parent 67791d227c
commit b1987d0187
1 changed files with 2 additions and 6 deletions

View File

@ -58,10 +58,8 @@ void JitArm64::psq_lXX(UGeckoInstruction inst)
{ {
if (indexed) if (indexed)
ADD(addr_reg, gpr.R(inst.RA), gpr.R(inst.RB)); ADD(addr_reg, gpr.R(inst.RA), gpr.R(inst.RB));
else if (offset >= 0)
ADD(addr_reg, gpr.R(inst.RA), offset);
else else
SUB(addr_reg, gpr.R(inst.RA), std::abs(offset)); ADDI2R(addr_reg, gpr.R(inst.RA), offset, addr_reg);
} }
else else
{ {
@ -217,10 +215,8 @@ void JitArm64::psq_stXX(UGeckoInstruction inst)
{ {
if (indexed) if (indexed)
ADD(addr_reg, gpr.R(inst.RA), gpr.R(inst.RB)); ADD(addr_reg, gpr.R(inst.RA), gpr.R(inst.RB));
else if (offset >= 0)
ADD(addr_reg, gpr.R(inst.RA), offset);
else else
SUB(addr_reg, gpr.R(inst.RA), std::abs(offset)); ADDI2R(addr_reg, gpr.R(inst.RA), offset, addr_reg);
} }
else else
{ {