Received: from [140.186.70.92] (port=56879 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPyX6-0002AZ-Rv for qemu-devel@nongnu.org; Tue, 07 Dec 2010 09:28:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPyX4-00011G-Rk for qemu-devel@nongnu.org; Tue, 07 Dec 2010 09:28:44 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:47408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPyX4-0000zN-Je for qemu-devel@nongnu.org; Tue, 07 Dec 2010 09:28:42 -0500 From: Peter Maydell Date: Tue, 7 Dec 2010 14:13:43 +0000 Message-Id: <1291731225-3155-4-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1291731225-3155-1-git-send-email-peter.maydell@linaro.org> References: <1291731225-3155-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 3/5] ARM: Fix VQSHL of signed 64 bit values by shift counts >= 64 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Juha.Riihimaki@nokia.com 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 --- target-arm/neon_helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.6.3.3