diff options
| author | 2014-12-28 11:57:25 -0500 | |
|---|---|---|
| committer | 2014-12-28 11:57:25 -0500 | |
| commit | 762f16c4ad84d50490c7a1db9d636e6c41c8aa09 (patch) | |
| tree | bc8c7c383f85f593b1a30cb6e7c857ddc19c91ff /src/core/arm/interpreter/armsupp.cpp | |
| parent | Merge pull request #350 from lioncash/qops (diff) | |
| parent | armemu: Fix underflows in USAD8/USADA8 (diff) | |
| download | yuzu-762f16c4ad84d50490c7a1db9d636e6c41c8aa09.tar.gz yuzu-762f16c4ad84d50490c7a1db9d636e6c41c8aa09.tar.xz yuzu-762f16c4ad84d50490c7a1db9d636e6c41c8aa09.zip | |
Merge pull request #354 from lioncash/usaduflow
armemu: Fix underflows in USAD8/USADA8
Diffstat (limited to 'src/core/arm/interpreter/armsupp.cpp')
| -rw-r--r-- | src/core/arm/interpreter/armsupp.cpp | 9 |
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) | |||
| 392 | return (bit - 1); | 392 | return (bit - 1); |
| 393 | } | 393 | } |
| 394 | 394 | ||
| 395 | /* Unsigned sum of absolute difference */ | ||
| 396 | u8 ARMul_UnsignedAbsoluteDifference(u8 left, u8 right) | ||
| 397 | { | ||
| 398 | if (left > right) | ||
| 399 | return left - right; | ||
| 400 | |||
| 401 | return right - left; | ||
| 402 | } | ||
| 403 | |||
| 395 | /* Assigns the N and Z flags depending on the value of result. */ | 404 | /* Assigns the N and Z flags depending on the value of result. */ |
| 396 | 405 | ||
| 397 | void | 406 | void |