From patchwork Wed Aug 28 19:04:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 172464 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1224617ily; Wed, 28 Aug 2019 12:57:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAjU7Lmw/S92laZ7bWlLWYF2+K/uaF5qr7nIN3irCZESvWodEyoxBPE9v+aWvknSWrqW2x X-Received: by 2002:a05:620a:16a9:: with SMTP id s9mr5477864qkj.48.1567022267677; Wed, 28 Aug 2019 12:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567022267; cv=none; d=google.com; s=arc-20160816; b=nsSu6p7gW1ijMc9e4zPZIv7NoOLXiK4ogvGkE3lPnlsL/jRRxVzIxjQpM3uLy+vb1S HF6EFt+e67Twb1W557kjpfI4ZkHUE94I44izUKxxpjZvujWljH6jzX72P4kNCgvM+q1u 5ToHDp2S7/xQzjqQv58EpbbOHaQRPCMYQyu8+4cSPzfi7tA5PQTdBUMIYr73iMsa83fN AWgYJ4xoJ2lNuxH51YS008+0H3uCg9TxONOsoHIyCvh7XKZBtXYGCA9TizCMN8C8GCII kvQdw9r+wjCkPjm3+V1BJ9T0df2JqP66bw9vSXICMwLS/JnDcBSupbilHzPe8in50kE7 wCnQ== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=0SMzf99NHPKkTWoLRfHeddqKK5zZsCfVSTziSkomW74=; b=lTGfbJ7sqs2fQ27oUHBE0mxRxuNW9bTc2tHZa6vosjzRqqSGdrroeGJAlltkKWSFTv fAr44vaBWmLAYWgCTxzBv6O0V7BFpg2h9EG+hm4N5cWAmvpCL2wUa7PsXH6HfFFJ3qwg NUF8VvsMfRFvWN6knZWe82e8R3utNiXP+6Tz7OzrhFnxOCATYIldEvziaDvVJ1rXVZ3h TVv4WXpN6nLclQ+wya56Mva65Vv1TTjURSTuK9EUbzfZ4Ar78KZhvZQIEIHfbooHBK6P haFt3gTj7doe3sq9XWf0aIKojMspE7cSYROzx2AIRpTYY+KUo03+96KHLpabkfY/vVb7 tNjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=o9athz1c; 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 26si260085qkb.191.2019.08.28.12.57.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Aug 2019 12:57:47 -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=o9athz1c; 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]:41816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i344g-0004sZ-Ki for patch@linaro.org; Wed, 28 Aug 2019 15:57:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38498) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i33Gd-0003rT-R4 for qemu-devel@nongnu.org; Wed, 28 Aug 2019 15:06:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i33GZ-0000Uc-9j for qemu-devel@nongnu.org; Wed, 28 Aug 2019 15:06:01 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:39732) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i33GY-0000Ty-Sb for qemu-devel@nongnu.org; Wed, 28 Aug 2019 15:05:59 -0400 Received: by mail-pg1-x541.google.com with SMTP id u17so220173pgi.6 for ; Wed, 28 Aug 2019 12:05:58 -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 :mime-version:content-transfer-encoding; bh=0SMzf99NHPKkTWoLRfHeddqKK5zZsCfVSTziSkomW74=; b=o9athz1cN8z7ysn/AeMY5z5p05i0NYludTqS5KfjUvY/ksbmAKVtnkPO+dMxoC8BkN 54pGppMXIu8Gac8IRrN5YF+puPLOEQCOOFxJsPHt/9Qc3jGGqQOxPRWeqTpasKgTeV9x xehdyziK1ZaTSCtkXloiJ/RmFbXAHGP01PGS5IlGEYFKOi8GiVLLCtaQ1TVjz/yr522l np7FI2oXUPspoZXrhpVwNJi5XIfWZunr8LAmXrPpDR0g0PyGpJYYd1nAZNq5X4KQ2L3B hjaIMCC05Sh/3PL4Y5wWVnJHQOgUkYobvyxyw5ljFBT8mSXtAXSeVXgcq2O8Rnjmgp3Z mAWQ== 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:mime-version:content-transfer-encoding; bh=0SMzf99NHPKkTWoLRfHeddqKK5zZsCfVSTziSkomW74=; b=qG8nFSCliEtCZambEaXVoQ0olMAAHSWqbGWQ4AXAKN2w89pZHMci7vGWlRhJbKJT59 o3Qp8oLG8ELi0/voNNAq2dWBUVrx+u24+rNBuH6MsEimgNcPy9CqbSY+rgkJzJDixjRX yb3gjxG/vek1mpj8H5YMA+lmKxqOChqPZ20Z1o3bNJYVl0tWFe8GbGvDvOD9YTpOFOU0 v0rEzh6vGddi9vUFcpIZ3/0Wv8SUM0hJUm11UQEqkW/Jep6JsJauq5o8uwuo0mkmi5Ka mXYsfR+q4hvxA6JYuQGCjcCXDWOqaPUrvK6b2GfZQN93KgWorUi+trd5eaIh40KJPXMf feOA== X-Gm-Message-State: APjAAAVmNH88gmi0YHloMNWHVuPlhJk4TGYRuiN+lK7YLU8FpND15f5z DHieCb3WiREQysLBykuspyrQzkZa4rA= X-Received: by 2002:a62:b415:: with SMTP id h21mr6525106pfn.198.1567019157501; Wed, 28 Aug 2019 12:05:57 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id f27sm2967944pgm.60.2019.08.28.12.05.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2019 12:05:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 28 Aug 2019 12:04:32 -0700 Message-Id: <20190828190456.30315-46-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190828190456.30315-1-richard.henderson@linaro.org> References: <20190828190456.30315-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 Subject: [Qemu-devel] [PATCH v3 45/69] target/arm: Add skeleton for T16 decodetree 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" Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate.c | 6 ++++++ target/arm/Makefile.objs | 6 ++++++ target/arm/t16.decode | 20 ++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 target/arm/t16.decode -- 2.17.1 diff --git a/target/arm/translate.c b/target/arm/translate.c index defbcf68db..106ef08ada 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -7534,6 +7534,7 @@ static int t32_branch24(DisasContext *s, int x) #include "decode-a32.inc.c" #include "decode-a32-uncond.inc.c" #include "decode-t32.inc.c" +#include "decode-t16.inc.c" /* Helpers to swap operands for reverse-subtract. */ static void gen_rsb(TCGv_i32 dst, TCGv_i32 a, TCGv_i32 b) @@ -10646,6 +10647,11 @@ static void disas_thumb_insn(DisasContext *s, uint32_t insn) TCGv_i32 tmp2; TCGv_i32 addr; + if (disas_t16(s, insn)) { + return; + } + /* fall back to legacy decoder */ + switch (insn >> 12) { case 0: case 1: diff --git a/target/arm/Makefile.objs b/target/arm/Makefile.objs index 7806b4dac0..cf26c16f5f 100644 --- a/target/arm/Makefile.objs +++ b/target/arm/Makefile.objs @@ -43,12 +43,18 @@ target/arm/decode-t32.inc.c: $(SRC_PATH)/target/arm/t32.decode $(DECODETREE) $(PYTHON) $(DECODETREE) --static-decode disas_t32 -o $@ $<,\ "GEN", $(TARGET_DIR)$@) +target/arm/decode-t16.inc.c: $(SRC_PATH)/target/arm/t16.decode $(DECODETREE) + $(call quiet-command,\ + $(PYTHON) $(DECODETREE) -w 16 --static-decode disas_t16 -o $@ $<,\ + "GEN", $(TARGET_DIR)$@) + target/arm/translate-sve.o: target/arm/decode-sve.inc.c target/arm/translate.o: target/arm/decode-vfp.inc.c target/arm/translate.o: target/arm/decode-vfp-uncond.inc.c target/arm/translate.o: target/arm/decode-a32.inc.c target/arm/translate.o: target/arm/decode-a32-uncond.inc.c target/arm/translate.o: target/arm/decode-t32.inc.c +target/arm/translate.o: target/arm/decode-t16.inc.c obj-y += tlb_helper.o debug_helper.o obj-y += translate.o op_helper.o diff --git a/target/arm/t16.decode b/target/arm/t16.decode new file mode 100644 index 0000000000..e954f61fe4 --- /dev/null +++ b/target/arm/t16.decode @@ -0,0 +1,20 @@ +# Thumb1 instructions +# +# Copyright (c) 2019 Linaro, Ltd +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, see . + +# +# This file is processed by scripts/decodetree.py +#