From patchwork Tue Dec 7 14:13:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 74549 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D889DB70AA for ; Wed, 8 Dec 2010 01:30:03 +1100 (EST) Received: from localhost ([127.0.0.1]:37249 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPyYK-0002D0-J9 for incoming@patchwork.ozlabs.org; Tue, 07 Dec 2010 09:30:00 -0500 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 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.69) (envelope-from ) id 1PPyIb-0000pO-PM; Tue, 07 Dec 2010 14:13:45 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 7 Dec 2010 14:13:43 +0000 Message-Id: <1291731225-3155-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1291731225-3155-1-git-send-email-peter.maydell@linaro.org> References: <1291731225-3155-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Juha.Riihimaki@nokia.com Subject: [Qemu-devel] [PATCH 3/5] ARM: Fix VQSHL of signed 64 bit values by shift counts >= 64 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;