Message ID | 20220527181907.189259-3-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:7000:8607:0:0:0:0 with SMTP id bb7csp875291mab; Fri, 27 May 2022 11:21:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoGl6/LCom6HJ1Ur9l3cE11Xc2lGWsw0ogr7Zi86u4SlDvhrgWKSpxabaijnatdj0BAajJ X-Received: by 2002:a05:620a:254f:b0:680:f510:22e4 with SMTP id s15-20020a05620a254f00b00680f51022e4mr29327605qko.554.1653675707719; Fri, 27 May 2022 11:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653675707; cv=none; d=google.com; s=arc-20160816; b=Zq6xXFm9wjz6Ldn5NEGxRKR6eQZww01i8NDGefKVkqGdahAmi1kimh/IsyGhn1yx40 CEcgbQByp0Dp5023u5qUxopRtV04vqgDsPJrUUMThuX7SzQa+my9YnP7FwXCs2bbmLVL J7kIqmNfKfWxd7zRXfnqWAnHcErqyla8QZLfuns9a77l5rI4Zrva0y0AhaGJbvi/K52y q6QmMMLCA6ArxnTfew8H+0uam4026z567VZQG1Z98E8jVbwuBak9hGDCuRBNRAV7+kW0 B95uLZjhXDC23RvErpCsx2sTPCdcgjRo9WPGSNDzNBcOJrH0lg4UcQGrSRwYie/mbihA VETg== 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=z/J8KIBd8FwwQ9GCtKuGXF2/fLJclKixu9nNnrnC2i4=; b=YxrHEJC0FVx7JmN0cTQiKaYbSKDlVt7WJqf6oEseZ/8d+A4MrMl+aSzKDnrXe38SmI dJsL1UQR9Ve2516eweP2fLEYDf/naNpW4O741fOmLVpPB2ibxGv0zRBz8GgllKFMreLZ X5J2N0O32D9/7L4gDo08qjZfm8gPmtQF3o/SDWDXz/CwubOqrdu9wGrK78Fs3QkZPFcs qxcmshCGNH3VSBClnRTT6yIdFduAHqNW2g9pSlsg6L8reQpcABp8Bxw7NUCCRYlGcF0x xfNJarQGY124FDgsTXC4ZHoAZtVnV5WcYqj/gKcRLU9dqSRZCRMQ9wLiKFpkOfMxA477 uJOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TTOLyHLz; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j11-20020a05620a288b00b0069f9f390b1bsi3683969qkp.423.2022.05.27.11.21.47 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 May 2022 11:21:47 -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=TTOLyHLz; 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]:49638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1nueao-0007az-GS for patch@linaro.org; Fri, 27 May 2022 14:21:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nueYO-0006Ca-EO for qemu-devel@nongnu.org; Fri, 27 May 2022 14:19:16 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:46946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nueYK-0003V2-HP for qemu-devel@nongnu.org; Fri, 27 May 2022 14:19:16 -0400 Received: by mail-pj1-x1032.google.com with SMTP id v5-20020a17090a7c0500b001df84fa82f8so5009543pjf.5 for <qemu-devel@nongnu.org>; Fri, 27 May 2022 11:19:12 -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=z/J8KIBd8FwwQ9GCtKuGXF2/fLJclKixu9nNnrnC2i4=; b=TTOLyHLzdBe+m//0qpy69wpnOMHGCdUDahS+iBfIrrIsn/ptO0mVxZunS2fSYRVU2D Cx4IivtuBMLCvXO6xpLXxrzsHSyGYG802jakbudXxh5eS3jm+QLcQAfjk1KF0MVNBUcW YoqS/AqhpCkor2pMM+rfonCT7HzYIrNULgcShzw7GyfCKBnrNTh0oXYDmIZCiXk5dXRB Uxy/L8dQJlYuCetWwaVQTEKSX+HlT4H/2PqsRgQYH7iYCrtJuDTCiVuyhdXGAj+U0VrI /rTVV4a2T7TDpd0QDAWGwo4HVUO/BiLQ5qWr/cp1C6Ny1LWHAPrb63I9J9ZmF98hbeOl wU7Q== 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=z/J8KIBd8FwwQ9GCtKuGXF2/fLJclKixu9nNnrnC2i4=; b=0g6rBtlUPRD32IzWCpTDUkhcFSP8swGFKCG5pesTS+EU4k8KoYJe743euFW9GyYTRi 4PejNulpzbZABJd1daGRi9bz4oUfeJViYdYdpyKX+MHBnpIxsTvSgKgLWhRL8+qKLxL1 715dIewkH5MxrjFwhSPdcv0/TMf1cBBNnOgKreAJqAiRg3o0psX4OpR/BCwOZX74pA11 eh8rYj9AlGqOUbyXGjUGWAK50XUt0bm45guI9o4nIj9NHJw/vh5xRWF/lib4GPgWMyaH GOCk4mC0L2w/rWtJIHIFtditPIp9B2awitgTE/l0tum4Af5CGCSB87TshKPnxLXnkKWN 11LA== X-Gm-Message-State: AOAM533b7tnShzmPF9sO8/jWx1g3YQi2+65umO26n2zXKMjVP4ZQigvY cdfLKrsVytGlFs5GOAygovwN3cai//dbzg== X-Received: by 2002:a17:90b:38d2:b0:1df:51e5:9a0b with SMTP id nn18-20020a17090b38d200b001df51e59a0bmr9675468pjb.101.1653675551163; Fri, 27 May 2022 11:19:11 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 11:19:10 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 002/114] target/arm: Move null function and sve check into gen_gvec_ool_zz Date: Fri, 27 May 2022 11:17:15 -0700 Message-Id: <20220527181907.189259-3-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 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target/arm: Rewrite sve feature tests
|
expand
|
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index dd4a5b23ab..903514cb6a 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -137,13 +137,19 @@ static int pred_gvec_reg_size(DisasContext *s) } /* Invoke an out-of-line helper on 2 Zregs. */ -static void gen_gvec_ool_zz(DisasContext *s, gen_helper_gvec_2 *fn, +static bool gen_gvec_ool_zz(DisasContext *s, gen_helper_gvec_2 *fn, int rd, int rn, int data) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_2_ool(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vsz, vsz, data, fn); + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_2_ool(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vsz, vsz, data, fn); + } + return true; } /* Invoke an out-of-line helper on 3 Zregs. */ @@ -1377,13 +1383,7 @@ static bool trans_FEXPA(DisasContext *s, arg_rr_esz *a) gen_helper_sve_fexpa_s, gen_helper_sve_fexpa_d, }; - if (a->esz == 0) { - return false; - } - if (sve_access_check(s)) { - gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); - } - return true; + return gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); } static bool trans_FTSSEL(DisasContext *s, arg_rrr_esz *a) @@ -2424,11 +2424,7 @@ static bool trans_REV_v(DisasContext *s, arg_rr_esz *a) gen_helper_sve_rev_b, gen_helper_sve_rev_h, gen_helper_sve_rev_s, gen_helper_sve_rev_d }; - - if (sve_access_check(s)) { - gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); - } - return true; + return gen_gvec_ool_zz(s, fns[a->esz], a->rd, a->rn, 0); } static bool trans_TBL(DisasContext *s, arg_rrr_esz *a) @@ -8385,10 +8381,8 @@ static bool trans_AESMC(DisasContext *s, arg_AESMC *a) if (!dc_isar_feature(aa64_sve2_aes, s)) { return false; } - if (sve_access_check(s)) { - gen_gvec_ool_zz(s, gen_helper_crypto_aesmc, a->rd, a->rd, a->decrypt); - } - return true; + return gen_gvec_ool_zz(s, gen_helper_crypto_aesmc, + a->rd, a->rd, a->decrypt); } static bool do_aese(DisasContext *s, arg_rrr_esz *a, bool decrypt)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/arm/translate-sve.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-)