Jit64: addx - Skip ADD after MOV when possible
We can get away with skipping the addition when we know we're dealing with a constant zero. Just a MOV will suffice in this case. Once again, we don't bother to add separate handling for when overflow is needed, because no titles would ever hit that path during my testing. Before: 8B 7D F8 mov edi,dword ptr [rbp-8] 83 C7 00 add edi,0 After: 8B 7D F8 mov edi,dword ptr [rbp-8]
This commit is contained in:
parent
50f7a7d248
commit
89646c898f
|
@ -1365,7 +1365,10 @@ void Jit64::addx(UGeckoInstruction inst)
|
|||
if (imm >= -128 && imm <= 127)
|
||||
{
|
||||
MOV(32, Rd, Rother);
|
||||
ADD(32, Rd, Rimm);
|
||||
if (imm != 0 || inst.OE)
|
||||
{
|
||||
ADD(32, Rd, Rimm);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue