Jit64: addx - Emit nothing when possible
When the destination register matches a source register, the other source register contains zero, and overflow isn't needed, the instruction becomes a nop and we don't need to emit anything. We could add specialized handling for the case where overflow is needed, but none of the titles I tried would hit this path. Before: 83 C7 00 add edi,0 After:
This commit is contained in:
parent
f1c3ab359d
commit
1c25e6352a
|
@ -1333,8 +1333,11 @@ void Jit64::addx(UGeckoInstruction inst)
|
|||
if ((d == a) || (d == b))
|
||||
{
|
||||
RCOpArg& Rnotd = (d == a) ? Rb : Ra;
|
||||
if (!Rnotd.IsZero() || inst.OE)
|
||||
{
|
||||
ADD(32, Rd, Rnotd);
|
||||
}
|
||||
}
|
||||
else if (Ra.IsSimpleReg() && Rb.IsSimpleReg() && !inst.OE)
|
||||
{
|
||||
LEA(32, Rd, MRegSum(Ra.GetSimpleReg(), Rb.GetSimpleReg()));
|
||||
|
|
Loading…
Reference in New Issue