From patchwork Mon Jun 17 13:00:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= X-Patchwork-Id: 251845 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 22F742C00B1 for ; Mon, 17 Jun 2013 23:01:17 +1000 (EST) Received: from localhost ([::1]:47734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoZ3a-0007lN-8i for incoming@patchwork.ozlabs.org; Mon, 17 Jun 2013 09:01:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoZ3D-0007kP-MP for qemu-devel@nongnu.org; Mon, 17 Jun 2013 09:00:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UoZ3B-0005GI-0l for qemu-devel@nongnu.org; Mon, 17 Jun 2013 09:00:51 -0400 Received: from 46-65-204-42.zone16.bethere.co.uk ([46.65.204.42]:46171 helo=unicorn.mansr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoZ3A-0005G2-Po for qemu-devel@nongnu.org; Mon, 17 Jun 2013 09:00:48 -0400 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 2C2BD15393; Mon, 17 Jun 2013 14:00:46 +0100 (BST) From: Mans Rullgard To: qemu-devel@nongnu.org Date: Mon, 17 Jun 2013 14:00:42 +0100 Message-Id: <1371474042-4956-1-git-send-email-mans@mansr.com> X-Mailer: git-send-email 1.8.2.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 46.65.204.42 Subject: [Qemu-devel] [PATCH] target-arm: decode TBB/TBH more thoroughly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This avoids other opcodes being incorrectly decoded as TBB/TBH. The LDA/STL instructions new in ARMv8 use this space. Signed-off-by: Mans Rullgard --- This was previously sent as part of the LDA/STL patch. Separating it seems clearer. --- target-arm/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 3ffe7b8..bc41f7e 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -8126,7 +8126,7 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw gen_store_exclusive(s, rd, rs, 15, addr, 2); } tcg_temp_free_i32(addr); - } else if ((insn & (1 << 6)) == 0) { + } else if ((insn & (7 << 5)) == 0) { /* Table Branch. */ if (rn == 15) { addr = tcg_temp_new_i32();