summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authormagumagu <magumagu9@gmail.com>2015-02-22 16:19:03 -0800
committermagumagu <magumagu9@gmail.com>2015-02-22 16:19:03 -0800
commite81d459bcfbc3f1b59e6abd429e030c3ce803755 (patch)
treeb9ee5ad8ec1e8458409aa8ca7e84c1da68aee8e0 /Source
parent3ab006b8d119bd876a9a32f870d2261565397c71 (diff)
parent1a913138d506527893073b967fdad80b599ab92f (diff)
Merge pull request #2104 from lioncash/commented
Interpreter: Uncomment code related to cmp and cmpl
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp
index 7f7c8b3edc..7a57f85615 100644
--- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp
+++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp
@@ -220,16 +220,17 @@ void Interpreter::cmp(UGeckoInstruction _inst)
{
s32 a = (s32)rGPR[_inst.RA];
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;
- else if (a == b)
+ else // Equals
fTemp = 0x2;
if (GetXER_SO())
- PanicAlert("cmp getting overflow flag"); // fTemp |= 0x1
+ fTemp |= 0x1;
SetCRField(_inst.CRFD, fTemp);
}
@@ -238,16 +239,17 @@ void Interpreter::cmpl(UGeckoInstruction _inst)
{
u32 a = rGPR[_inst.RA];
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;
- else if (a == b)
+ else // Equals
fTemp = 0x2;
if (GetXER_SO())
- PanicAlert("cmpl getting overflow flag"); // fTemp |= 0x1;
+ fTemp |= 0x1;
SetCRField(_inst.CRFD, fTemp);
}