Merge pull request #1859 from FioraAeterna/fixinterpreterslw

Interpreter: fix slwx
This commit is contained in:
Ryan Houdek 2015-01-09 18:51:06 -06:00
commit 9cada14ebc
2 changed files with 2 additions and 2 deletions

View File

@ -329,7 +329,7 @@ void Interpreter::orcx(UGeckoInstruction _inst)
void Interpreter::slwx(UGeckoInstruction _inst)
{
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)
Helper_UpdateCR0(rGPR[_inst.RA]);

View File

@ -1680,7 +1680,7 @@ void Jit64::slwx(UGeckoInstruction inst)
if (gpr.R(b).IsImm() && gpr.R(s).IsImm())
{
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)
ComputeRC(gpr.R(a));
}