target-arm: Fix Neon VQ(R)DMULH.S16 instructions
authorJuha Riihimäki <juha.riihimaki@nokia.com>
Thu, 27 Jan 2011 19:18:35 +0000 (19:18 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 29 Jan 2011 14:16:29 +0000 (15:16 +0100)
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 <juha.riihimaki@nokia.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm/neon_helper.c

index 20f3c162cd310459816856bbd41813ba412d9204..fead1525c4961b09682fc05439f6ec780b76f6f4 100644 (file)
@@ -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; \