From nobody Wed Apr 16 05:31:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1560431759; cv=none; d=zoho.com; s=zohoarc; b=icRKL52as8dJb0azgADSBUIgZhoBSNrgCdAeBIfB1Wm3SVCmk/FbflGyPF/zXjnpFB0U8sFbZQ+YHs+D9iTRler+Tr1yblY5gQREP7fMNlbvbKDm1OixQna+05tE5Hy45NTxNWfiMMHuA5Koe0aMbW1wF2gIyEEYHva06MddmnY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560431759; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Xek76Z21N6AcxCeV/KMXFd6TB5Qk1G4QFM9zTsJV+oA=; b=a1ARuMp34+HD/BxavUygWWBOlDgfzqXnN4MHbeBdqFDxabpnPQdrxjU2v9tHRpwrWNLxFKtxJX6W3csQMn+B0P29T7eDdxFx229S00VuZJ5G93ka6R+ryK5bH4S80cqAgtVN6Y9ZXIdClfXWzwIZ7zXr4Z2JBqr2HgYuLRJO4j4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560431759214854.5269417465995; Thu, 13 Jun 2019 06:15:59 -0700 (PDT) Received: from localhost ([::1]:39624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbPa7-0000F9-8K for importer@patchew.org; Thu, 13 Jun 2019 09:15:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59370) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbOdZ-0008HA-Ub for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbOdU-0004aP-Kf for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:25 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:47025) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbOdU-0004ND-5v for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:20 -0400 Received: by mail-wr1-x442.google.com with SMTP id n4so20484152wrw.13 for ; Thu, 13 Jun 2019 05:15:11 -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.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 05:15:09 -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=Xek76Z21N6AcxCeV/KMXFd6TB5Qk1G4QFM9zTsJV+oA=; b=NbE333tJ3eT3wD79M9E226KMwElA1OMqzy4AoZWfEjyu93jMjmVtx0h20r+fRISPe/ 7a97oZIwh4FlwqUUUXMCwT33H13i4eM8/noegKXTH851JIP/VKpHNfntfLIkQpezlUhC jWp+SOy3LBSIL/SB9b0/mnrJ8U1mj2qbUnq6uLaCEHpEzuBlDx6EB+/LTg7Bdyz9qqEZ 491nxlT/Gi5vvoyn4M8xFau2P+wrWQl7wE6P1itRbCU3UWHNxtOaQscPkND5RSYf0mlq haHch9/NWVwuE5Moxp9aWt/IyiEdSwVoCQlo4kSZwbxoamvfY/MHJk/p7csDTmq4/LjW 2amg== 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=Xek76Z21N6AcxCeV/KMXFd6TB5Qk1G4QFM9zTsJV+oA=; b=UwrA/8oZevii0WUGacWfskalhNYHGRFySGvfXlGqR9569chfpmrR428fTrQ4py4lfZ Hlbe/WSC7OiPKoNRakt2xaATwqEbW3sQdRTAqQt238v7zdrkAhMbzh7y3HYrE1dVqX2l i1/oyzcQAaxUcWBN56acxonUDILLW5RsTdsyBWODOvTSoRWCYTT4vnV2fZ4K7MbCtfgt QcsWVz4NX9IoAOxtnqXv6g5UHBp7XPGxp+oG1wGAfmPSIfVy5uBBvlGz/sakCFpPXper qVc/5m8NdTkArB4Ici5/1v8jzsXwEc3jy76AAQMKdoypMVNJ5nZMYf5L5jWZu2QC6cH1 HvZg== X-Gm-Message-State: APjAAAU83aX7nTVklFXDVcZrwpytovH3vnzeZT2jLvoDeYMokHObTPmi RkJ0ovw1S/hhMf4/PtBMxkURJlypJGEpPw== X-Google-Smtp-Source: APXvYqwDH0/0t5N/YteAwPqW1fUU/e8HwP2bK66kAcgvnVlmZvlLnKK3VU50ODXVGljxOrWz9h6D5w== X-Received: by 2002:adf:9cd0:: with SMTP id h16mr42665889wre.211.1560428109883; Thu, 13 Jun 2019 05:15:09 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 13:14:17 +0100 Message-Id: <20190613121433.5246-33-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 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PULL 32/48] target/arm: Convert VDIV 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Convert the VDIV instruction to decodetree. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/translate-vfp.inc.c | 10 ++++++++++ target/arm/translate.c | 21 +-------------------- target/arm/vfp.decode | 5 +++++ 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c index 12da3b8acb8..6af99605d5c 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc.c @@ -1471,3 +1471,13 @@ 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, fals= e); } + +static bool trans_VDIV_sp(DisasContext *s, arg_VDIV_sp *a) +{ + return do_vfp_3op_sp(s, gen_helper_vfp_divs, a->vd, a->vn, a->vm, fals= e); +} + +static bool trans_VDIV_dp(DisasContext *s, arg_VDIV_sp *a) +{ + return do_vfp_3op_dp(s, gen_helper_vfp_divd, a->vd, a->vn, a->vm, fals= e); +} diff --git a/target/arm/translate.c b/target/arm/translate.c index a7f79395e31..d802f046769 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1374,22 +1374,6 @@ static TCGv_ptr get_fpstatus_ptr(int neon) return statusptr; } =20 -#define VFP_OP2(name) \ -static inline void gen_vfp_##name(int dp) \ -{ \ - TCGv_ptr fpst =3D get_fpstatus_ptr(0); \ - if (dp) { \ - gen_helper_vfp_##name##d(cpu_F0d, cpu_F0d, cpu_F1d, fpst); \ - } else { \ - gen_helper_vfp_##name##s(cpu_F0s, cpu_F0s, cpu_F1s, fpst); \ - } \ - tcg_temp_free_ptr(fpst); \ -} - -VFP_OP2(div) - -#undef VFP_OP2 - static inline void gen_vfp_abs(int dp) { if (dp) @@ -3109,7 +3093,7 @@ static int disas_vfp_insn(DisasContext *s, uint32_t i= nsn) rn =3D VFP_SREG_N(insn); =20 switch (op) { - case 0 ... 7: + case 0 ... 8: /* Already handled by decodetree */ return 1; default: @@ -3295,9 +3279,6 @@ static int disas_vfp_insn(DisasContext *s, uint32_t i= nsn) for (;;) { /* Perform the calculation. */ switch (op) { - case 8: /* div: fn / fm */ - gen_vfp_div(dp); - break; case 10: /* VFNMA : fd =3D muladd(-fd, fn, fm) */ case 11: /* VFNMS : fd =3D muladd(-fd, -fn, fm) */ case 12: /* VFMA : fd =3D muladd( fd, fn, fm) */ diff --git a/target/arm/vfp.decode b/target/arm/vfp.decode index de56f44efc9..de305f60e18 100644 --- a/target/arm/vfp.decode +++ b/target/arm/vfp.decode @@ -137,3 +137,8 @@ VSUB_sp ---- 1110 0.11 .... .... 1010 .1.0 .... \ vm=3D%vm_sp vn=3D%vn_sp vd=3D%vd_sp VSUB_dp ---- 1110 0.11 .... .... 1011 .1.0 .... \ vm=3D%vm_dp vn=3D%vn_dp vd=3D%vd_dp + +VDIV_sp ---- 1110 1.00 .... .... 1010 .0.0 .... \ + vm=3D%vm_sp vn=3D%vn_sp vd=3D%vd_sp +VDIV_dp ---- 1110 1.00 .... .... 1011 .0.0 .... \ + vm=3D%vm_dp vn=3D%vn_dp vd=3D%vd_dp --=20 2.20.1