diff options
author | Chih-Min Chao <cmchao@gmail.com> | 2010-06-28 23:54:06 +0800 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2010-07-20 17:44:01 -0500 |
commit | 8bb580778e667c3e25a87a2fdbedf4e52571ad34 (patch) | |
tree | a59ac017a07f4acaff096ea695c7c4700421fcb8 | |
parent | target-arm : fix thumb2 parallel add/sub opcode decoding (diff) | |
download | qemu-kvm-8bb580778e667c3e25a87a2fdbedf4e52571ad34.tar.gz qemu-kvm-8bb580778e667c3e25a87a2fdbedf4e52571ad34.tar.bz2 qemu-kvm-8bb580778e667c3e25a87a2fdbedf4e52571ad34.zip |
target-arm : fix parallel saturated subtraction implementation
Signed-off-by: Chih-Min Chao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
(cherry picked from commit 4c4fd3f852dbb3a7dbcc59110d03d3d15ada5f72)
-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 b3aec9944..9a30ef181 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2043,7 +2043,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; @@ -2060,7 +2060,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; |