From nobody Thu Dec 18 22:26:27 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=1560783549; cv=none; d=zoho.com; s=zohoarc; b=M6CxDMT38v59F00O29uhKanVf8XLjOgIsPCjIm9z0jE0plKherPWbkW2mYMdgG5cVJYIOL0YY6GxaEicBz+ovKssGP9lTWxqqdw8YmlRxd8y7M5/QnzGeeOokPgBZR9it2yF7vKhjNb7vU7U8MLDUUACg4Db5p8n7crjEpQuX3c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560783549; h=Content-Type: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=QH/DDBGbAAKw5E22C6nxXcLX4pRMuc/olgVu3SfYiz4=; b=IeKqzRfVYe8qbpXrgd0+ZzeGJ4bvYtTbvYh1B3IXnIDuxL49b6FUJn58rwSdFdmCbpmnlF7Za3GAR53zTJT++I/yRyHoWAJa6IqX2Ly+7Wc/zSC57RJvoF/eO+FzjQ/UiMsyf0iaXVYUBfOSHBQqVxfaVqQ6EERBiBGvTbgV2Z0= 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 1560783549245469.52247012323517; Mon, 17 Jun 2019 07:59:09 -0700 (PDT) Received: from localhost ([::1]:48226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hct6C-0001T2-AN for importer@patchew.org; Mon, 17 Jun 2019 10:59:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46826) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcsiU-0003nj-Gp for qemu-devel@nongnu.org; Mon, 17 Jun 2019 10:34:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcsiR-0008CS-Kf for qemu-devel@nongnu.org; Mon, 17 Jun 2019 10:34:38 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:43388) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcsiR-0008Bo-EM for qemu-devel@nongnu.org; Mon, 17 Jun 2019 10:34:35 -0400 Received: by mail-wr1-x429.google.com with SMTP id p13so10199729wru.10 for ; Mon, 17 Jun 2019 07:34:35 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id a67sm13819985wmh.40.2019.06.17.07.34.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 07:34:33 -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=QH/DDBGbAAKw5E22C6nxXcLX4pRMuc/olgVu3SfYiz4=; b=ypAYlGCUkGPn/rh81QbNCvQBjaiT4Sh/tsBPY9x5GEjPSynb04D8jP9+JPQdowCLmu hHUYyRxiE59IFEcgB3QgvBRj2tPbmuZv6rFGaJjXCmNNIRGEwjBCQEFeEKyXotkomytF FkO/BMebSuNgRTXgrl3qzICl29sq+t7CYBSgrYCUWvJ1xRKqA1fQ0rhV1yO8F5DBhgWS vfJ7QUgKveWFzuie449TVgjMxs4iF/Q+5VSWmnfp6hLqYtXFZI4z2RZRb+RI9SuMAidm cXWdbJrOXrKpaWbTECqMmlwrZEJPvR9Sq+gXh+zqyc+mOXvokjmtNRLpgRdVQrYa9QSp hfMQ== 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=QH/DDBGbAAKw5E22C6nxXcLX4pRMuc/olgVu3SfYiz4=; b=qzBuyCKtf05w7HQkXmnnnVHrU2ZskTLyiGBNANDIlymI2FlAEZexkYmgyByILxn1to VxqDfIEla56hzGIWRTK414NpvGY+yKjjcye9inkqo8gPAKu9NLvCCbQ1z9wNpYBozBl1 5LRMMWyX/TkFCPLgX1ocOrlqVNnQK8Vju6jAm7n6+b6W6rdToCspx0ylRDKD0mevfWNh AiZpp+sk6R8kYFTMHvtCISxJFc6ZTAa92IlZX4rF8vhrAHMg9ePihWIKLx1WXLJiq2f1 uEF6x1jTYOVb6HInvn+V2ZYrz2cbX72UmEr5UBAn/7HGV2sLPu6n648wNjyFGg+ABbqS kGNA== X-Gm-Message-State: APjAAAWnW8FI08NEWzTJSHCGPDtrH5++o658L/W3TKj89+898xGMfmly Rhbr2agQdfylqzZiWcbhkru0XA+fjJOmag== X-Google-Smtp-Source: APXvYqyAGF+z5O4ron2iSQUIFW4K28hnkt6cQ21Lb6+17J5+dypQGi/g5jdjy/wOcx4MgkAOhvK4xg== X-Received: by 2002:adf:e8cb:: with SMTP id k11mr75161195wrn.244.1560782074327; Mon, 17 Jun 2019 07:34:34 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 17 Jun 2019 15:34:06 +0100 Message-Id: <20190617143412.5734-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190617143412.5734-1-peter.maydell@linaro.org> References: <20190617143412.5734-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::429 Subject: [Qemu-devel] [PULL 18/24] target/arm: Stop using cpu_F0s for Neon f32/s32 VCVT 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) Stop using cpu_F0s for the Neon f32/s32 VCVT operations. Since this is the last user of cpu_F0s in the Neon 2rm-op loop, we can remove the handling code for it too. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20190613163917.28589-9-peter.maydell@linaro.org --- target/arm/translate.c | 82 ++++++++++++------------------------------ 1 file changed, 22 insertions(+), 60 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 75ed7cc7cb0..0fb94b777bf 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1374,38 +1374,6 @@ static TCGv_ptr get_fpstatus_ptr(int neon) return statusptr; } =20 -#define VFP_GEN_ITOF(name) \ -static inline void gen_vfp_##name(int dp, int neon) \ -{ \ - TCGv_ptr statusptr =3D get_fpstatus_ptr(neon); \ - if (dp) { \ - gen_helper_vfp_##name##d(cpu_F0d, cpu_F0s, statusptr); \ - } else { \ - gen_helper_vfp_##name##s(cpu_F0s, cpu_F0s, statusptr); \ - } \ - tcg_temp_free_ptr(statusptr); \ -} - -VFP_GEN_ITOF(uito) -VFP_GEN_ITOF(sito) -#undef VFP_GEN_ITOF - -#define VFP_GEN_FTOI(name) \ -static inline void gen_vfp_##name(int dp, int neon) \ -{ \ - TCGv_ptr statusptr =3D get_fpstatus_ptr(neon); \ - if (dp) { \ - gen_helper_vfp_##name##d(cpu_F0s, cpu_F0d, statusptr); \ - } else { \ - gen_helper_vfp_##name##s(cpu_F0s, cpu_F0s, statusptr); \ - } \ - tcg_temp_free_ptr(statusptr); \ -} - -VFP_GEN_FTOI(touiz) -VFP_GEN_FTOI(tosiz) -#undef VFP_GEN_FTOI - #define VFP_GEN_FIX(name, round) \ static inline void gen_vfp_##name(int dp, int shift, int neon) \ { \ @@ -4173,17 +4141,6 @@ static const uint8_t neon_3r_sizes[] =3D { #define NEON_2RM_VCVT_SF 62 #define NEON_2RM_VCVT_UF 63 =20 -static int neon_2rm_is_float_op(int op) -{ - /* - * Return true if this neon 2reg-misc op is float-to-float. - * This is not a property of the operation but of our code -- - * what we are asking here is "does the code for this case in - * the Neon for-each-pass loop use cpu_F0s?". - */ - return op >=3D NEON_2RM_VCVT_FS; -} - static bool neon_2rm_is_v8_op(int op) { /* Return true if this neon 2reg-misc op is ARMv8 and up */ @@ -6599,13 +6556,7 @@ static int disas_neon_data_insn(DisasContext *s, uin= t32_t insn) default: elementwise: for (pass =3D 0; pass < (q ? 4 : 2); pass++) { - if (neon_2rm_is_float_op(op)) { - tcg_gen_ld_f32(cpu_F0s, cpu_env, - neon_reg_offset(rm, pass)); - tmp =3D NULL; - } else { - tmp =3D neon_load_reg(rm, pass); - } + tmp =3D neon_load_reg(rm, pass); switch (op) { case NEON_2RM_VREV32: switch (size) { @@ -6860,29 +6811,40 @@ static int disas_neon_data_insn(DisasContext *s, ui= nt32_t insn) break; } case NEON_2RM_VCVT_FS: /* VCVT.F32.S32 */ - gen_vfp_sito(0, 1); + { + TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); + gen_helper_vfp_sitos(tmp, tmp, fpstatus); + tcg_temp_free_ptr(fpstatus); break; + } case NEON_2RM_VCVT_FU: /* VCVT.F32.U32 */ - gen_vfp_uito(0, 1); + { + TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); + gen_helper_vfp_uitos(tmp, tmp, fpstatus); + tcg_temp_free_ptr(fpstatus); break; + } case NEON_2RM_VCVT_SF: /* VCVT.S32.F32 */ - gen_vfp_tosiz(0, 1); + { + TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); + gen_helper_vfp_tosizs(tmp, tmp, fpstatus); + tcg_temp_free_ptr(fpstatus); break; + } case NEON_2RM_VCVT_UF: /* VCVT.U32.F32 */ - gen_vfp_touiz(0, 1); + { + TCGv_ptr fpstatus =3D get_fpstatus_ptr(1); + gen_helper_vfp_touizs(tmp, tmp, fpstatus); + tcg_temp_free_ptr(fpstatus); break; + } default: /* Reserved op values were caught by the * neon_2rm_sizes[] check earlier. */ abort(); } - if (neon_2rm_is_float_op(op)) { - tcg_gen_st_f32(cpu_F0s, cpu_env, - neon_reg_offset(rd, pass)); - } else { - neon_store_reg(rd, pass, tmp); - } + neon_store_reg(rd, pass, tmp); } break; } --=20 2.20.1