summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorFiora <fioraaeterna@gmail.com>2014-08-24 11:26:46 -0700
committerFiora <fioraaeterna@gmail.com>2014-09-01 20:41:10 -0700
commitcd0c52b537628cdfcce483cbbbdf310c62666dc0 (patch)
tree954d4ef806017f3316f9c5b8aa715a93cec76dcf /Source/Core
parent355850f499fd15a5bc6df987040d6c6a0987154b (diff)
JIT64: avoid using LEA for adds when not necessary
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
index 45a164de98..bb3bd15969 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
@@ -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);