summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2020-12-28 12:49:48 +0000
committerMerryMage <MerryMage@users.noreply.github.com>2020-12-28 12:49:48 +0000
commit0ef1fcdeb9bbbc80245b53efeb2bc38aed1e4bcf (patch)
tree31d4061b4bb91114d3908c0b699da2506c137ab7 /Source
parent19aa10df756761f9770bd25c0b45955fa70370e5 (diff)
Jit_Integer: rlwinix: Handle immediate mask == 0xFFFFFFFF case
Diffstat (limited to 'Source')
-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))
{