mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge pull request #1859 from FioraAeterna/fixinterpreterslw
Interpreter: fix slwx
This commit is contained in:
@ -329,7 +329,7 @@ void Interpreter::orcx(UGeckoInstruction _inst)
|
|||||||
void Interpreter::slwx(UGeckoInstruction _inst)
|
void Interpreter::slwx(UGeckoInstruction _inst)
|
||||||
{
|
{
|
||||||
u32 amount = rGPR[_inst.RB];
|
u32 amount = rGPR[_inst.RB];
|
||||||
rGPR[_inst.RA] = (amount & 0x20) ? 0 : rGPR[_inst.RS] << amount;
|
rGPR[_inst.RA] = (amount & 0x20) ? 0 : rGPR[_inst.RS] << (amount & 0x1f);
|
||||||
|
|
||||||
if (_inst.Rc)
|
if (_inst.Rc)
|
||||||
Helper_UpdateCR0(rGPR[_inst.RA]);
|
Helper_UpdateCR0(rGPR[_inst.RA]);
|
||||||
|
@ -1680,7 +1680,7 @@ void Jit64::slwx(UGeckoInstruction inst)
|
|||||||
if (gpr.R(b).IsImm() && gpr.R(s).IsImm())
|
if (gpr.R(b).IsImm() && gpr.R(s).IsImm())
|
||||||
{
|
{
|
||||||
u32 amount = (u32)gpr.R(b).offset;
|
u32 amount = (u32)gpr.R(b).offset;
|
||||||
gpr.SetImmediate32(a, (amount & 0x20) ? 0 : (u32)gpr.R(s).offset << amount);
|
gpr.SetImmediate32(a, (amount & 0x20) ? 0 : (u32)gpr.R(s).offset << (amount & 0x1f));
|
||||||
if (inst.Rc)
|
if (inst.Rc)
|
||||||
ComputeRC(gpr.R(a));
|
ComputeRC(gpr.R(a));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user