From patchwork Wed Jan 19 19:29:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 79581 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 76447B70A3 for ; Thu, 20 Jan 2011 06:31:50 +1100 (EST) Received: from localhost ([127.0.0.1]:40597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pfdkx-0006AA-D2 for incoming@patchwork.ozlabs.org; Wed, 19 Jan 2011 14:31:47 -0500 Received: from [140.186.70.92] (port=50940 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfdjK-00066F-VG for qemu-devel@nongnu.org; Wed, 19 Jan 2011 14:30:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfdjH-0000C1-CY for qemu-devel@nongnu.org; Wed, 19 Jan 2011 14:30:06 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:6436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfdjG-0008WA-PE for qemu-devel@nongnu.org; Wed, 19 Jan 2011 14:30:03 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.69) (envelope-from ) id 1Pfdj7-0000QX-4b; Wed, 19 Jan 2011 19:29:53 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Wed, 19 Jan 2011 19:29:53 +0000 Message-Id: <1295465393-1620-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Christophe Lyon , patches@linaro.org Subject: [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar 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 Fix the register and part of register we get the scalar from in the various "multiply vector by scalar" ops (VMUL by scalar and friends). Signed-off-by: Peter Maydell --- target-arm/translate.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index c60cd18..0c2856a 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -3608,14 +3608,14 @@ static inline TCGv neon_get_scalar(int size, int reg) { TCGv tmp; if (size == 1) { - tmp = neon_load_reg(reg >> 1, reg & 1); - } else { - tmp = neon_load_reg(reg >> 2, (reg >> 1) & 1); - if (reg & 1) { - gen_neon_dup_low16(tmp); - } else { + tmp = neon_load_reg(reg & 7, reg >> 4); + if (reg & 8) { gen_neon_dup_high16(tmp); + } else { + gen_neon_dup_low16(tmp); } + } else { + tmp = neon_load_reg(reg & 15, reg >> 4); } return tmp; }