From patchwork Fri May 27 18:17:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 576548 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:8607:0:0:0:0 with SMTP id bb7csp881815mab; Fri, 27 May 2022 11:31:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIg5J9oJv5E65O/Ecsvim3SaKEgZSrM/wWV7PuCBLrYcuFVFPubHEzqzC2YDrrTslR4tjC X-Received: by 2002:a37:ba03:0:b0:6a5:933d:161e with SMTP id k3-20020a37ba03000000b006a5933d161emr10572571qkf.128.1653676291694; Fri, 27 May 2022 11:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653676291; cv=none; d=google.com; s=arc-20160816; b=t8ftcteTZ3Vkv0lgnrSzY0iJow0uj1FDBzS4i6bBCOOyXIg+Cndutt2C6ZNI5sp2V0 Pm7RWVIEOcQg/2UEPaCq8GMLAfx8e5l0JXboEulaj+csEQ2+X9+WyBnXy4oJ05+3ZUm6 Jcw+BU3aEujr79GRKtncVMOtIXAJCWh4uF1sF7m6j0ZrGWLFyQhhLuFkoQ3+77A6cA/t qD02whU/hgDLY91gZF1HB8JNt0MNoGBNSSykKbv8HGGya9TpN7M1k2e0cwOR9qy1EgzV ttgqHDRFcdVM4GqmvNrOwH9pcEgiT9OyHrT4jwnZHw6AJAdXp3ys8rFqQyjf3O7VpqAN DZKQ== 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=Qx6j1TqwLvAsHdT326qUHGP3vqi/7bmDjsPTEHKL3P4=; b=qfxMtjFTp8DfdazVua6PYZ1LGfCkpL5cw/RrQALc3B5Z+0Hjuiv8oR/dAliQjiQXEL 7nvNDllLyek72COAY+/zbeHPafm8aHY1WM0rTGGtPJ4+cZYIxB0xAOkLdHALqJbj2QMg 1ID62KS+oO6wsU0M1KDjNbwwkUy2EYgwRdX2yYWbbenQRAB+ZScVumr2yfaYY0J1NJVY +Cb9jCdCjqbGAuNXhic0bdsPrRG1L6gB7flcVUeiRzV407rqLETtyuu0T8oAvKRzqHkm 1Omu70koIZ2Iyw4p/ra9uZfcJohC6d0vBdT8fqOMMflp3rWhl4IQHa1Jna/4SF3uS8rw gzuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TiUB7Njt; 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 u13-20020a05622a14cd00b002f930738d50si3250591qtx.326.2022.05.27.11.31.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 May 2022 11:31:31 -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=TiUB7Njt; 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]:45478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuekF-00081U-7j for patch@linaro.org; Fri, 27 May 2022 14:31:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nueYl-0007VG-Fh for qemu-devel@nongnu.org; Fri, 27 May 2022 14:19:39 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:46781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nueYg-0003Yi-6i for qemu-devel@nongnu.org; Fri, 27 May 2022 14:19:39 -0400 Received: by mail-pg1-x531.google.com with SMTP id j21so4541387pga.13 for ; Fri, 27 May 2022 11:19:33 -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=Qx6j1TqwLvAsHdT326qUHGP3vqi/7bmDjsPTEHKL3P4=; b=TiUB7NjtZkV3QmIEQ6uDM51EUnS1WA7xCDTLMK26l1lx95ct2DDvJ6vvlHkZ8CaZqm TMGcZ2xD9DCeenVVMtxR40n9LRikZ7eTrmpCxuGiYGTHGU2qaxBWbbGgFDrlb7rYteFo 0yl4ouickYJQ4l5QzE82/fVGin/sPKp6Nlhg9mhDpOPJuQYk0ZAoHUv3MObpeHQW4QrO ahBbQ6Tz4vPGDpZG99fBzIu4UPZcuKnMhI+pCDs0e7uPv26yXf4A6B95tqYGZ9TcQ2mk msaNUzN7+Ad79Ip7Vaof0LzUGLPZsIEmbvii8XZpiQqbjfh0fkv/MIIBZn7Q2xrN77/1 vGsQ== 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=Qx6j1TqwLvAsHdT326qUHGP3vqi/7bmDjsPTEHKL3P4=; b=U9Y7EhKXf5SvY1nfny+ETxSIgFabQH1RoDzyy/miDWzyw/c8IZJai+zPngxdqsFRnI tyiQrGicbwZHSn0goEHzGFLJJLeCqO2qc6VMXAEaYnTbEAAEYoJcAkO2ykSdLwRekNhY xhQDTJNxGELf8r4j6objDdv2toRDNcCBIVo/tt6v5n3khhbGBD3gA5IK1AOcfG+Zsilx 6cRSgxjkg6L+pymF3VGYWVfhXMY7P+h+7wxil0iejlT0bznztTna8cqFoIC94NhS7s+C 4Mkwa47W7dAKnoc9Itaq4+Kmy69onIvGsjB0moFQtKz4Vs31NM1uqFZbQAPfDBikObIH Q39w== X-Gm-Message-State: AOAM5300ejr0jttl+Omn4neRIdm1XyQVrPHQZTFSFyqO4CTdQvLpR7Md V5nFXFkWdQwSxJPljUfRtzqdhbHRw6LXGw== X-Received: by 2002:a63:90c9:0:b0:3f9:dd57:7cf3 with SMTP id a192-20020a6390c9000000b003f9dd577cf3mr28643847pge.382.1653675573459; Fri, 27 May 2022 11:19:33 -0700 (PDT) Received: from stoup.. (174-21-71-225.tukw.qwest.net. [174.21.71.225]) by smtp.gmail.com with ESMTPSA id t5-20020a17090ae50500b001deb3cbd8f1sm1911612pjy.27.2022.05.27.11.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 11:19:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 026/114] target/arm: Introduce gen_gvec_ool_arg_zpzz Date: Fri, 27 May 2022 11:17:39 -0700 Message-Id: <20220527181907.189259-27-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::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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" Use gen_gvec_ool_arg_zpzz instead of gen_gvec_ool_zzzp when the arguments come from arg_rprr_esz. Replaces do_zpzz_ool. Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index fea7164d72..d63099c5b7 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -252,6 +252,12 @@ static bool gen_gvec_ool_zzzp(DisasContext *s, gen_helper_gvec_4 *fn, return true; } +static bool gen_gvec_ool_arg_zpzz(DisasContext *s, gen_helper_gvec_4 *fn, + arg_rprr_esz *a, int data) +{ + return gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, data); +} + /* Invoke a vector expander on two Zregs. */ static void gen_gvec_fn_zz(DisasContext *s, GVecGen2Fn *gvec_fn, int esz, int rd, int rn) @@ -737,11 +743,6 @@ static bool trans_UQSUB_zzz(DisasContext *s, arg_rrr_esz *a) *** SVE Integer Arithmetic - Binary Predicated Group */ -static bool do_zpzz_ool(DisasContext *s, arg_rprr_esz *a, gen_helper_gvec_4 *fn) -{ - return gen_gvec_ool_zzzp(s, fn, a->rd, a->rn, a->rm, a->pg, 0); -} - /* Select active elememnts from Zn and inactive elements from Zm, * storing the result in Zd. */ @@ -761,7 +762,7 @@ static bool trans_##NAME##_zpzz(DisasContext *s, arg_rprr_esz *a) \ gen_helper_sve_##name##_zpzz_b, gen_helper_sve_##name##_zpzz_h, \ gen_helper_sve_##name##_zpzz_s, gen_helper_sve_##name##_zpzz_d, \ }; \ - return do_zpzz_ool(s, a, fns[a->esz]); \ + return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); \ } DO_ZPZZ(AND, and) @@ -792,7 +793,7 @@ static bool trans_SDIV_zpzz(DisasContext *s, arg_rprr_esz *a) static gen_helper_gvec_4 * const fns[4] = { NULL, NULL, gen_helper_sve_sdiv_zpzz_s, gen_helper_sve_sdiv_zpzz_d }; - return do_zpzz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); } static bool trans_UDIV_zpzz(DisasContext *s, arg_rprr_esz *a) @@ -800,7 +801,7 @@ static bool trans_UDIV_zpzz(DisasContext *s, arg_rprr_esz *a) static gen_helper_gvec_4 * const fns[4] = { NULL, NULL, gen_helper_sve_udiv_zpzz_s, gen_helper_sve_udiv_zpzz_d }; - return do_zpzz_ool(s, a, fns[a->esz]); + return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); } static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a) @@ -1076,7 +1077,7 @@ static bool trans_##NAME##_zpzw(DisasContext *s, arg_rprr_esz *a) \ if (a->esz < 0 || a->esz >= 3) { \ return false; \ } \ - return do_zpzz_ool(s, a, fns[a->esz]); \ + return gen_gvec_ool_arg_zpzz(s, fns[a->esz], a, 0); \ } DO_ZPZW(ASR, asr) @@ -6489,7 +6490,7 @@ static bool do_sve2_zpzz_ool(DisasContext *s, arg_rprr_esz *a, if (!dc_isar_feature(aa64_sve2, s)) { return false; } - return do_zpzz_ool(s, a, fn); + return gen_gvec_ool_arg_zpzz(s, fn, a, 0); } static bool trans_SADALP_zpzz(DisasContext *s, arg_rprr_esz *a)