From patchwork Fri Jul 26 17:50:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 169913 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp364632ilk; Fri, 26 Jul 2019 11:02:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyS0LzTHK5+ogqopUXniQue3sIVB7MrKBGzwO1x8DhpMVy++yLUvZ2Wbb3Yj6pZCv2Qp0sK X-Received: by 2002:a05:6402:129a:: with SMTP id w26mr83253708edv.167.1564164121104; Fri, 26 Jul 2019 11:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564164121; cv=none; d=google.com; s=arc-20160816; b=FLrtcjs1kAREx9eJREA8PML+Z1ENrGuFA7CDa668h8peoHull1HdU4FY38dBGwjVLe DRI+a5bz/xva2WqLhMQ/c8EdOAroEKZUHNivyoYs7mGHCVFlBbW7JzRxAgvSv5YSUt9K S46rvwW3iKeKNOQmURVUW0kArCqeWp8nHYkAGBFBobt9mgprGUed+TQNdc8yf3PzQ1sV TGc5hg50PyEG13lsSrMPRwXfcwMAuSo127Tm9RdqTtN4jra0qk2k0BFpSOPxawKhy27H JrkdvSuZpvi+0nl1xpW+4VSgm62pq9467KleGzV34GlLR3egCNu7vmfpjxCE+Plzf6rx i0vg== 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=BeJ+pb6ctnzLHVd1R33fd022stp222LK5CW6SHtredI=; b=J4mIkxiDRxF6QYhNH4CJYNPU9/WoerXxbbZxQHIPTgy/RrKVgAu5xEHhCqJOlxV5Kj G3gUFGbu9nlPNkfF0xpbiB2GZQskeJWHQfEqPSgV2VDlgUaDpKvfgOsesTh+5AJTbtjl 1yo0Hf0R6Z7MMUCsMo1cLNwlItLBwyCCdgz9E/ZWNX/EbJRjzLFIuw6cBSqOB4+1VLH1 5MYdvWJAHTL9TgpZ6qpfBp1C8hgmNo5+nXM8xzwSM2vgviu6YwaTSSlzWMblzJb6XZLT IMtPenbIk3rZJHyGQxa2o8uj1FN8ipQNJbt08WszKC3dXfzuSOwscjC8fT2+AaDyVosQ tpUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=pZqwVVtH; 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 u12si11445981ejz.73.2019.07.26.11.02.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jul 2019 11:02:01 -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=pZqwVVtH; 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]:42626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr4XX-0006Vv-4A for patch@linaro.org; Fri, 26 Jul 2019 14:01:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58836) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr4NS-0005Cv-Jy for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:51:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hr4NO-0000jk-Cf for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:51:31 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:41596) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hr4NO-0000e4-5r for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:51:30 -0400 Received: by mail-pf1-x441.google.com with SMTP id m30so24865980pff.8 for ; Fri, 26 Jul 2019 10:51:28 -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=BeJ+pb6ctnzLHVd1R33fd022stp222LK5CW6SHtredI=; b=pZqwVVtHLxWhL94AkDYYgYTXk1sGL8fnfLESWlIPloluyfnCXCrXrlQok3gH3Hod8O 2DN/m31BMtPDGnBdhJnjasfsVoc1IaApeEhwh1gauPzgOg1nOlUkhOAb5YQ6cMKc/uuI xTXO7w0KqHU9ePwl25vFJ9t3j7lZhhIm7LfaLB8VS09mSmvVza6OBAZSlvZVjEfNO3YV WXcJJWCrCyq9Qgp0PpBCC62jmn4n3hhYfoJdDWrERwKza+p4pLDjfCeSPRmNW11iy9o9 5FqdDPpou1NF9S7wRRJGkdWOIZVsgWB6ygCM6m1oF75PJucJWmwWIY3scZSG3DpS5Wkg NReg== 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=BeJ+pb6ctnzLHVd1R33fd022stp222LK5CW6SHtredI=; b=Rltmb1lQvSv9YFSg7QNyed+asvXNd5Pyfg3U9nUdwGocgraRf7xc7RSsNiqZxNw30W hTg8TkuAp1yxSq+fEmHiqmIGIukp4axFwGmUKPs5nVC92P4LUC/zQJ+2qSjHkvSZANK7 +qyhODLoHSDViDAbhU6U9hD2TsJC/qHS9ZCI1OsBCKvsabPccCGlgqLC2tKuXr3RYPGc 2qhpnVCO1gSz5laok6NZpPZIOmUM5MDVPDYK5TMonnGHoV8dS//Xhtz/E9s+U6AF6vDa VYvuS9DaUtBgECZUcXUXRYU66abP+CewIBdZXm00Y4HLTz1GOz965tpMzAA85y4N/Tn9 pUiw== X-Gm-Message-State: APjAAAVjnkffmdh07P9euE3Qno1QZp3SyCKYgaKQsiBZalDvbOR3eNe3 BxEP58hSX9OVRZuYsCCDcXr677uXweQ= X-Received: by 2002:a17:90a:d814:: with SMTP id a20mr99531064pjv.48.1564163486971; Fri, 26 Jul 2019 10:51:26 -0700 (PDT) Received: from localhost.localdomain (97-126-117-207.tukw.qwest.net. [97.126.117.207]) by smtp.gmail.com with ESMTPSA id o24sm104287919pfp.135.2019.07.26.10.51.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 10:51:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 10:50:08 -0700 Message-Id: <20190726175032.6769-44-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190726175032.6769-1-richard.henderson@linaro.org> References: <20190726175032.6769-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::441 Subject: [Qemu-devel] [PATCH 43/67] 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, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 65a74a963b..db93b12608 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -7608,6 +7608,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" #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE # pragma GCC diagnostic pop @@ -10559,6 +10560,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 +#