summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
index eab1246a58..791febaf0a 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp
@@ -1649,17 +1649,24 @@ void Jit64::rlwimix(UGeckoInstruction inst)
int a = inst.RA;
int s = inst.RS;
+ const u32 mask = MakeRotationMask(inst.MB, inst.ME);
+
if (gpr.IsImm(a, s))
{
- const u32 mask = MakeRotationMask(inst.MB, inst.ME);
gpr.SetImmediate32(a,
(gpr.Imm32(a) & ~mask) | (Common::RotateLeft(gpr.Imm32(s), inst.SH) & mask));
if (inst.Rc)
ComputeRC(a);
}
+ else if (gpr.IsImm(s) && mask == 0xFFFFFFFF)
+ {
+ gpr.SetImmediate32(a, Common::RotateLeft(gpr.Imm32(s), inst.SH));
+
+ if (inst.Rc)
+ ComputeRC(a);
+ }
else
{
- const u32 mask = MakeRotationMask(inst.MB, inst.ME);
bool needs_test = false;
if (mask == 0 || (a == s && inst.SH == 0))
{