From patchwork Fri May 8 15:43:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186415 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp117834ill; Fri, 8 May 2020 09:06:48 -0700 (PDT) X-Google-Smtp-Source: APiQypKcgp7d4t4ChBSlq/1j4nq4H7hlZeAHf8JdCzSQ6x3s1WFCSQolvnnqhBNJ1LCW06eRQWyV X-Received: by 2002:ad4:44f3:: with SMTP id p19mr3453549qvt.170.1588954007943; Fri, 08 May 2020 09:06:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588954007; cv=none; d=google.com; s=arc-20160816; b=hNwgEadHyfC/EkSk90oy7QxilqRtuWBy06nnplHa8BzWgyjP1vv5xR7E4TPhnRsG8a rTMdkeiJSf/hgp/0BY1KkAYGQtsUMC0ftrE9V9GQmfcR/CahWTpCoDrHANeE33sTmi1Q Vchso7TIo99q+ZYH1SKfE+683vhdGNLLXB+5ApcsLHz5Ecv9PIHFBfU9s7Og0bNLLXNc QNT3OroH6qhkzftPACKOtYrXCaa/NhPIggL9qAP+JdAjvufaCt9Ynwwr4YSL5x2ym0qb IRoDgGr0ZLHIZ1chIrUEFV4j7ZPDUPVrlfL8QQCRrSJOgRGQPDm07PN+8lsue0XTcTAL sgFw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=EEMisfhP0FF7nbk2Fd4qXSAVpvXl/L+N8imLtpMRViY=; b=zIvfMRPgvC5uQYTSqP2NcvSwSt2aHSP91A/uaXk15LWlFK0Fa4wTjfn8Y/EcRHjke9 yVM4l50EToXLtq48b4TiN+6DZPG+37IrFZp+8yx2iBRcEP8Iu/U/YmHupUSGY56BFh1h po5R5kVPyrYRzNz1JWm6irVDdmXEYHuc5z8x8ggUGCT87OWkW3zL27JKjVbzZ046m8FT HTzfxW/+kUaV+SzEEdkR09IOgIhQdWUnGULrSgpqRrFwHHBHCriCBNiCty3szHEJZF5Q 4jpQUqa+bj5yxVzyMec9ZwuR+Q1mwa/lD/BQG9Jq3kLN4M17AxcvuqIu+LOmAFn3rNUX zVhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MuteMfms; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:470:142::17]) by mx.google.com with ESMTPS id z13si1365852qvo.66.2020.05.08.09.06.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 May 2020 09:06:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MuteMfms; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX5WR-00054t-A8 for patch@linaro.org; Fri, 08 May 2020 12:06:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX5Av-00080g-Fh for qemu-devel@nongnu.org; Fri, 08 May 2020 11:44:33 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:41549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX5Au-0005fs-DE for qemu-devel@nongnu.org; Fri, 08 May 2020 11:44:33 -0400 Received: by mail-pl1-x644.google.com with SMTP id u10so884876pls.8 for ; Fri, 08 May 2020 08:44:32 -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=EEMisfhP0FF7nbk2Fd4qXSAVpvXl/L+N8imLtpMRViY=; b=MuteMfmspWv/CBwpFyElqKTvkEQOftg3sOCVcLJI1kDftXqx+kejHRSaRA6Qah2Bhn Q7vTvbCE/ycHQEudHV0L/RPva6mDkmQ/+KwFzfLJy3XneGs0XkMpdvqnVWsGYKLiNCV4 31l6XrUYjZnenB/u2BXdm8dFU21sRpBMndEiBsaNJf3LH6hfdjs7zpIqHVuQmrbZBZhP Reh03zZBBAp+3ckucD34Bx8i3o1GFZoVWHnUhGfbUiMyc0w383TaDa8dg95ameEwUcG5 hs/o1Cf31lIa2lfxhcGij/R/F1KE2uhPH3JoqUNez5Qoojz0sv98QZyM2ScPC68fhO1Z Rqmw== 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=EEMisfhP0FF7nbk2Fd4qXSAVpvXl/L+N8imLtpMRViY=; b=b1QPNPP8E0BaGIeX9oZ86zq1cW0raVaSv8QE0yLWmJ4KrdXl4LGFSMruh7EfkMv8fU Chpls9rnYpHjFAMcPsQkJZUEytGXcMSM17a7S9+ZiZMYv2g2roCUjzdlQfb0j1PFH7i/ fp0UxZIug3nSbmTzBkSGsv4wxepS0lgPubKgFA10lcCozeDb1VMqxTz0d+kjw6SxmAur JhG/xLMPZMpsMIS0A5liHEdR47hWgqcNxM0s5xxxzdEPEUeUU0cES9YL97JCSMTcCx9A jgAgrTP4o7iXV18Q37L83FpQ1A6QFFWps185tXKNR64+VrZl/63opOIwPdXsTv0q6ymt s5aA== X-Gm-Message-State: AGi0PubN4QzemF7iXrzsZKO5byLzNVkT0PPClotE6AC9znNrZ2813iln ++BKzOyWK1IYBD+/PX6pRzxFYn8vRks= X-Received: by 2002:a17:902:c281:: with SMTP id i1mr3010059pld.85.1588952670666; Fri, 08 May 2020 08:44:30 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id o99sm2727662pjo.8.2020.05.08.08.44.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 08:44:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 19/19] target/arm: Remove sve_memopidx Date: Fri, 8 May 2020 08:43:59 -0700 Message-Id: <20200508154359.7494-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200508154359.7494-1-richard.henderson@linaro.org> References: <20200508154359.7494-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::644; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x644.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" None of the sve helpers use TCGMemOpIdx any longer, so we can stop passing it. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/internals.h | 5 ----- target/arm/sve_helper.c | 14 +++++++------- target/arm/translate-sve.c | 17 +++-------------- 3 files changed, 10 insertions(+), 26 deletions(-) -- 2.20.1 diff --git a/target/arm/internals.h b/target/arm/internals.h index e633aff36e..a833e3941d 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -979,11 +979,6 @@ static inline int arm_num_ctx_cmps(ARMCPU *cpu) } } -/* Note make_memop_idx reserves 4 bits for mmu_idx, and MO_BSWAP is bit 3. - * Thus a TCGMemOpIdx, without any MO_ALIGN bits, fits in 8 bits. - */ -#define MEMOPIDX_SHIFT 8 - /** * v7m_using_psp: Return true if using process stack pointer * Return true if the CPU is currently using the process stack diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index f1870aabc2..116d535fa5 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -4440,7 +4440,7 @@ void sve_ldN_r(CPUARMState *env, uint64_t *vg, const target_ulong addr, sve_ldst1_host_fn *host_fn, sve_ldst1_tlb_fn *tlb_fn) { - const unsigned rd = extract32(desc, SIMD_DATA_SHIFT + MEMOPIDX_SHIFT, 5); + const unsigned rd = simd_data(desc); const intptr_t reg_max = simd_oprsz(desc); intptr_t reg_off, reg_last, mem_off; SVEContLdSt info; @@ -4696,7 +4696,7 @@ void sve_ldnfff1_r(CPUARMState *env, void *vg, const target_ulong addr, sve_ldst1_host_fn *host_fn, sve_ldst1_tlb_fn *tlb_fn) { - const unsigned rd = extract32(desc, SIMD_DATA_SHIFT + MEMOPIDX_SHIFT, 5); + const unsigned rd = simd_data(desc); void *vd = &env->vfp.zregs[rd]; const intptr_t reg_max = simd_oprsz(desc); intptr_t reg_off, mem_off, reg_last; @@ -4925,7 +4925,7 @@ void sve_stN_r(CPUARMState *env, uint64_t *vg, target_ulong addr, uint32_t desc, sve_ldst1_host_fn *host_fn, sve_ldst1_tlb_fn *tlb_fn) { - const unsigned rd = extract32(desc, SIMD_DATA_SHIFT + MEMOPIDX_SHIFT, 5); + const unsigned rd = simd_data(desc); const intptr_t reg_max = simd_oprsz(desc); intptr_t reg_off, reg_last, mem_off; SVEContLdSt info; @@ -5131,9 +5131,9 @@ void sve_ld1_z(CPUARMState *env, void *vd, uint64_t *vg, void *vm, sve_ldst1_host_fn *host_fn, sve_ldst1_tlb_fn *tlb_fn) { - const int scale = extract32(desc, SIMD_DATA_SHIFT + MEMOPIDX_SHIFT, 2); const int mmu_idx = cpu_mmu_index(env, false); const intptr_t reg_max = simd_oprsz(desc); + const int scale = simd_data(desc); ARMVectorReg scratch; intptr_t reg_off; SVEHostPage info, info2; @@ -5276,10 +5276,10 @@ void sve_ldff1_z(CPUARMState *env, void *vd, uint64_t *vg, void *vm, sve_ldst1_tlb_fn *tlb_fn) { const int mmu_idx = cpu_mmu_index(env, false); - const int scale = extract32(desc, SIMD_DATA_SHIFT + MEMOPIDX_SHIFT, 2); + const intptr_t reg_max = simd_oprsz(desc); + const int scale = simd_data(desc); const int esize = 1 << esz; const int msize = 1 << msz; - const intptr_t reg_max = simd_oprsz(desc); intptr_t reg_off; SVEHostPage info; target_ulong addr, in_page; @@ -5430,9 +5430,9 @@ void sve_st1_z(CPUARMState *env, void *vd, uint64_t *vg, void *vm, sve_ldst1_host_fn *host_fn, sve_ldst1_tlb_fn *tlb_fn) { - const int scale = extract32(desc, SIMD_DATA_SHIFT + MEMOPIDX_SHIFT, 2); const int mmu_idx = cpu_mmu_index(env, false); const intptr_t reg_max = simd_oprsz(desc); + const int scale = simd_data(desc); void *host[ARM_MAX_VQ * 4]; intptr_t reg_off, i; SVEHostPage info, info2; diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 6c8bda4e4c..36816aafaf 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -4582,11 +4582,6 @@ static const uint8_t dtype_esz[16] = { 3, 2, 1, 3 }; -static TCGMemOpIdx sve_memopidx(DisasContext *s, int dtype) -{ - return make_memop_idx(s->be_data | dtype_mop[dtype], get_mem_index(s)); -} - static void do_mem_zpa(DisasContext *s, int zt, int pg, TCGv_i64 addr, int dtype, gen_helper_gvec_mem *fn) { @@ -4599,9 +4594,7 @@ static void do_mem_zpa(DisasContext *s, int zt, int pg, TCGv_i64 addr, * registers as pointers, so encode the regno into the data field. * For consistency, do this even for LD1. */ - desc = sve_memopidx(s, dtype); - desc |= zt << MEMOPIDX_SHIFT; - desc = simd_desc(vsz, vsz, desc); + desc = simd_desc(vsz, vsz, zt); t_desc = tcg_const_i32(desc); t_pg = tcg_temp_new_ptr(); @@ -4833,9 +4826,7 @@ static void do_ldrq(DisasContext *s, int zt, int pg, TCGv_i64 addr, int msz) int desc, poff; /* Load the first quadword using the normal predicated load helpers. */ - desc = sve_memopidx(s, msz_dtype(s, msz)); - desc |= zt << MEMOPIDX_SHIFT; - desc = simd_desc(16, 16, desc); + desc = simd_desc(16, 16, zt); t_desc = tcg_const_i32(desc); poff = pred_full_reg_offset(s, pg); @@ -5064,9 +5055,7 @@ static void do_mem_zpz(DisasContext *s, int zt, int pg, int zm, TCGv_i32 t_desc; int desc; - desc = sve_memopidx(s, msz_dtype(s, msz)); - desc |= scale << MEMOPIDX_SHIFT; - desc = simd_desc(vsz, vsz, desc); + desc = simd_desc(vsz, vsz, scale); t_desc = tcg_const_i32(desc); tcg_gen_addi_ptr(t_pg, cpu_env, pred_full_reg_offset(s, pg));