summaryrefslogtreecommitdiffstats
path: root/src/core/arm/interpreter
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-05 15:59:12 +0100
committerbunnei <bunneidev@gmail.com>2015-01-05 15:59:12 +0100
commit8b1ec1a82a73e38754d1932b24b1c0fd7293e02b (patch)
tree21fe4d3ad291857e6ea1b282b3c41b18d891a00a /src/core/arm/interpreter
parentMerge pull request #407 from Subv/arbiter (diff)
parentdyncom: Implement QADD/QSUB/QDADD/QDSUB (diff)
downloadyuzu-8b1ec1a82a73e38754d1932b24b1c0fd7293e02b.tar
yuzu-8b1ec1a82a73e38754d1932b24b1c0fd7293e02b.tar.gz
yuzu-8b1ec1a82a73e38754d1932b24b1c0fd7293e02b.tar.bz2
yuzu-8b1ec1a82a73e38754d1932b24b1c0fd7293e02b.tar.lz
yuzu-8b1ec1a82a73e38754d1932b24b1c0fd7293e02b.tar.xz
yuzu-8b1ec1a82a73e38754d1932b24b1c0fd7293e02b.tar.zst
yuzu-8b1ec1a82a73e38754d1932b24b1c0fd7293e02b.zip
Diffstat (limited to 'src/core/arm/interpreter')
-rw-r--r--src/core/arm/interpreter/armsupp.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp
index eec34143e..68ac2a0ce 100644
--- a/src/core/arm/interpreter/armsupp.cpp
+++ b/src/core/arm/interpreter/armsupp.cpp
@@ -418,22 +418,18 @@ ARMul_NegZero (ARMul_State * state, ARMword result)
}
}
-/* Compute whether an addition of A and B, giving RESULT, overflowed. */
-
-int
-AddOverflow (ARMword a, ARMword b, ARMword result)
+// Compute whether an addition of A and B, giving RESULT, overflowed.
+bool AddOverflow(ARMword a, ARMword b, ARMword result)
{
- return ((NEG (a) && NEG (b) && POS (result))
- || (POS (a) && POS (b) && NEG (result)));
+ return ((NEG(a) && NEG(b) && POS(result)) ||
+ (POS(a) && POS(b) && NEG(result)));
}
-/* Compute whether a subtraction of A and B, giving RESULT, overflowed. */
-
-int
-SubOverflow (ARMword a, ARMword b, ARMword result)
+// Compute whether a subtraction of A and B, giving RESULT, overflowed.
+bool SubOverflow(ARMword a, ARMword b, ARMword result)
{
- return ((NEG (a) && POS (b) && POS (result))
- || (POS (a) && NEG (b) && NEG (result)));
+ return ((NEG(a) && POS(b) && POS(result)) ||
+ (POS(a) && NEG(b) && NEG(result)));
}
/* Assigns the C flag after an addition of a and b to give result. */