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 From: Peter Maydell Date: Thu, 27 Jan 2011 19:18:35 +0000 Message-Id: <1296155915-15796-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] target-arm: Fix Neon VQ(R)DMULH.S16 instructions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.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; \ -- 1.7.1