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: 35 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:39:22 -0000 Delivered-To: patches@linaro.org Received: by 10.147.124.10 with SMTP id b10cs18607yan; Thu, 27 Jan 2011 11:21:44 -0800 (PST) Received: by 10.216.176.142 with SMTP id b14mr2235885wem.32.1296155921219; Thu, 27 Jan 2011 11:18:41 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id p5si16335582weq.45.2011.01.27.11.18.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 27 Jan 2011 11:18:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk 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 Cc: patches@linaro.org Subject: [PATCH] target-arm: Fix Neon VQ(R)DMULH.S16 instructions 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 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; \