From patchwork Mon Jun 17 14:34:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 167055 Delivered-To: patch@linaro.org Received: by 2002:ac9:6410:0:0:0:0:0 with SMTP id r16csp1103089ock; Mon, 17 Jun 2019 07:57:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJnqTCSCtQGPpCbfGUEmP4MKw6sUEG99YbZS3qtxBEA9swSl4vxvzlkPxz1vHiZlY3xioN X-Received: by 2002:a05:6402:652:: with SMTP id u18mr26662508edx.85.1560783434710; Mon, 17 Jun 2019 07:57:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560783434; cv=none; d=google.com; s=arc-20160816; b=uOrBaec+92FRs2sapbLUWXnro9tb8k45+PzIppRzvjKKJZvoEEssGBde5ZALYqZrDA sbuwnR0Nh/rDQgbiAhhKVGkzYyGkDCQz1ztHsY+FElK47277u6Tnd7wUxOtvVlyOTYd8 gRwK+rldTtehHghdoV3ovmT6W0CBVfSXhdElfxxBAMfvREnGTeK9xjOA1LT3AFNAuYO9 b2p4nl4nM8w1l7jv/BFVuguxFncGJPzlXjwrYvIzaw3qWcKrAU26dahF9nCltWBg1Xdi AD6QZFzyDM6inZE5i+X6EEh2OQ/e8fRDgjZt/7jm+ghiahzW1b7ygwgi6wOwG3v9NFJb 30+g== 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=QH/DDBGbAAKw5E22C6nxXcLX4pRMuc/olgVu3SfYiz4=; b=GkmNK+e3HEBHIJegINvlACIdyrq3NJ7xKaZyN/5o9RsnT1hW6QtUgrIeyL6Q+E+yKw Sxg1zYwPhu12VZ7o1WjKyPgJU+iQcnu1d1umP/apR8a8Msqa2sikEjBlR9FIOxH8wF7+ vRfj+JOX+FNlPzKSGMOj/HqKKe0D+5jm9GtmatNfgfNLQuR/16vh+La0ECHK90IXtYp4 30pdmSI/P6JUXmxb6F+iRZGgWVuFeFFWPI94O28eMGqviJr1QzuZVn1l8LwlyW1Pqrla ZBGm16aKzTZ1hwmHqLFA/fH85Vz2GUIHnYVg2ZOPT5wLLgQori+o6/oOYGe4kQEkevSv pnxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ypAYlGCU; 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 l6si7237044eja.198.2019.06.17.07.57.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Jun 2019 07:57:14 -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=ypAYlGCU; 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]:48212 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hct4L-0007sz-DA for patch@linaro.org; Mon, 17 Jun 2019 10:57:13 -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) 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-Received: by 2002:adf:e8cb:: with SMTP id k11mr75161195wrn.244.1560782074327; Mon, 17 Jun 2019 07:34:34 -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) 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 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é Message-id: 20190613163917.28589-9-peter.maydell@linaro.org --- target/arm/translate.c | 82 ++++++++++++------------------------------ 1 file changed, 22 insertions(+), 60 deletions(-) -- 2.20.1 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; } -#define VFP_GEN_ITOF(name) \ -static inline void gen_vfp_##name(int dp, int neon) \ -{ \ - TCGv_ptr statusptr = 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 = 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[] = { #define NEON_2RM_VCVT_SF 62 #define NEON_2RM_VCVT_UF 63 -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 >= 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, uint32_t insn) default: elementwise: for (pass = 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 = NULL; - } else { - tmp = neon_load_reg(rm, pass); - } + tmp = 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, uint32_t insn) break; } case NEON_2RM_VCVT_FS: /* VCVT.F32.S32 */ - gen_vfp_sito(0, 1); + { + TCGv_ptr fpstatus = 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 = 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 = 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 = 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; }