mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
JIT64: avoid using LEA for adds when not necessary
This commit is contained in:
parent
355850f499
commit
cd0c52b537
@ -1428,13 +1428,6 @@ void Jit64::addx(UGeckoInstruction inst)
|
||||
GenerateConstantOverflow((s64)i + (s64)j);
|
||||
}
|
||||
}
|
||||
else if (gpr.R(a).IsSimpleReg() && gpr.R(b).IsSimpleReg() && !inst.Rc && !inst.OE)
|
||||
{
|
||||
gpr.Lock(a, b, d);
|
||||
gpr.BindToRegister(d, false);
|
||||
LEA(32, gpr.RX(d), MComplex(gpr.RX(a), gpr.RX(b), 1, 0));
|
||||
gpr.UnlockAll();
|
||||
}
|
||||
else if ((d == a) || (d == b))
|
||||
{
|
||||
int operand = ((d == a) ? b : a);
|
||||
@ -1447,6 +1440,15 @@ void Jit64::addx(UGeckoInstruction inst)
|
||||
ComputeRC(gpr.R(d));
|
||||
gpr.UnlockAll();
|
||||
}
|
||||
else if (gpr.R(a).IsSimpleReg() && gpr.R(b).IsSimpleReg() && !inst.OE)
|
||||
{
|
||||
gpr.Lock(a, b, d);
|
||||
gpr.BindToRegister(d, false);
|
||||
LEA(32, gpr.RX(d), MComplex(gpr.RX(a), gpr.RX(b), 1, 0));
|
||||
if (inst.Rc)
|
||||
ComputeRC(gpr.R(d));
|
||||
gpr.UnlockAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
gpr.Lock(a, b, d);
|
||||
|
Loading…
Reference in New Issue
Block a user