Interpreter: fix slwx

This commit is contained in:
Fiora 2015-01-09 05:59:51 -08:00
parent f0f8384639
commit 55b509b739
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) 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]);

View File

@ -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));
} }