From patchwork Fri Mar 26 16:07:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 48675 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 3A8B2B7C98 for ; Sat, 27 Mar 2010 04:15:10 +1100 (EST) Received: from localhost ([127.0.0.1]:32990 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvD7F-0000Jh-A5 for incoming@patchwork.ozlabs.org; Fri, 26 Mar 2010 13:14:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NvC5W-00049i-TS for qemu-devel@nongnu.org; Fri, 26 Mar 2010 12:08:47 -0400 Received: from [140.186.70.92] (port=41651 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvC5F-0003gu-Oz for qemu-devel@nongnu.org; Fri, 26 Mar 2010 12:08:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NvC4J-0006zS-SV for qemu-devel@nongnu.org; Fri, 26 Mar 2010 12:08:23 -0400 Received: from afflict.kos.to ([92.243.29.197]:33622) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvC4G-0006tD-63 for qemu-devel@nongnu.org; Fri, 26 Mar 2010 12:07:29 -0400 Received: by afflict.kos.to (Postfix, from userid 1000) id 93D67265D7; Fri, 26 Mar 2010 16:07:25 +0000 (UTC) From: Riku Voipio To: qemu-devel@nongnu.org Date: Fri, 26 Mar 2010 16:07:07 +0000 Message-Id: <9b04d1155a105ad03ea2985572ae07ad807605bf.1269617187.git.riku.voipio@nokia.com> X-Mailer: git-send-email 1.6.5 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Riku Voipio , =?UTF-8?q?Juha=20Riihim=C3=A4ki?= Subject: [Qemu-devel] [PATCH 47/48] target-arm: fix neon vshll (shift < max) 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 From: Juha Riihimäki Signed-Off-By: Riku Voipio Signed-off-by: Juha Riihimäki --- target-arm/neon_helper.c | 1 - target-arm/translate.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c index 7cef783..d75cb47 100644 --- a/target-arm/neon_helper.c +++ b/target-arm/neon_helper.c @@ -1484,7 +1484,6 @@ uint64_t HELPER(neon_negl_u16)(uint64_t x) return result; } -#include uint64_t HELPER(neon_negl_u32)(uint64_t x) { uint32_t low = -x; diff --git a/target-arm/translate.c b/target-arm/translate.c index fd3a72e..cd9dbce 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -4855,7 +4855,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn) /* The shift is less than the width of the source type, so we can just shift the whole register. */ tcg_gen_shli_i64(cpu_V0, cpu_V0, shift); - if (size < 2 || !u) { + if (size < 2) { uint64_t imm64; if (size == 0) { imm = (0xffu >> (8 - shift)); @@ -4864,7 +4864,7 @@ static int disas_neon_data_insn(CPUState * env, DisasContext *s, uint32_t insn) imm = 0xffff >> (16 - shift); } imm64 = imm | (((uint64_t)imm) << 32); - tcg_gen_andi_i64(cpu_V0, cpu_V0, imm64); + tcg_gen_andi_i64(cpu_V0, cpu_V0, ~imm64); } } neon_store_reg64(cpu_V0, rd + pass);