From patchwork Fri Feb 11 13:35:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 82757 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 CE032B712E for ; Sat, 12 Feb 2011 00:36:29 +1100 (EST) Received: from localhost ([127.0.0.1]:47874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PntAf-0007V7-Bt for incoming@patchwork.ozlabs.org; Fri, 11 Feb 2011 08:36:25 -0500 Received: from [140.186.70.92] (port=54658 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pnt9m-0007Qa-38 for qemu-devel@nongnu.org; Fri, 11 Feb 2011 08:35:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pnt9k-0001Yv-Uq for qemu-devel@nongnu.org; Fri, 11 Feb 2011 08:35:29 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:10729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pnt9k-0001YZ-LR for qemu-devel@nongnu.org; Fri, 11 Feb 2011 08:35:28 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.69) (envelope-from ) id 1Pnt9h-0004Wa-Qw; Fri, 11 Feb 2011 13:35:25 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 11 Feb 2011 13:35:25 +0000 Message-Id: <1297431325-17371-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH] target-arm: Correct conversion of Thumb Neon dp encodings into ARM 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 We handle Thumb Neon data processing instructions by converting them into the equivalent ARM encoding, as the two are very close. However the ARM encoding should have bit 28 set, not clear. This wasn't causing any problems because we don't actually look at that bit during decode; however it is better to do the conversion correctly to avoid problems later if we add checks to UNDEF on SBZ/SBO bits. Signed-off-by: Juha Riihimäki Reviewed-by: Peter Maydell --- target-arm/translate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 3087a5d..793fd59 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -8011,7 +8011,7 @@ static int disas_thumb2_insn(CPUState *env, DisasContext *s, uint16_t insn_hw1) /* Coprocessor. */ if (((insn >> 24) & 3) == 3) { /* Translate into the equivalent ARM encoding. */ - insn = (insn & 0xe2ffffff) | ((insn & (1 << 28)) >> 4); + insn = (insn & 0xe2ffffff) | ((insn & (1 << 28)) >> 4) | (1 << 28); if (disas_neon_data_insn(env, s, insn)) goto illegal_op; } else {