Patchwork [2/5] ARM: Fix VQSHL of signed 64 bit values

login
register
mail settings
Submitter Peter Maydell
Date Dec. 7, 2010, 2:13 p.m.
Message ID <1291731225-3155-3-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/74552/
State New
Headers show

Comments

Peter Maydell - Dec. 7, 2010, 2:13 p.m.
From: Juha Riihimäki <juha.riihimaki@nokia.com>

Add a missing '-' which meant that we were misinterpreting the shift
argument for VQSHL of 64 bit signed values and treating almost every
shift value as if it were an extremely large right shift.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 target-arm/neon_helper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
index 5e6452b..d29b884 100644
--- a/target-arm/neon_helper.c
+++ b/target-arm/neon_helper.c
@@ -610,7 +610,7 @@  uint64_t HELPER(neon_qshl_s64)(CPUState *env, uint64_t valop, uint64_t shiftop)
             SET_QC();
             val = (val >> 63) & ~SIGNBIT64;
         }
-    } else if (shift <= 64) {
+    } else if (shift <= -64) {
         val >>= 63;
     } else if (shift < 0) {
         val >>= -shift;