From patchwork Thu Jun 13 16:39: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: 166719 Delivered-To: patch@linaro.org Received: by 2002:ac9:2a84:0:0:0:0:0 with SMTP id p4csp929636oca; Thu, 13 Jun 2019 10:25:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKq5oMeBrGPX/sT7/WPpSrmGPBvddgfd43mEMxh2embvKG8xEpN1oKosxq+t+7HS1zjM9H X-Received: by 2002:a67:c797:: with SMTP id t23mr45171056vsk.209.1560446740845; Thu, 13 Jun 2019 10:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560446740; cv=none; d=google.com; s=arc-20160816; b=hdGQBKllbp7G8D/L3RhqCmYWwjOvSiNcygMn3EtbIc/Y/ZM2Wk+mEHVyt1jRJDLQNh a8LbOWC//Iq3n+bD9PA/2Bcz0SEuojJyuuqIuiSF5GkCs/KNeZNHwYamnZ6P+vLXv2/K Cnwcuk+R+z3EU6gXzi7Rr/MXXRw8fvGv+w/LFh+NvpcoZFixgaeCRhja+lG/Z8ScNQB8 oi/qEVOKiRdOytq9Y6wzpmZG1YeMWPjbBUsx/Cu51iGulTPuxhRfRfREr3BUfjLlDm/c toreSJhXDRmJyV+Sf+U5FWE9gXcgG2OcpaAGcvNI0cf5mLw6nT6y1QImJwfqr0F1frsf 1RIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=xAUvL5wIPadt+AYk5xwuFzGHjAUkyNHEmTy0Nk+EXUw=; b=DC/+duhx0NBoS86hhLUoLpj3YlXmTEMKzcWrCzw28hqx/jaLB9E+6DLd9eGLXETKoa UxA0+SceRD3XD0fWYQ+Zx2QB/DA2OJYwnGJ8zdWwhuIwIyAWapfmacrIrP6xojMgRuY0 mkAgDlKUvQIBnHyR0+jdy1820xbNEZIUFmCW5M8ewoIfLHn2eVQNqcyBgee/yKLST1gM m0sV5RXoKj0uDeseQSKaGz9xwEXhbNEuKNUCSxFArJHAcumh/mNHw0qLOXB5GoN6HBDH 67bI4F9nX6ht1PuulRHIsWPwU2aVtoKdLz4CFfa0MB2wieMI1NngS4CRy1Da0TIvtcfU wOlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZLswgCKy; 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 x8si159327vsk.241.2019.06.13.10.25.40 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jun 2019 10:25: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=ZLswgCKy; 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]:42344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbTTo-0003qO-Cl for patch@linaro.org; Thu, 13 Jun 2019 13:25:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53849) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbSlK-0004A6-QT for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbSlG-0003LN-2a for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:42 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:38898) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbSlF-0002i8-Ik for qemu-devel@nongnu.org; Thu, 13 Jun 2019 12:39:37 -0400 Received: by mail-wm1-x343.google.com with SMTP id s15so10830937wmj.3 for ; Thu, 13 Jun 2019 09:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xAUvL5wIPadt+AYk5xwuFzGHjAUkyNHEmTy0Nk+EXUw=; b=ZLswgCKyVPi4QedFsbO6BIUufTPtNYfbttp/XqXR6kFnC1xwd2Ev3XCGqlg6S7ociz 6EPxjqXm7ygq9L9KzDfUpR24S764HSUC7uX/Imxy6eKYnvp6l+277ekYqGKp4DZiyYcF 5d1F5bI6F+8zFJ1Y+RgyXeTVGgc3BZiwafYxsAMCeVR0hGi5EmbeedM7uyy2Fz7WG2nt 1OltkpLNNR8kKmO3zaaTNgzVblVr2BE3d1FfkIiR/G+CTO9JlD4yQiUwX+hCzkhxRw05 rEpi626NR90+D+NPLIc4FWcx5Bpam9VKE6tbrdfadnVgAKcBvjEkSL0QB8gjr39PUhOr NUdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xAUvL5wIPadt+AYk5xwuFzGHjAUkyNHEmTy0Nk+EXUw=; b=WOtw/49MKVs7lN3o+FlTT9kncc4YhSY1IRH6aDuFudGZFeg5Z0PNFgyl3f7WKVXWMs hkJ1+AkvQ03XwHUidlG8Gz9YBChWWuMpHFXPXZfsWnCJzgmd2k3VDzeyJWSsh7PF9qvZ ggBitShaI6olu2ByM69v/JdNTBP9Lr7XBhPWEXPQzs9OrUsBjJYaBBZxcHIO0mUccw+m Ok6xLLqSi0KJADl6Dcs0v5N8wfZTpVxtrQUqICWfVwASzL3wafI6j/sjtGbzACHqbqeR Vx4ZbRw5qAD6D9Vsvn1T5JVzXido145wdibIxJUl0xT92JohB44NYaLzEhay8QPqEbKd sThg== X-Gm-Message-State: APjAAAUoVYd9N1jwaFuWU8mLBOuRXr+uxfKlvAABoQDAdxcP/QVz367B oT3CMCp3CveURKhZqTyqVxPHG2Q9pC7IoQ== X-Received: by 2002:a1c:e009:: with SMTP id x9mr4445559wmg.5.1560443967753; Thu, 13 Jun 2019 09:39:27 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id f197sm358747wme.39.2019.06.13.09.39.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 09:39:27 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 17:39:13 +0100 Message-Id: <20190613163917.28589-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613163917.28589-1-peter.maydell@linaro.org> References: <20190613163917.28589-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::343 Subject: [Qemu-devel] [PATCH 08/12] 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: , Cc: Richard Henderson 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 --- target/arm/translate.c | 82 ++++++++++++------------------------------ 1 file changed, 22 insertions(+), 60 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson 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; }