From: Peter Maydell Date: Tue, 7 Dec 2010 14:13:43 +0000 (+0000) Subject: target-arm: Fix VQSHL of signed 64 bit values by shift counts >= 64 X-Git-Tag: TizenStudio_2.0_p2.3~3744 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8fa2987d2aeda28e6d4b84756c2788b588a7ebba;p=sdk%2Femulator%2Fqemu.git target-arm: Fix VQSHL of signed 64 bit values by shift counts >= 64 VQSHL of a signed 64 bit non-zero value by a shift count >= 64 should saturate; return the correct value in this case. Signed-off-by: Peter Maydell Signed-off-by: Aurelien Jarno --- diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c index d29b884..2dc3d96 100644 --- a/target-arm/neon_helper.c +++ b/target-arm/neon_helper.c @@ -608,7 +608,7 @@ uint64_t HELPER(neon_qshl_s64)(CPUState *env, uint64_t valop, uint64_t shiftop) if (shift >= 64) { if (val) { SET_QC(); - val = (val >> 63) & ~SIGNBIT64; + val = (val >> 63) ^ ~SIGNBIT64; } } else if (shift <= -64) { val >>= 63;