Merge pull request #1086 from FioraAeterna/fixsrawint

Interpreter: fix carry calculation in srawx
This commit is contained in:
Ryan Houdek
2014-09-18 06:41:37 -05:00

View File

@ -362,8 +362,10 @@ void Interpreter::srawx(UGeckoInstruction _inst)
} }
else else
{ {
m_GPR[_inst.RA] = (u32)((s32)m_GPR[_inst.RS] >> amount); s32 rrs = m_GPR[_inst.RS];
if (m_GPR[_inst.RS] & 0x80000000) m_GPR[_inst.RA] = rrs >> amount;
if ((rrs < 0) && (rrs << (32 - amount)))
SetCarry(1); SetCarry(1);
else else
SetCarry(0); SetCarry(0);