From 46eece9d8969ac37bcdf0a3f056a9cceb20bc641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Riihim=C3=A4ki?= Date: Thu, 27 Jan 2011 19:18:35 +0000 Subject: [PATCH] target-arm: Fix Neon VQ(R)DMULH.S16 instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Aurelien Jarno --- target-arm/neon_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c index 20f3c162cd..fead1525c4 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; \