mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target-arm : fix parallel saturated subtraction implementation
Signed-off-by: Chih-Min Chao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
committed by
Aurelien Jarno
parent
ed89a2f1b1
commit
4c4fd3f852
+2
-2
@@ -2047,7 +2047,7 @@ static inline uint16_t add16_usat(uint16_t a, uint16_t b)
|
||||
|
||||
static inline uint16_t sub16_usat(uint16_t a, uint16_t b)
|
||||
{
|
||||
if (a < b)
|
||||
if (a > b)
|
||||
return a - b;
|
||||
else
|
||||
return 0;
|
||||
@@ -2064,7 +2064,7 @@ static inline uint8_t add8_usat(uint8_t a, uint8_t b)
|
||||
|
||||
static inline uint8_t sub8_usat(uint8_t a, uint8_t b)
|
||||
{
|
||||
if (a < b)
|
||||
if (a > b)
|
||||
return a - b;
|
||||
else
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user