JitArm64: cmp - Optimize general case
We can merge an SXTW with the SUB, eliminating one instruction. In addition, it is no longer necessary to allocate a temporary register, reducing register pressure. Before: 0x93407f59 sxtw x25, w26 0x93407ebb sxtw x27, w21 0xcb1b033b sub x27, x25, x27 After: 0x93407f5b sxtw x27, w26 0xcb35c37b sub x27, x27, w21, sxtw
This commit is contained in:
parent
ae6ce1df48
commit
d0de68c41b
|
@ -595,16 +595,11 @@ void JitArm64::cmp(UGeckoInstruction inst)
|
|||
}
|
||||
else
|
||||
{
|
||||
ARM64Reg WA = gpr.GetReg();
|
||||
ARM64Reg XA = EncodeRegTo64(WA);
|
||||
ARM64Reg RA = gpr.R(a);
|
||||
ARM64Reg RB = gpr.R(b);
|
||||
|
||||
SXTW(XA, RA);
|
||||
SXTW(CR, RB);
|
||||
SUB(CR, XA, CR);
|
||||
|
||||
gpr.Unlock(WA);
|
||||
SXTW(CR, RA);
|
||||
SUB(CR, CR, RB, ArithOption(RB, ExtendSpecifier::SXTW));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue