qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] target-arm: Fix Neon VQ(R)DMULH.S16 instructions


From: Peter Maydell
Subject: [Qemu-devel] [PATCH] target-arm: Fix Neon VQ(R)DMULH.S16 instructions
Date: Thu, 27 Jan 2011 19:18:35 +0000

From: Juha Riihimäki <address@hidden>

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 <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]