From patchwork Mon Aug 19 21:37:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 171727 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3572169ily; Mon, 19 Aug 2019 15:31:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwELurkAoAt2TlzvVtxcIZ7umnltH38w+zAsBuXpWRVBIcu5S948XgBJbk33sDjyl3FVO/g X-Received: by 2002:a50:900f:: with SMTP id b15mr27203599eda.229.1566253901214; Mon, 19 Aug 2019 15:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566253901; cv=none; d=google.com; s=arc-20160816; b=NmDljWsOhJTKCa9GnwpsJdWoOvvx+Yzx25oiF2q5xIjwz+lSt32fxtvyH/a5y6RB10 AaaPWBNzoTNhX78RKx2+aBNVQVej7Xa2pjG9XxjiaUAiUVeg1c8RZn/89rjdXwyQADrR 0DSi4pt3KTqwBqD4bZO3hh6es5HK8g6Gvlq0zNTsh/5vJ7PN4HDw/cuWVaDSSDEIHOl7 9N/TVnu1U5YtwsrG9q5q9+8Vp1lTdFzhahyTi77694a6D014ZV4LORm4IuVa60EinS7N gusEPlH8ZvvXhWeLwCe8It9W5vN/9YjOLd77UwRez+2PtOJ44NiFmM6W4iX+R0mBxFyi 2W7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=7K6tczexVR/nH6QwvmxJgfglbEd8tmNPs5dg0F0AA4A=; b=d44WvknLwWjh4TPjVJ8d+lnaDUEWhzAYhT+pbs85uX38QsSsxg/1TZ9yUuQ4kF4D30 jvGYm+gQL+9Q6gmPa5LpOVnp5ZjDy15RVjH1IrE68nXwSoDUcRdKxa+yBJiXkL6lHmyx jBcvealKWaopac4jhMH62e6hVXfA2SaQr9FkUTj/aqvbv0PaKCbZZPAVYRqU9UNggveC aXY3GhbJQ+p31kY5k3ax0Q2/FL2v3CDKI05C01hOv2EDALvQnO+ACOyomoAnZYicy/6P E3724zvqIAOmmC5F8rcjJ2uGSGj1T7vB+pj89RKFOZ7I4VTUj0rlZGuv76roty2H/QGq R/RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hECd8Rxj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w8si7618324ejb.308.2019.08.19.15.31.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Aug 2019 15:31:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hECd8Rxj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzqBg-0007rK-6U for patch@linaro.org; Mon, 19 Aug 2019 18:31:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60230) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzpN4-0003AG-Ir for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:39:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzpN3-00072F-FV for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:39:22 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:33455) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzpN3-00071d-AA for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:39:21 -0400 Received: by mail-pl1-x643.google.com with SMTP id go14so1587483plb.0 for ; Mon, 19 Aug 2019 14:39:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7K6tczexVR/nH6QwvmxJgfglbEd8tmNPs5dg0F0AA4A=; b=hECd8RxjJLaEU94oUtD7Lw0+XlymgEaTX2Sr6OJmvKodg1gXIMOPiDVlImf8414ku/ AKQbNJ8kpKNoHSa5LQQADHaFOkVNl+mF0D7MrVBZHvZam46Is6T0BB89dB94oC74lNgr rDfToz2SYwdjhtC6b3d4RMOjZhFuzbZ+0RzeXY0wzutCFUr/eLhzq5XtJ5VWPX/J4TQq 8oO0tMBUFOupGlUxxGDqVVbIr6DADHjtg9dMq0os1psU9iwBfdZ5WYOGPkFA4mhDvB3I sTF1FZ+DO0KFH8IZWgKTXhCf6IXs4C6Omi6XFPpxw/jXkb1xlVkgfVItPIowKDGiouBJ M/mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7K6tczexVR/nH6QwvmxJgfglbEd8tmNPs5dg0F0AA4A=; b=PnbeoJwkZ5sNYojYniNd1BW/fcASUqNFucohb1+VSuTiVDMdUEw3CJBmXGIGXHhtOX v4n+wiW6JKRVjhwPZGS8WDqKSbdUdqNn19BZ3LYFt/u/fEcYkvQSI6Eg3wEJhYtmfzqu hHbv8BORVORffLzTnuNCjkipLJIx3++VnMFZUxCsFTo0mHmgJjWCswHkIN+6TviR1jR3 Y8ObBNXivn5/6lFi21fuul7Qmokeh0gB6rWAQ8EeqJ7U/oSTd86vsm2Kk/FC3ZK4dDAK HbVx2Hv/2Z8HSp8G9fWhPKxifGWB2/PBcspZXu7nZoptkse2er2q8IzdLkcrL7HuDY2f FKig== X-Gm-Message-State: APjAAAViUyxEi5m1Bsj4mtqqq88Ug5io+7rmQIonERAzA/y2nAhYgh12 cPK9Sfrj9KHwITYnuNnn3MGWxGcw2G8= X-Received: by 2002:a17:902:834c:: with SMTP id z12mr10866725pln.8.1566250760089; Mon, 19 Aug 2019 14:39:20 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id d2sm13446951pjs.21.2019.08.19.14.39.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 14:39:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 19 Aug 2019 14:37:54 -0700 Message-Id: <20190819213755.26175-68-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190819213755.26175-1-richard.henderson@linaro.org> References: <20190819213755.26175-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::643 Subject: [Qemu-devel] [PATCH v2 67/68] target/arm: Clean up disas_thumb_insn X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Now that everything is converted, remove the rest of the legacy decode. Signed-off-by: Richard Henderson --- target/arm/translate.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) -- 2.17.1 Reviewed-by: Peter Maydell diff --git a/target/arm/translate.c b/target/arm/translate.c index f8997a8424..bac38e6261 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -10650,32 +10650,9 @@ static void disas_thumb2_insn(DisasContext *s, uint32_t insn) static void disas_thumb_insn(DisasContext *s, uint32_t insn) { - if (disas_t16(s, insn)) { - return; + if (!disas_t16(s, insn)) { + unallocated_encoding(s); } - /* fall back to legacy decoder */ - - switch (insn >> 12) { - case 0: case 1: /* add/sub (3reg, 2reg imm), shift imm; in decodetree */ - case 2: case 3: /* add, sub, cmp, mov (reg, imm), in decodetree */ - case 4: /* ldr lit, data proc (2reg), data proc ext, bx; in decodetree */ - case 5: /* load/store register offset, in decodetree */ - case 6: /* load/store word immediate offset, in decodetree */ - case 7: /* load/store byte immediate offset, in decodetree */ - case 8: /* load/store halfword immediate offset, in decodetree */ - case 9: /* load/store from stack, in decodetree */ - case 10: /* add PC/SP (immediate), in decodetree */ - case 11: /* misc, in decodetree */ - case 12: /* load/store multiple, in decodetree */ - case 13: /* conditional branch or swi, in decodetree */ - case 14: - case 15: - /* branches, in decodetree */ - goto illegal_op; - } - return; -illegal_op: - unallocated_encoding(s); } static bool insn_crosses_page(CPUARMState *env, DisasContext *s)