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 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))
{