diff options
author | Lioncash <mathew1800@gmail.com> | 2015-01-05 09:10:59 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2015-01-05 09:13:41 -0500 |
commit | d00c22c706e76edd1be009faeab69a94cd0d5ef1 (patch) | |
tree | c7dff0a7f0e7daf0a9d2973d3ab2df128fe06522 /src/core/arm/interpreter/armsupp.cpp | |
parent | b058ce6feb28c8de9f7d1477c4b40175598c6791 (diff) |
dyncom: Implement QADD/QSUB/QDADD/QDSUB
Diffstat (limited to 'src/core/arm/interpreter/armsupp.cpp')
-rw-r--r-- | src/core/arm/interpreter/armsupp.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp index eec34143..68ac2a0c 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. */ |