Patchwork [43/48] target-arm: fix neon vq(r)dmulh.s16 instructions

login
register
mail settings
Submitter Riku Voipio
Date March 26, 2010, 4:07 p.m.
Message ID <4373d4a0fcd82b35eed39423fbf4c7d83e2966f8.1269617187.git.riku.voipio@nokia.com>
Download mbox | patch
Permalink /patch/48683/
State New
Headers show

Comments

Riku Voipio - March 26, 2010, 4:07 p.m.
From: Juha Riihimäki <juha.riihimaki@nokia.com>

Signed-Off-By: Riku Voipio <riku.voipio@nokia.com>
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
---
 target-arm/neon_helper.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
index 910f84a..6464317 100644
--- a/target-arm/neon_helper.c
+++ b/target-arm/neon_helper.c
@@ -946,8 +946,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; \