mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-30 15:32:47 +00:00
Jit64: subfx - Use LEA when possible
Similar to what we do for addx. Since we're calculating b - a and because subtraction is not communitative, we can only apply this when source register a holds the constant. Before: 45 8B EE mov r13d,r14d 41 83 ED 08 sub r13d,8 After: 45 8D 6E F8 lea r13d,[r14-8]
This commit is contained in:
parent
89646c898f
commit
19dda51a0d
@ -932,6 +932,10 @@ void Jit64::subfx(UGeckoInstruction inst)
|
|||||||
MOV(32, Rd, Rb);
|
MOV(32, Rd, Rb);
|
||||||
SUB(32, Rd, R(RSCRATCH));
|
SUB(32, Rd, R(RSCRATCH));
|
||||||
}
|
}
|
||||||
|
else if (Rb.IsSimpleReg() && Ra.IsImm() && !inst.OE)
|
||||||
|
{
|
||||||
|
LEA(32, Rd, MDisp(Rb.GetSimpleReg(), -Ra.SImm32()));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MOV(32, Rd, Rb);
|
MOV(32, Rd, Rb);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user