From 4c4fd3f852dbb3a7dbcc59110d03d3d15ada5f72 Mon Sep 17 00:00:00 2001 From: Chih-Min Chao Date: Mon, 28 Jun 2010 23:54:06 +0800 Subject: target-arm : fix parallel saturated subtraction implementation Signed-off-by: Chih-Min Chao Signed-off-by: Aurelien Jarno --- target-arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'target-arm') 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; -- cgit v1.2.3