Merge pull request #354 from lioncash/usaduflow

armemu: Fix underflows in USAD8/USADA8
This commit is contained in:
bunnei 2014-12-28 11:57:25 -05:00
commit 762f16c4ad
3 changed files with 14 additions and 4 deletions

View file

@ -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