diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index 445f536d11..62cfb48594 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -1339,13 +1339,11 @@ void Jit64::addx(UGeckoInstruction inst) { LEA(32, Rd, MRegSum(Ra.GetSimpleReg(), Rb.GetSimpleReg())); } - else if (Ra.IsSimpleReg() && Rb.IsImm() && !inst.OE) + else if ((Ra.IsSimpleReg() || Rb.IsSimpleReg()) && (Ra.IsImm() || Rb.IsImm()) && !inst.OE) { - LEA(32, Rd, MDisp(Ra.GetSimpleReg(), Rb.SImm32())); - } - else if (Rb.IsSimpleReg() && Ra.IsImm() && !inst.OE) - { - LEA(32, Rd, MDisp(Rb.GetSimpleReg(), Ra.SImm32())); + RCOpArg& Rimm = Ra.IsImm() ? Ra : Rb; + RCOpArg& Rreg = Ra.IsImm() ? Rb : Ra; + LEA(32, Rd, MDisp(Rreg.GetSimpleReg(), Rimm.SImm32())); } else {