x86 shift of 0 doesn't update flags, check the value manually

This commit is contained in:
calc84maniac 2012-01-03 00:37:43 -05:00
parent 6ecae3e556
commit aa47a8c690
1 changed files with 10 additions and 16 deletions

View File

@ -1652,10 +1652,6 @@ void Jit64::srwx(UGeckoInstruction inst)
{
u32 amount = (u32)gpr.R(b).offset;
gpr.SetImmediate32(a, (amount & 0x20) ? 0 : ((u32)gpr.R(s).offset >> (amount & 0x1f)));
if (inst.Rc)
{
ComputeRC(gpr.R(a));
}
}
else
{
@ -1672,13 +1668,14 @@ void Jit64::srwx(UGeckoInstruction inst)
XOR(32, gpr.R(a), gpr.R(a));
SetJumpTarget(branch);
SHR(32, gpr.R(a), R(ECX));
if (inst.Rc)
{
GenerateRC();
}
gpr.UnlockAll();
gpr.UnlockAllX();
}
// Shift of 0 doesn't update flags, so compare manually just in case
if (inst.Rc)
{
ComputeRC(gpr.R(a));
}
}
void Jit64::slwx(UGeckoInstruction inst)
@ -1693,10 +1690,6 @@ void Jit64::slwx(UGeckoInstruction inst)
{
u32 amount = (u32)gpr.R(b).offset;
gpr.SetImmediate32(a, (amount & 0x20) ? 0 : (u32)gpr.R(s).offset << amount);
if (inst.Rc)
{
ComputeRC(gpr.R(a));
}
}
else
{
@ -1713,13 +1706,14 @@ void Jit64::slwx(UGeckoInstruction inst)
XOR(32, gpr.R(a), gpr.R(a));
SetJumpTarget(branch);
SHL(32, gpr.R(a), R(ECX));
if (inst.Rc)
{
GenerateRC();
}
gpr.UnlockAll();
gpr.UnlockAllX();
}
// Shift of 0 doesn't update flags, so compare manually just in case
if (inst.Rc)
{
ComputeRC(gpr.R(a));
}
}
void Jit64::srawx(UGeckoInstruction inst)