From patchwork Mon Jun 28 15:54:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: cmchao X-Patchwork-Id: 57156 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BA19FB6EEC for ; Tue, 29 Jun 2010 01:55:40 +1000 (EST) Received: from localhost ([127.0.0.1]:37511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTGgM-0005XJ-2m for incoming@patchwork.ozlabs.org; Mon, 28 Jun 2010 11:55:38 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:x-mailer:in-reply-to:references; bh=phtuvYg6YVh3UoG+/9IrhLAjDZStjCLtaX5m99V8+gI=; b=p+3+aLBQNPANcUUKKE3Y5zf6Nj8sq0AgZDtfl0x0ZtXJPOPK8II+2o02HWv71kjB8b iEia82fBOZYX124eaDv7/54dNvkAOygWUrqcUMstlSaPb341+r0LER96RsBPrscTuwu1 Zmqe792hy7SrlABnsEM68ilFYOvVnDW75fesg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; b=qFfFB0RG11YltFWtWXwIE//rFO6EQb8M5Vk2GRRktx4mrffvuDCTLyTmIzbjeFRmWG YRPFPnsHXWwjQxiuFY+5SClxBq187kWUxFTwjGLh+pG5WX+80gyzHhFWsopk60ua1i8W p8ZP7s/H2g9LiQ7C2iFghfh6nbC8KJEva2uB8= Received: by 10.114.75.2 with SMTP id x2mr1490534waa.213.1277740469565; Mon, 28 Jun 2010 08:54:29 -0700 (PDT) Received: from localhost.localdomain (114-44-99-42.dynamic.hinet.net [114.44.99.42]) by mx.google.com with ESMTPS id g14sm3641092rvb.18.2010.06.28.08.54.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 28 Jun 2010 08:54:28 -0700 (PDT) From: Chih-Min Chao To: qemu-devel@nongnu.org Date: Mon, 28 Jun 2010 23:54:06 +0800 Message-Id: <1277740446-8603-4-git-send-email-cmchao@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1277740446-8603-1-git-send-email-cmchao@gmail.com> References: <1277740446-8603-1-git-send-email-cmchao@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 3/3] target-arm : fix parallel saturated subtraction implementation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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;