From patchwork Thu Jun 13 12:14:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 166633 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp722511ilk; Thu, 13 Jun 2019 05:54:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNytltuBgbLmjyzfiAmK+AagDXIyB5/wKJPwtwhsdwu4HFbkuPKHtaA+ogbtRG0dNLDokG X-Received: by 2002:a37:a1d6:: with SMTP id k205mr52192883qke.171.1560430486837; Thu, 13 Jun 2019 05:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560430486; cv=none; d=google.com; s=arc-20160816; b=GWt/RIo4I/2jnl5P0cakqZfja53E0q10dcQlygQY+PActkfwYs8Q51zk11scfIPDef AzHTJx1+uCbWs/gMIX+ane8LcaDCUJO0/QcuUoXlUF9r4MyyYWjXMHpRq3IWbFZvx4u+ Y9t3z4MEdX2sZ8xZeDBFDruBgxyJzT27Yuqcs7GVXnyg6CsI+Hx8rNBMmo0AK4es9/Ad UzgYiDKD558s4lzjpe93rOkjfQkiIoRUv+g8JW9lMpvqgbefLW6iIJPuVshN2Kuj7BlG l4n+vyYvFkfD7OpSpjSNT8B4CSLsp0R2EdYvlSPZrHeEkct27ssHTQn004rrYduuuDV4 A5KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=n6lixbnjvJpGmbP+wJzw0YyYNuM8C0qvQLRRdQPH6UY=; b=CvNmcokdU52Yjl/DubfWL1QvhUiyezGNbH6GsIqUg7eFoH8pS3M/sW+AXeTGLdfpfi Z/sjEBjSMJyEB8tgpG9isNXPB4m2iOkcTeIPm2LwjXyJjpMhEwzCD6XYBmj2sbiaT1XC Pcpr9sZRTPMWKRLnU//4ZVwBJe5ZmzRDmAQ7rb0YAEfr/CulbQkm68fejbNfqlj84IsQ hPXyqJsnQUMVd4/gK5Fgy5ojgujexWsa10uRgA25vqVimaM4/P+X1fjANUeRLUI9K2dm YOhrWi/EEXv+wSyVdZbrtmthRg2yjmzinwnFunKO3FFtFPaZFgGPLWSSIVC10gl9D4fo b2tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Lnyco95W; 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 k4si1692807qte.360.2019.06.13.05.54.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jun 2019 05:54:46 -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=Lnyco95W; 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]:39522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbPFe-0001Mj-DB for patch@linaro.org; Thu, 13 Jun 2019 08:54:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59131) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbOdR-00085b-JK for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbOdN-0004QP-A0 for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:15 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:34062) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbOdL-0004Mq-By for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:13 -0400 Received: by mail-wm1-x331.google.com with SMTP id w9so6496220wmd.1 for ; Thu, 13 Jun 2019 05:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=n6lixbnjvJpGmbP+wJzw0YyYNuM8C0qvQLRRdQPH6UY=; b=Lnyco95WaHnU9n7B1RJc4kb4AqyZbhXBY9WPW+5ETnNyL4c2QJm7lnqJhKOZVAt0vx C9oUDSvQCm7LB7P2TksNuv6h0M2c9dQ4KcglPuZqIJX+bkcJ/27W91Pd/T8qkraWHEXg keKVbLsj5IA2J+CigRXqUQnm/tvSv+hO3FnjrYLApePECTr4Yt4N5OjvKboUrw0Iu/Q5 g+WxLhv8zvff5Z0Ck2yXl87wReEZxbCxYU47MUp51v7939m+sYURC87BhHa81e3lLBZl +QZC6aHbpvJ6qXc3XY/51DKjz7F0XfwRUo9GfNvcctMBDnB0lsu1ybE1stqlhw/ndz0m KcAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n6lixbnjvJpGmbP+wJzw0YyYNuM8C0qvQLRRdQPH6UY=; b=gD51Mc6DWK39VJMt8/+oJ+zmdjgoJ4RwMrB/oiMHeY7CAnefVHexd/6WvoHP7UADUv 3heD3T15TWw4hxS4XMUDGkCLSFg9m8/wD5HYMgfySCPdVmMSoL81hArvil3PGQdCmBlL GyK9O51+yp1Pq7NcO7amroIqgf2RdW5vIirN0OL1yGZUq5vIVshWyMgzXsehmm+JiJFg CH6xgIAMNePUPWcVP06Hc19rdhniqlaxiUuROjM9xtMVWP2Xo9Qg37xeYZF9HOSTBTtu M40xceZ8xJVi49wmyEySyOaFJAawcwxRl8bMkmSHLSfgO3bsy1ovbj7cFiRJf9NJrbCf mBwg== X-Gm-Message-State: APjAAAUktFXkb/Ujp56AxlBPbU2i4d4WjBheHoEBzQw7VzShMsvaCgtv G/MrxFKLWvjd6ZQQsDbH9zCeq1VCM058GQ== X-Received: by 2002:a1c:3942:: with SMTP id g63mr3191936wma.61.1560428108976; Thu, 13 Jun 2019 05:15:08 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id y6sm2010576wrp.12.2019.06.13.05.15.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 05:15:08 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 13:14:16 +0100 Message-Id: <20190613121433.5246-32-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613121433.5246-1-peter.maydell@linaro.org> References: <20190613121433.5246-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::331 Subject: [Qemu-devel] [PULL 31/48] target/arm: Convert VSUB to 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Convert the VSUB instruction to decodetree. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/translate-vfp.inc.c | 10 ++++++++++ target/arm/translate.c | 6 +----- target/arm/vfp.decode | 5 +++++ 3 files changed, 16 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c index 14aeb25f597..12da3b8acb8 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc.c @@ -1461,3 +1461,13 @@ static bool trans_VADD_dp(DisasContext *s, arg_VADD_sp *a) { return do_vfp_3op_dp(s, gen_helper_vfp_addd, a->vd, a->vn, a->vm, false); } + +static bool trans_VSUB_sp(DisasContext *s, arg_VSUB_sp *a) +{ + return do_vfp_3op_sp(s, gen_helper_vfp_subs, a->vd, a->vn, a->vm, false); +} + +static bool trans_VSUB_dp(DisasContext *s, arg_VSUB_sp *a) +{ + return do_vfp_3op_dp(s, gen_helper_vfp_subd, a->vd, a->vn, a->vm, false); +} diff --git a/target/arm/translate.c b/target/arm/translate.c index 2341479a7c2..a7f79395e31 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1386,7 +1386,6 @@ static inline void gen_vfp_##name(int dp) \ tcg_temp_free_ptr(fpst); \ } -VFP_OP2(sub) VFP_OP2(div) #undef VFP_OP2 @@ -3110,7 +3109,7 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn) rn = VFP_SREG_N(insn); switch (op) { - case 0 ... 6: + case 0 ... 7: /* Already handled by decodetree */ return 1; default: @@ -3296,9 +3295,6 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn) for (;;) { /* Perform the calculation. */ switch (op) { - case 7: /* sub: fn - fm */ - gen_vfp_sub(dp); - break; case 8: /* div: fn / fm */ gen_vfp_div(dp); break; diff --git a/target/arm/vfp.decode b/target/arm/vfp.decode index d911f12dfd0..de56f44efc9 100644 --- a/target/arm/vfp.decode +++ b/target/arm/vfp.decode @@ -132,3 +132,8 @@ VADD_sp ---- 1110 0.11 .... .... 1010 .0.0 .... \ vm=%vm_sp vn=%vn_sp vd=%vd_sp VADD_dp ---- 1110 0.11 .... .... 1011 .0.0 .... \ vm=%vm_dp vn=%vn_dp vd=%vd_dp + +VSUB_sp ---- 1110 0.11 .... .... 1010 .1.0 .... \ + vm=%vm_sp vn=%vn_sp vd=%vd_sp +VSUB_dp ---- 1110 0.11 .... .... 1011 .1.0 .... \ + vm=%vm_dp vn=%vn_dp vd=%vd_dp