From patchwork Mon May 30 16:05:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 577219 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp397399mag; Mon, 30 May 2022 09:39:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygv4Ggp5WMYO5+Uq32pbVj35L8AaUYiaIsNMmdtxqVHn15+TnKobOdg8K3szeWqWI9qXJI X-Received: by 2002:a05:6214:1d09:b0:461:e186:a67f with SMTP id e9-20020a0562141d0900b00461e186a67fmr47994628qvd.131.1653928758203; Mon, 30 May 2022 09:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653928758; cv=none; d=google.com; s=arc-20160816; b=G2UbEupqqEiKAF4mTCNzmjV1bL84zCZkSRY3Jc2RqpmhKfbZkMkOpyqQYFSFYL0ZbU SMPbrqKV3TcDfmnhu0awz3LVTchNo54iGoto6O3oKZBjrj21JIiUtj2+YkfOEvhBFtYD maN7kZgwkQvvZY++pqHc/MuoU+xMRcJEcnXk+xelehLme4WdzNLwWkwHxPM50jEvuiDv 3EqNS7rBPMMrKl89DLmYl0jhLeDBao0wXpSf/yzz19OH1AIyGJZCC3Wp7F/HXTQiGU3D tv+L7GOABv4NRfRjCqkcAbTO4xEMw62VXCG0SO2Fuv4vTV9EyZjca0AGBm72D9qGT9nk v+SA== 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:to:from :dkim-signature; bh=GEuut8RGJ90gY/DGoHG5nlaxN0h7NG7w8e8WiIbpp7U=; b=03zHgwwWjk+OuySBaV1pBYlzyXTTOuZA9OkWkuN6un5KDkW2rBiXWJ6y6PS7uldiok QfZ1godHvXjMkMVUO1H2DeYWnFDlcOEy7tPgUHChhQK7paQHZIVZqMWPGrzI1NTN99rG LlpUGZYD9uJxWMaFchdLXUCBvz5Fa0/gdvO0rsXn4x72WaivY9GPCzZJ4dbEHdl7HSqF A0VZWjKY89hFPIefsesvMUmB4BdRj+hy4H4m0tfkhQsu6OP2kMeoWYRNjGQQlS2IOckq SEN+9EmAzqScmeYx9BnN0lQSUf5HMWMQY7F0d6eWrgQ2oLiv71uIKPm4JEQ6n6qs8AUH z2Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OMoMajYm; 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 a9-20020a056214062900b00461e61899f2si7663530qvx.208.2022.05.30.09.39.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 May 2022 09:39:18 -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=OMoMajYm; 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]:50006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nviQH-00079l-Lr for patch@linaro.org; Mon, 30 May 2022 12:39:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhvY-0002wA-FH for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:44824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhvW-0007DP-FN for qemu-devel@nongnu.org; Mon, 30 May 2022 12:07:32 -0400 Received: by mail-wr1-x432.google.com with SMTP id e25so4650957wra.11 for ; Mon, 30 May 2022 09:07:28 -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=GEuut8RGJ90gY/DGoHG5nlaxN0h7NG7w8e8WiIbpp7U=; b=OMoMajYmRvc4203kR1fGiJS3qwnBYmkqni1jCIbYAMNGD9TOrovirDhpXDF5VaPPMi bsXCWP7dS1lc1243QDUlOPkWbrl492uIPcNhqXDtDXizCqFl4OHGIizsuMzMrSRO9zs/ JCDjqsSL3KDPC82a91XjEm1zcWN7gCUgSNPmNrNB6kR8zn16IF993XZssDsYpTso3zkB xIKaJONM/0lP9uhCkbIdCUqZfjfOKemFYcMXW4mHpXAjB2CHjGdGPzWhX1jf/OSrenKG X/Vse7//1f7AWWwPs9b2IGCV4uxq4vI06nm8dix5Z9vSvPwaudhqtIR9CsMVqmXgz79+ JoSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GEuut8RGJ90gY/DGoHG5nlaxN0h7NG7w8e8WiIbpp7U=; b=od4S2fzBf8pTiv3YPLdIRHoJfu0u23NbYn5nhR/v1bH7nEyb+FpOcQyADy4NTSi4gz ounRykni5O3eZK7lkRWuyWXUBjanFtfubHMUN82ce8tIYO8cJn1IV5eYVbQCaHO9/Vxu K8gzFRKxaOpCKBxWE0GZItDnikguYuMMmcVDjRE9oMXcmB2nogyRgGYKI1YHvykUGxew qrnJYPX+3Mai+iH4iKBBrNVoT/XGLEChYgFH47n0T53CQ2WHQYz051JCRvQ22yzLNb5m Y8c5TaUgzwYAUdD+4WNnVnkEPp5QVrKkKDsnFPpg+CuzoEMfI7GV9tRqS/G0/GIaJZFk vo6g== X-Gm-Message-State: AOAM5335RPO/SsL18Qxfze+i+Al8Jzr5t1g/t4AbTU3FoayuEjdg1XhX +4HxuCBFK97B44SP6RDqcbzcSfD0IkrzPg== X-Received: by 2002:a5d:47c5:0:b0:20e:73a0:79a0 with SMTP id o5-20020a5d47c5000000b0020e73a079a0mr43523196wrc.632.1653926848060; Mon, 30 May 2022 09:07:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bi12-20020a05600c3d8c00b003974b95d897sm10232152wmb.37.2022.05.30.09.07.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:07:27 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 022/117] target/arm: Move null function and sve check into gen_gvec_ool_zzp Date: Mon, 30 May 2022 17:05:33 +0100 Message-Id: <20220530160708.726466-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220530160708.726466-1-peter.maydell@linaro.org> References: <20220530160708.726466-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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" From: Richard Henderson Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-20-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index b4307f062c3..e81c2de37f0 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -206,14 +206,20 @@ static bool gen_gvec_ool_arg_zzxz(DisasContext *s, gen_helper_gvec_4 *fn, } /* Invoke an out-of-line helper on 2 Zregs and a predicate. */ -static void gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn, +static bool gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn, int rd, int rn, int pg, int data) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - pred_full_reg_offset(s, pg), - vsz, vsz, data, fn); + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + pred_full_reg_offset(s, pg), + vsz, vsz, data, fn); + } + return true; } /* Invoke an out-of-line helper on 3 Zregs and a predicate. */ @@ -801,13 +807,7 @@ static bool trans_SEL_zpzz(DisasContext *s, arg_rprr_esz *a) static bool do_zpz_ool(DisasContext *s, arg_rpr_esz *a, gen_helper_gvec_3 *fn) { - if (fn == NULL) { - return false; - } - if (sve_access_check(s)) { - gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, 0); - } - return true; + return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, 0); } #define DO_ZPZ(NAME, name) \ @@ -986,20 +986,13 @@ static bool do_movz_zpz(DisasContext *s, int rd, int rn, int pg, gen_helper_sve_movz_b, gen_helper_sve_movz_h, gen_helper_sve_movz_s, gen_helper_sve_movz_d, }; - - if (sve_access_check(s)) { - gen_gvec_ool_zzp(s, fns[esz], rd, rn, pg, invert); - } - return true; + return gen_gvec_ool_zzp(s, fns[esz], rd, rn, pg, invert); } static bool do_zpzi_ool(DisasContext *s, arg_rpri_esz *a, gen_helper_gvec_3 *fn) { - if (sve_access_check(s)) { - gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, a->imm); - } - return true; + return gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, a->imm); } static bool trans_ASR_zpzi(DisasContext *s, arg_rpri_esz *a)