From patchwork Thu Jan 27 19:18:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 80725 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 E6C32B7107 for ; Fri, 28 Jan 2011 06:19:49 +1100 (EST) Received: from localhost ([127.0.0.1]:60140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiXNi-0005Mq-GC for incoming@patchwork.ozlabs.org; Thu, 27 Jan 2011 14:19:46 -0500 Received: from [140.186.70.92] (port=40455 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiXMk-0005M5-39 for qemu-devel@nongnu.org; Thu, 27 Jan 2011 14:18:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiXMi-0006Ae-AX for qemu-devel@nongnu.org; Thu, 27 Jan 2011 14:18:45 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:30605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiXMi-00069U-4H for qemu-devel@nongnu.org; Thu, 27 Jan 2011 14:18:44 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.69) (envelope-from ) id 1PiXMZ-00047B-Hg; Thu, 27 Jan 2011 19:18:35 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 27 Jan 2011 19:18:35 +0000 Message-Id: <1296155915-15796-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH] target-arm: Fix Neon VQ(R)DMULH.S16 instructions 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 From: Juha Riihimäki Correct an error in the implementation of the 16 bit forms of VQ(R)DMULH, bringing them into line with the 32 bit implementation. Signed-off-by: Juha Riihimäki Reviewed-by: Peter Maydell --- target-arm/neon_helper.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c index 20f3c16..fead152 100644 --- a/target-arm/neon_helper.c +++ b/target-arm/neon_helper.c @@ -880,8 +880,9 @@ uint32_t HELPER(neon_cnt_u8)(uint32_t x) if ((tmp ^ (tmp << 1)) & SIGNBIT) { \ SET_QC(); \ tmp = (tmp >> 31) ^ ~SIGNBIT; \ + } else { \ + tmp <<= 1; \ } \ - tmp <<= 1; \ if (round) { \ int32_t old = tmp; \ tmp += 1 << 15; \