summaryrefslogtreecommitdiffstats
path: root/src/core/arm/interpreter/armsupp.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-12-28 17:57:25 +0100
committerbunnei <bunneidev@gmail.com>2014-12-28 17:57:25 +0100
commit762f16c4ad84d50490c7a1db9d636e6c41c8aa09 (patch)
treebc8c7c383f85f593b1a30cb6e7c857ddc19c91ff /src/core/arm/interpreter/armsupp.cpp
parentMerge pull request #350 from lioncash/qops (diff)
parentarmemu: Fix underflows in USAD8/USADA8 (diff)
downloadyuzu-762f16c4ad84d50490c7a1db9d636e6c41c8aa09.tar
yuzu-762f16c4ad84d50490c7a1db9d636e6c41c8aa09.tar.gz
yuzu-762f16c4ad84d50490c7a1db9d636e6c41c8aa09.tar.bz2
yuzu-762f16c4ad84d50490c7a1db9d636e6c41c8aa09.tar.lz
yuzu-762f16c4ad84d50490c7a1db9d636e6c41c8aa09.tar.xz
yuzu-762f16c4ad84d50490c7a1db9d636e6c41c8aa09.tar.zst
yuzu-762f16c4ad84d50490c7a1db9d636e6c41c8aa09.zip
Diffstat (limited to 'src/core/arm/interpreter/armsupp.cpp')
-rw-r--r--src/core/arm/interpreter/armsupp.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp
index 186b1bd73..8f158e2c8 100644
--- a/src/core/arm/interpreter/armsupp.cpp
+++ b/src/core/arm/interpreter/armsupp.cpp
@@ -392,6 +392,15 @@ ARMul_NthReg (ARMword instr, unsigned number)
return (bit - 1);
}
+/* Unsigned sum of absolute difference */
+u8 ARMul_UnsignedAbsoluteDifference(u8 left, u8 right)
+{
+ if (left > right)
+ return left - right;
+
+ return right - left;
+}
+
/* Assigns the N and Z flags depending on the value of result. */
void