Merge pull request #2104 from lioncash/commented

Interpreter: Uncomment code related to cmp and cmpl
This commit is contained in:
magumagu 2015-02-22 16:19:03 -08:00
commit e81d459bcf
1 changed files with 12 additions and 10 deletions

View File

@ -220,16 +220,17 @@ void Interpreter::cmp(UGeckoInstruction _inst)
{ {
s32 a = (s32)rGPR[_inst.RA]; s32 a = (s32)rGPR[_inst.RA];
s32 b = (s32)rGPR[_inst.RB]; s32 b = (s32)rGPR[_inst.RB];
int fTemp = 0x8; // a < b int fTemp;
// if (a < b) fTemp = 0x8; else if (a < b)
if (a > b) fTemp = 0x8;
else if (a > b)
fTemp = 0x4; fTemp = 0x4;
else if (a == b) else // Equals
fTemp = 0x2; fTemp = 0x2;
if (GetXER_SO()) if (GetXER_SO())
PanicAlert("cmp getting overflow flag"); // fTemp |= 0x1 fTemp |= 0x1;
SetCRField(_inst.CRFD, fTemp); SetCRField(_inst.CRFD, fTemp);
} }
@ -238,16 +239,17 @@ void Interpreter::cmpl(UGeckoInstruction _inst)
{ {
u32 a = rGPR[_inst.RA]; u32 a = rGPR[_inst.RA];
u32 b = rGPR[_inst.RB]; u32 b = rGPR[_inst.RB];
u32 fTemp = 0x8; // a < b u32 fTemp;
// if (a < b) fTemp = 0x8;else if (a < b)
if (a > b) fTemp = 0x8;
else if (a > b)
fTemp = 0x4; fTemp = 0x4;
else if (a == b) else // Equals
fTemp = 0x2; fTemp = 0x2;
if (GetXER_SO()) if (GetXER_SO())
PanicAlert("cmpl getting overflow flag"); // fTemp |= 0x1; fTemp |= 0x1;
SetCRField(_inst.CRFD, fTemp); SetCRField(_inst.CRFD, fTemp);
} }