From patchwork Thu Jun 13 12:14:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 166635 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp723424ilk; Thu, 13 Jun 2019 05:55:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzhKhWx5DP8ojnRVeRWA2MwBTyDgno1ELFFqaOJc1biNYQKWEtAC5KwzdgSlW0IyBiSul7X X-Received: by 2002:ac8:2763:: with SMTP id h32mr77061406qth.350.1560430540510; Thu, 13 Jun 2019 05:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560430540; cv=none; d=google.com; s=arc-20160816; b=xm5gjAfVXUrkDqrN/iO4Btc6H1ldkgyqJ+T2UV9MAWITRSnPUcnQnvC522mxGbfr81 jb18tFOXU47JPNteU+/zHBRHZSAbrshL+uKlo5kbiAYGSSAK4pNN9w9DbOqOq9XdjHKG hEQgxy+rl5NnHUn1mhg9fxBxRcX0drCtDeWYrCahgTjOCQRpLaFqv2Ij/V05QIek//kq noNmdSUETCQxNJinXSU2kCpX3I5tEDzRZxRJoQ0fky+Xqvo7c5uFQVzPz9zEPYPr/qHf EGHFn5PF8hfVtO0XcFTrr7WQAOsF+9mnXDkuRi+kIt8DyZBaJqySY8y0jBqWqGduBPI2 sm6w== 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=4keYJTShaE3kyMWHr8Guw8e7EydlG5N8a+TAXs29Ato=; b=aLpT8SxXO0m1nZM2k7uoax4/I2yYdg/wFNycljuTBVnIDlLBuNxNeR0NyF1sTfMfh3 XyBjnS+LKWOBwP0I35YriB6bbPMm7ua08ahUBk6NRrZkllmZDZsXwNURri/QOE4+Ip86 9vf1yctihXm0fApxbftRP5L4mkOPKbmWVxBuL4sqztlzVKRSNs00eRkTs8uo8Weoy2Tm j/b+wgD85dajd0AazyXjC9g+fFsROJ5MKu5belorL7NIzKsyA+eB5w1rOpuPnPV9zlxj Mt5aVdAvgVnMP7UlYq8L16oXrOgaO7KakgtxeEbUZIBVsNBHi/c7EtBfvzIvWHs0zIr3 ZkZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KaiXqWA1; 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 t12si1799913qte.169.2019.06.13.05.55.40 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jun 2019 05:55:40 -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=KaiXqWA1; 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]:39530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbPGW-0002R5-01 for patch@linaro.org; Thu, 13 Jun 2019 08:55:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59259) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbOdW-0008BC-21 for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbOdT-0004XM-SC for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:21 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:45624) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbOdR-0004KJ-Li for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:19 -0400 Received: by mail-wr1-x444.google.com with SMTP id f9so20488068wre.12 for ; Thu, 13 Jun 2019 05:15:07 -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=4keYJTShaE3kyMWHr8Guw8e7EydlG5N8a+TAXs29Ato=; b=KaiXqWA1SqB2S3kxrhKzGXmCGCCuv8j078OreQRhYMQM2exCWTCM/iPdJNPZuQZp1/ vDRB+0zuPHp8upJUY5VbqPXrOadmfD0p9eXIHB9fJahHL5HtfItjv3svdVkY5cxn1cRu F0LGTCh3cLB70a2kNpY2wnSLBv/ZedrvAOXxNa1FDfZr1yPedsZgY2vWid6DAuK9yQIB ePzGXSlEbTrD92T5/78iCkYEbkQD+5lJAfnwRMemIDbh1d4oaMrrbwfcFklxaZSj1ZCv qwJwZK8IhuBVpF/Ww6/j5j0IUsWO2003WMtr4sRxjkDApPZKCVonnFzlEYXF3mwj7/ic uGPQ== 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=4keYJTShaE3kyMWHr8Guw8e7EydlG5N8a+TAXs29Ato=; b=lIhBxcOEcGkoHHUX45v7bbzYSkmPr2D6Zrj4LCX74mZlr3VKWJCNNG5Z0xPYIpD6C+ k6ntnsn4PfOapjCaOkjbEosQoygJag2uO6LvYybY5ljdZA2YOCQNtVX1GQM5MGMQH3m1 r0IpggZUJIXmr2AobPW/aB9puFPx89JjF/jnXzXi139jDGI+vmdwWbnb6leisBHcKkmK nrSrbbnfkyOGcQcg5BgDmRCwsiU+H/ZCicgQR4WzOAzyzsvcYSBz5DcLLWt5VVlAaB9u lmQsJLt/y8/GVbJWqQTj0oHyZCKnonkHNWVQi/e4dxFrIRmfKpD5UVn+xpd1MjTJI78d vOsA== X-Gm-Message-State: APjAAAWhkxhokvOz+T56HCl55r+PzsBGXm5lNUcghnev2TkwNNDVl0yO 7n8rFwpYC9gjZGzLQGlrglduilW1HAx82Q== X-Received: by 2002:adf:e8c8:: with SMTP id k8mr31277546wrn.285.1560428106361; Thu, 13 Jun 2019 05:15:06 -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.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 05:15:05 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 13:14:13 +0100 Message-Id: <20190613121433.5246-29-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::444 Subject: [Qemu-devel] [PULL 28/48] target/arm: Convert VMUL 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 VMUL instruction to decodetree. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/translate-vfp.inc.c | 10 ++++++++++ target/arm/translate.c | 5 +---- target/arm/vfp.decode | 5 +++++ 3 files changed, 16 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c index 8532bf4abcd..a2afe82b349 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc.c @@ -1417,3 +1417,13 @@ static bool trans_VNMLA_dp(DisasContext *s, arg_VNMLA_sp *a) { return do_vfp_3op_dp(s, gen_VNMLA_dp, a->vd, a->vn, a->vm, true); } + +static bool trans_VMUL_sp(DisasContext *s, arg_VMUL_sp *a) +{ + return do_vfp_3op_sp(s, gen_helper_vfp_muls, a->vd, a->vn, a->vm, false); +} + +static bool trans_VMUL_dp(DisasContext *s, arg_VMUL_sp *a) +{ + return do_vfp_3op_dp(s, gen_helper_vfp_muld, a->vd, a->vn, a->vm, false); +} diff --git a/target/arm/translate.c b/target/arm/translate.c index 0b998552df2..34be68fb8cb 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -3112,7 +3112,7 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn) rn = VFP_SREG_N(insn); switch (op) { - case 0 ... 3: + case 0 ... 4: /* Already handled by decodetree */ return 1; default: @@ -3298,9 +3298,6 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn) for (;;) { /* Perform the calculation. */ switch (op) { - case 4: /* mul: fn * fm */ - gen_vfp_mul(dp); - break; case 5: /* nmul: -(fn * fm) */ gen_vfp_mul(dp); gen_vfp_neg(dp); diff --git a/target/arm/vfp.decode b/target/arm/vfp.decode index c50d2c3ebf3..d7fcb9709a9 100644 --- a/target/arm/vfp.decode +++ b/target/arm/vfp.decode @@ -117,3 +117,8 @@ VNMLA_sp ---- 1110 0.01 .... .... 1010 .1.0 .... \ vm=%vm_sp vn=%vn_sp vd=%vd_sp VNMLA_dp ---- 1110 0.01 .... .... 1011 .1.0 .... \ vm=%vm_dp vn=%vn_dp vd=%vd_dp + +VMUL_sp ---- 1110 0.10 .... .... 1010 .0.0 .... \ + vm=%vm_sp vn=%vn_sp vd=%vd_sp +VMUL_dp ---- 1110 0.10 .... .... 1011 .0.0 .... \ + vm=%vm_dp vn=%vn_dp vd=%vd_dp