diff options
| author | bunnei <bunneidev@gmail.com> | 2015-01-02 20:39:36 -0500 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2015-01-02 20:39:36 -0500 |
| commit | 6ae381ac9e20b18ee5e90036326df4b8e5837c04 (patch) | |
| tree | 65ff10f61d7615edeb9cb29fe460db442928541a /src/core/arm/interpreter/armsupp.cpp | |
| parent | 84856a45493906d2860a004c4b4c85b7cffc7c11 (diff) | |
| parent | bee4ff8454d21644f731703173f449dfeda0fec4 (diff) | |
Merge pull request #388 from lioncash/sm
dyncom: Implement SMLAD/SMUAD/SMLSD/SMUSD
Diffstat (limited to 'src/core/arm/interpreter/armsupp.cpp')
| -rw-r--r-- | src/core/arm/interpreter/armsupp.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp index 426b67831..eec34143e 100644 --- a/src/core/arm/interpreter/armsupp.cpp +++ b/src/core/arm/interpreter/armsupp.cpp @@ -453,12 +453,14 @@ ARMul_AddOverflow (ARMul_State * state, ARMword a, ARMword b, ARMword result) ASSIGNV (AddOverflow (a, b, result)); } -/* Assigns the Q flag if the given result is considered an overflow from the addition of a and b */ -void ARMul_AddOverflowQ(ARMul_State* state, ARMword a, ARMword b) +// Returns true if the Q flag should be set as a result of overflow. +bool ARMul_AddOverflowQ(ARMword a, ARMword b) { u32 result = a + b; if (((result ^ a) & (u32)0x80000000) && ((a ^ b) & (u32)0x80000000) == 0) - SETQ; + return true; + + return false; } /* Assigns the C flag after an subtraction of a and b to give result. */ |
