diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp index 81ae7beec7..885a2d44d6 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp @@ -671,19 +671,15 @@ INSTRUCTION_START; int a = inst.RA; int s = inst.RS; - if (gpr.R(a).IsImm() || gpr.R(s).IsImm()) + if (gpr.R(s).IsImm() && !inst.Rc) { - if (gpr.R(s).IsImm()) - { - if (gpr.R(s).offset == 0 && !inst.Rc) { - // This is pretty common for some reason - gpr.LoadToX64(a, false); - XOR(32, gpr.R(a), gpr.R(a)); - return; - } - // This might also be worth doing. - } - Default(inst); + unsigned mask = Helper_Mask(inst.MB, inst.ME); + unsigned result = gpr.R(s).offset; + if (inst.SH != 0) + result = (result << inst.SH) | + (result >> (32 - inst.SH)); + result &= mask; + gpr.SetImmediate32(a, result); return; }