From patchwork Fri May 27 18:18:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 576608 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:8607:0:0:0:0 with SMTP id bb7csp927583mab; Fri, 27 May 2022 12:39:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxe7Yr5FA8O+n4j89e5ik0T1He9jw9cuVmvrjrYdYrMxKTD3D0KVpk/oW7PWngmpwinwRXO X-Received: by 2002:ac8:7e8d:0:b0:2f3:b3c3:edfb with SMTP id w13-20020ac87e8d000000b002f3b3c3edfbmr34750329qtj.680.1653680359194; Fri, 27 May 2022 12:39:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653680359; cv=none; d=google.com; s=arc-20160816; b=DZsWuW+803CyDCGPzFhbNQW306skTzpE6NFxY5XBBqqkkcz16XTgXLza7NiCvdNDdU 2iU7fEeodjJUhLwtiUlblcBjn/TbfdxxhqaHTT+BHfSkSJvkwEEZW6fD+67OlBZVKM4p LUlx80bO0GlAKQQL/R5sflbIw6RaS54eEgYOryJ6+SntKlsOSxpISiFQT9Mp5mF3aDD4 qgYI7VWFwoHqOmlZntZrjULhvs2OAyn1e7ErAtiAGPtc0cequ2Ud0r8FDL5xy2t5iUoG fdmVGdDt3LiobYxkUEwTYD3GSIloi50NBc1VeDrSGLa/y6CreMLEbC1vsxJIT10jAQ5v 07kw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0jZwbSGmDVYYUKOSscWs7GEbJo3Q7mHcBlc9ur8AKu8=; b=hRvIQr/rEHoqP17dCHtHMVHgsRqNI5bFaZan2ZpHHnQ1mrRpcUKWZVGg2xiEr7QhVb wDexceyzot1uOP4rj56sn36Pet7G/Pal8q/Bjp3k5Pqags8ZcNj0V/mwl34ZuSmF8Lov G2GjIZS5ObZwz31knP33eQIOpU6JSL2lftv5pmCYofDwWMxhGn8CHbo71A+SU53NlFPo Va9lqRpMJyjq+B5R5kzTyVDrbwEX+fEjRRrik5TrbzRO7LVG//+h6FZGQeNtRL/HFzUF DqiuAlUm7UiKbmqPSi4peGRrDCJ/097abd50Ys4a256EfnOe/P5KPsQegxOcj+r7SJ30 +rkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AcsHLLZD; 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=pass (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 m14-20020a05620a290e00b006a50cdbf71dsi3970482qkp.32.2022.05.27.12.39.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 May 2022 12:39:19 -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=pass header.i=@linaro.org header.s=google header.b=AcsHLLZD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nufnq-0002xg-Qf for patch@linaro.org; Fri, 27 May 2022 15:39:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuecL-0003b0-6w for qemu-devel@nongnu.org; Fri, 27 May 2022 14:23:21 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:47100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuec4-0004Q7-5D for qemu-devel@nongnu.org; Fri, 27 May 2022 14:23:17 -0400 Received: by mail-pf1-x42c.google.com with SMTP id j6so4958386pfe.13 for ; Fri, 27 May 2022 11:23:03 -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=0jZwbSGmDVYYUKOSscWs7GEbJo3Q7mHcBlc9ur8AKu8=; b=AcsHLLZDL58b1WREfGXaqo0VcnYB+NUJbFlIUEIhNZL2z5V6D/TAroDGTzDFEj/u/u AHjbowdmlUJD6kqS6nA2xMN4IWRIbTlmxHGX1vbX/AJDZchKdFCJHSQjIoRv0M8iLNOV cmvD6FLH62KJJH7IafMkMbj8sQrf2KIOe79qn2GLf5JW/jor9zWq4CDCUZB4RlNgChYw SbWqf5jzURngI9C8r00PhdqmGBG/5GrGVwiV61eE7RME2tlzbXYoMLjc1se+RBFr1Fuk oHKmUNYj/JwG7Pgo6UvfjbeV08nCoVosTdGKaFFe0Ir9RuC3nLHC3DlSoz8dVaU09zij 5Hcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0jZwbSGmDVYYUKOSscWs7GEbJo3Q7mHcBlc9ur8AKu8=; b=wERXq5u2ufAaD8Lk/8eDXkwcOqYEF1W8JVgxWUcM0tPLqpsNUx0vP7oHtcqUZuftAV U3I/z+o4Nf3lf/9RAAKITKfRSHGFW07Rp7nRVy13mGaKt5AkDvTCNrAbknsEULtrg3xV cm0L+FySfO1ZUvLXyWqdQARKqqZ3hb8S3swZF5y4td5zluI3scdO+sEdY7zR/0GoXXKa bMColgsCcgfXwf9wRtxiuKH8fjj3e+BEZQ0GAdPNaawwrgqLYWou1WhDMYkOsyXH3jaX F3G+YyvTNQwtfArQZQNb+yyu9UhZVmq6dVsz81DvE7c29ELPIRsQ0wsicAuUyHmmbGiG 98mQ== X-Gm-Message-State: AOAM5312ywp/V1BGlXBLoIaJM1VKOsXH9nv66QNBUY7mKcGLvKrIfsrn cMxq8nB22xoIlZOHw09s+9ZjJbtrtWXSxg== X-Received: by 2002:a65:6e0d:0:b0:3c6:12af:15b4 with SMTP id bd13-20020a656e0d000000b003c612af15b4mr38271772pgb.338.1653675781843; Fri, 27 May 2022 11:23:01 -0700 (PDT) Received: from stoup.. (174-21-71-225.tukw.qwest.net. [174.21.71.225]) by smtp.gmail.com with ESMTPSA id b15-20020a170903228f00b00163552a0953sm4033534plh.159.2022.05.27.11.23.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 11:23:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 057/114] target/arm: Move sve zip high_ofs into simd_data Date: Fri, 27 May 2022 11:18:10 -0700 Message-Id: <20220527181907.189259-58-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220527181907.189259-1-richard.henderson@linaro.org> References: <20220527181907.189259-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" This is in line with how we treat uzp, and will eliminate the special case code during translation. Signed-off-by: Richard Henderson --- target/arm/sve_helper.c | 6 ++++-- target/arm/translate-sve.c | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index e0f9aa9983..3bdcd4ce9d 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -3382,6 +3382,7 @@ void HELPER(sve_punpk_p)(void *vd, void *vn, uint32_t pred_desc) void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \ { \ intptr_t oprsz = simd_oprsz(desc); \ + intptr_t odd_ofs = simd_data(desc); \ intptr_t i, oprsz_2 = oprsz / 2; \ ARMVectorReg tmp_n, tmp_m; \ /* We produce output faster than we consume input. \ @@ -3393,8 +3394,9 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \ vm = memcpy(&tmp_m, vm, oprsz_2); \ } \ for (i = 0; i < oprsz_2; i += sizeof(TYPE)) { \ - *(TYPE *)(vd + H(2 * i + 0)) = *(TYPE *)(vn + H(i)); \ - *(TYPE *)(vd + H(2 * i + sizeof(TYPE))) = *(TYPE *)(vm + H(i)); \ + *(TYPE *)(vd + H(2 * i + 0)) = *(TYPE *)(vn + odd_ofs + H(i)); \ + *(TYPE *)(vd + H(2 * i + sizeof(TYPE))) = \ + *(TYPE *)(vm + odd_ofs + H(i)); \ } \ if (sizeof(TYPE) == 16 && unlikely(oprsz & 16)) { \ memset(vd + oprsz - 16, 0, 16); \ diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 1e6bcedb9d..c2ced3e2bb 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -2298,9 +2298,9 @@ static bool do_zip(DisasContext *s, arg_rrr_esz *a, bool high) unsigned vsz = vec_full_reg_size(s); unsigned high_ofs = high ? vsz / 2 : 0; tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn) + high_ofs, - vec_full_reg_offset(s, a->rm) + high_ofs, - vsz, vsz, 0, fns[a->esz]); + vec_full_reg_offset(s, a->rn), + vec_full_reg_offset(s, a->rm), + vsz, vsz, high_ofs, fns[a->esz]); } return true; } @@ -2324,9 +2324,9 @@ static bool do_zip_q(DisasContext *s, arg_rrr_esz *a, bool high) unsigned vsz = vec_full_reg_size(s); unsigned high_ofs = high ? QEMU_ALIGN_DOWN(vsz, 32) / 2 : 0; tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn) + high_ofs, - vec_full_reg_offset(s, a->rm) + high_ofs, - vsz, vsz, 0, gen_helper_sve2_zip_q); + vec_full_reg_offset(s, a->rn), + vec_full_reg_offset(s, a->rm), + vsz, vsz, high_ofs, gen_helper_sve2_zip_q); } return true; }