diff options
author | Chih-Min Chao <cmchao@gmail.com> | 2010-06-28 23:54:06 +0800 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-07-01 23:45:29 +0200 |
commit | 4c4fd3f852dbb3a7dbcc59110d03d3d15ada5f72 (patch) | |
tree | fe4f009ecddb9b2a1755c0ed6a70c91e7866999b | |
parent | ed89a2f1b11db03fbdb0ddab93c25913a16c0374 (diff) |
target-arm : fix parallel saturated subtraction implementation
Signed-off-by: Chih-Min Chao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r-- | target-arm/helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index 63e5dc7ef6..2dd64d94d8 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -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; |