Merge pull request #354 from lioncash/usaduflow
armemu: Fix underflows in USAD8/USADA8
This commit is contained in:
commit
762f16c4ad
3 changed files with 14 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue