Skip to contentSkip to conversation

target-arm: Fix Neon VQ(R)DMULH.S16 instructions

PATCH Applied Peter Maydell 2 participants 2 messages Jan 27, 2011 – Jan 29, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-arm: Fix Neon VQ(R)DMULH.S16 instructions

From: Juha Riihimäki <[email protected]>

Correct an error in the implementation of the 16 bit forms of VQ(R)DMULH, bringing them into line with the 32 bit implementation.

---
 target-arm/neon_helper.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
target-arm/neon_helper.c +2 -1
index 20f3c16..fead152 100644
@@ -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; \
Signature · 1 line
1.7.1
#1 lore raw
Quoted 11 lines · Peter Maydell

From: Juha Riihimäki <[email protected]>

Correct an error in the implementation of the 16 bit forms of VQ(R)DMULH, bringing them into line with the 32 bit implementation.

---
 target-arm/neon_helper.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Thanks, applied.

Quoted 20 lines
target-arm/neon_helper.c +2 -1
index 20f3c16..fead152 100644
@@ -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; \
Signature · 1 line
1.7.1
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net