Fix a regression exposed by my previous changes to rlwinm. Also, some

minor cleanup.



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1643 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
magumagu9 2008-12-23 22:34:58 +00:00
parent 42dc237d7f
commit 4aa693ea54
1 changed files with 4 additions and 6 deletions

View File

@ -673,20 +673,18 @@
int s = inst.RS;
if (gpr.R(s).IsImm() && !inst.Rc)
{
unsigned mask = Helper_Mask(inst.MB, inst.ME);
unsigned result = gpr.R(s).offset;
if (inst.SH != 0)
result = (result << inst.SH) |
(result >> (32 - inst.SH));
result &= mask;
result = _rotl(result, inst.SH);
result &= Helper_Mask(inst.MB, inst.ME);
gpr.SetImmediate32(a, result);
return;
}
gpr.Lock(a, s);
gpr.LoadToX64(a, a == s);
if (a != s)
{
gpr.Lock(a, s);
gpr.LoadToX64(a, false);
MOV(32, gpr.R(a), gpr.R(s));
}