From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60356 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTGfH-0005Vw-DL for qemu-devel@nongnu.org; Mon, 28 Jun 2010 11:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTGfG-0006Me-Af for qemu-devel@nongnu.org; Mon, 28 Jun 2010 11:54:31 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:62821) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTGfG-0006Le-68 for qemu-devel@nongnu.org; Mon, 28 Jun 2010 11:54:30 -0400 Received: by mail-pv0-f173.google.com with SMTP id 12so2619141pvg.4 for ; Mon, 28 Jun 2010 08:54:29 -0700 (PDT) From: Chih-Min Chao Date: Mon, 28 Jun 2010 23:54:06 +0800 Message-Id: <1277740446-8603-4-git-send-email-cmchao@gmail.com> In-Reply-To: <1277740446-8603-1-git-send-email-cmchao@gmail.com> References: <1277740446-8603-1-git-send-email-cmchao@gmail.com> Subject: [Qemu-devel] [PATCH 3/3] target-arm : fix parallel saturated subtraction implementation List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Chih-Min Chao --- 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 63e5dc7..2dd64d9 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; -- 1.7.0.4