Jit_Integer: rlwinix: Handle immediate mask == 0xFFFFFFFF case

This commit is contained in:
MerryMage 2020-12-28 12:49:48 +00:00
parent 19aa10df75
commit 0ef1fcdeb9
1 changed files with 9 additions and 2 deletions

View File

@ -1649,17 +1649,24 @@ void Jit64::rlwimix(UGeckoInstruction inst)
int a = inst.RA; int a = inst.RA;
int s = inst.RS; int s = inst.RS;
const u32 mask = MakeRotationMask(inst.MB, inst.ME);
if (gpr.IsImm(a, s)) if (gpr.IsImm(a, s))
{ {
const u32 mask = MakeRotationMask(inst.MB, inst.ME);
gpr.SetImmediate32(a, gpr.SetImmediate32(a,
(gpr.Imm32(a) & ~mask) | (Common::RotateLeft(gpr.Imm32(s), inst.SH) & mask)); (gpr.Imm32(a) & ~mask) | (Common::RotateLeft(gpr.Imm32(s), inst.SH) & mask));
if (inst.Rc) if (inst.Rc)
ComputeRC(a); 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 else
{ {
const u32 mask = MakeRotationMask(inst.MB, inst.ME);
bool needs_test = false; bool needs_test = false;
if (mask == 0 || (a == s && inst.SH == 0)) if (mask == 0 || (a == s && inst.SH == 0))
{ {