diff options
| author | Fiora <fioraaeterna@gmail.com> | 2014-08-24 11:26:46 -0700 |
|---|---|---|
| committer | Fiora <fioraaeterna@gmail.com> | 2014-09-01 20:41:10 -0700 |
| commit | cd0c52b537628cdfcce483cbbbdf310c62666dc0 (patch) | |
| tree | 954d4ef806017f3316f9c5b8aa715a93cec76dcf /Source/Core | |
| parent | 355850f499fd15a5bc6df987040d6c6a0987154b (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.cpp | 16 |
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); |
