summaryrefslogtreecommitdiffstats
path: root/src/core/arm/interpreter/armsupp.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-12-23 15:55:07 +0100
committerLioncash <mathew1800@gmail.com>2014-12-23 15:58:21 +0100
commit79a7a432c524c7c999eed177e3ed34ba2646359a (patch)
tree61a4f8eef151f32bca6685879ad0ef73e1af7df8 /src/core/arm/interpreter/armsupp.cpp
parentMerge pull request #334 from lioncash/cpsr (diff)
downloadyuzu-79a7a432c524c7c999eed177e3ed34ba2646359a.tar
yuzu-79a7a432c524c7c999eed177e3ed34ba2646359a.tar.gz
yuzu-79a7a432c524c7c999eed177e3ed34ba2646359a.tar.bz2
yuzu-79a7a432c524c7c999eed177e3ed34ba2646359a.tar.lz
yuzu-79a7a432c524c7c999eed177e3ed34ba2646359a.tar.xz
yuzu-79a7a432c524c7c999eed177e3ed34ba2646359a.tar.zst
yuzu-79a7a432c524c7c999eed177e3ed34ba2646359a.zip
Diffstat (limited to '')
-rw-r--r--src/core/arm/interpreter/armsupp.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp
index b31c0ea24..6774f8a74 100644
--- a/src/core/arm/interpreter/armsupp.cpp
+++ b/src/core/arm/interpreter/armsupp.cpp
@@ -444,6 +444,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)
+{
+ u32 result = a + b;
+ if (((result ^ a) & (u32)0x80000000) && ((a ^ b) & (u32)0x80000000) == 0)
+ SETQ;
+}
+
/* Assigns the C flag after an subtraction of a and b to give result. */
void