mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
x86 shift of 0 doesn't update flags, check the value manually
This commit is contained in:
parent
a812e3bd3d
commit
b88d0aa53f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user