From patchwork Thu Jun 9 09:05:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 580289 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp696640max; Thu, 9 Jun 2022 04:44:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1yakL35NFFtD28aGfVHVf7pdlL55cXVMxL9ITuXWKT/rE66cxukfifHDw6SVrNCndpmr1 X-Received: by 2002:ac8:5a11:0:b0:304:bab8:66f3 with SMTP id n17-20020ac85a11000000b00304bab866f3mr30876329qta.388.1654775061518; Thu, 09 Jun 2022 04:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654775061; cv=none; d=google.com; s=arc-20160816; b=ab/frO25CVA2Ou8OxvSQKJgjtHgvX6Bby6oLV23REy/23NaNhZxx+YF7327RIf2pv7 eHlvuXwpgWYJyHgiDXM2Zda6EkxEmrfIihccBH53Mx3d/+/ZxZKh4Awg3MoD/dkZA+y7 N5YgDvgVFB6fQ63P3Q35Mx6RjlOJK0xk682t51KSVML6F9qs16H9nwFMfdoUmNaLKtmZ 8/hPVaiy72uvFjoWUZxMVO5pys52U53Rv6IsDj09D90/wBlQHssUVSvHbslTMhGIR9j2 Wark3Pk9q+Lobx2iAQaL4YSSLZiUhIKvngn2pR8Xd2h6uR09pc6eK9uKLAbAO5sGayjL 5Fww== 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=lq+u7f2f7YE5vmdKlLixcNnaKlj2/xU4nnWKz5bhpYE=; b=f+Kes3p9VqJ118mGt+H/+HMA0humsSBAy5FRvu5+nOZt6Ysefc4tT7DTgisp/sVNVJ K+JNYJzXxjg5nLmjnLSwMGiXNI1KsFI8noV9xq+nkXz6Lw3vCa2MVpd1wjswHyhsxKnX DDjSEeXnuPeSRuY+DIRs/HqJXKCksiO8vxxK/R/x22vOqp8XT6WR/pap5o4fHOzcqCW1 PI/mDQBEP4pfrtepCUJaxFx2M63VPvUOYKjUJBJ2YZT8Au7g11nZMbKGvATobhdURE3C 8+Db/P/+hqNqQBXKLyvcz7C3anb2N8N8WwPg1wSLe1ysR9E/Qdo6zKk4Lov+XQ6cqvEn Efeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MUrD7RXv; 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 y19-20020a05622a121300b002f944144f7bsi6475219qtx.283.2022.06.09.04.44.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Jun 2022 04:44:21 -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=MUrD7RXv; 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]:60202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzGaL-0005eX-24 for patch@linaro.org; Thu, 09 Jun 2022 07:44:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzE7W-0001cl-Q9 for qemu-devel@nongnu.org; Thu, 09 Jun 2022 05:06:28 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:53919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzE7V-00067I-Ao for qemu-devel@nongnu.org; Thu, 09 Jun 2022 05:06:26 -0400 Received: by mail-wm1-x331.google.com with SMTP id z9so5330339wmf.3 for ; Thu, 09 Jun 2022 02:06:24 -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=lq+u7f2f7YE5vmdKlLixcNnaKlj2/xU4nnWKz5bhpYE=; b=MUrD7RXva30XHSMxqFTV9lc8x1KlHVijSZRf+PibyhYch/MRfG/ERrlbrAMa5K7Lbi Zh0hCq8gpwkTmWCCAEoIwIa/YBKI+MJsBSdTRikbaHwPDzOHrSci16Y27NIGCezsFy17 1lDwisM/ONvYtEi0W+U6a4Y2FxskNC1W5x5DaHm1u1AFO3WSeqjYNxIjWoWulRmdwoXc U7axr4SlRTm0QDriWRDmArFhMgsXjN5hCxhyIatTPpERVJo68ecmxRtH373ThXDxLM/+ xS6UMNisK67Tsm07sZkl+t5muA0hOT2q8Y9L9oRDBEcCsr1ngmMVPZbIj6k4D0+2RSB+ BgVQ== 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=lq+u7f2f7YE5vmdKlLixcNnaKlj2/xU4nnWKz5bhpYE=; b=1Gneaqf0TGKtLDPRQIEPtsTrtedTTu6DjzUILgmn8QsQix8vg/kgNqnnMFJQ29H9/W 1vjD54e2jovsTiKfbLcuQzP2chLBFIqmL56VAzMiPqLyjQI86bqGW/s6wM29H7zmRkru +cU4KNpnS6CXOYY92dTI8I2XrwCuqU3bqvrVryR04RGLYbiurPOrdTNW5DrxidhiuvDW QsVoiy5JxFZzrd2Jlc/6Btd8SvqeHjvQcKILHhR6dGM46BLy5l4XBg5iHx6NPrRtnjd/ JNCLVAtgGTVNpiI8HhPywjbyv7tLyT8ZWPaBQPnf+/LzJEccRhGsQ9ZkMBK1KVFZCSL7 AWVQ== X-Gm-Message-State: AOAM530gua54tczfeA2qlyqeoH9hSSzm7uPt5EN+Ru2IqpP1IUjcRY43 TO5/5dZm1KcAbgrYVpO+JfvH1iGY82n3aQ== X-Received: by 2002:a05:600c:a42:b0:393:d831:bf05 with SMTP id c2-20020a05600c0a4200b00393d831bf05mr2190206wmq.187.1654765583991; Thu, 09 Jun 2022 02:06:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id c13-20020adffb0d000000b002183cf9cd69sm11349796wrr.15.2022.06.09.02.06.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 02:06:23 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 41/55] target/arm: Use el_is_in_host for sve_zcr_len_for_el Date: Thu, 9 Jun 2022 10:05:23 +0100 Message-Id: <20220609090537.1971756-42-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220609090537.1971756-1-peter.maydell@linaro.org> References: <20220609090537.1971756-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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 The ARM pseudocode function NVL uses this predicate now, and I think it's a bit clearer. Simplify the pseudocode condition by noting that IsInHost is always false for EL1. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20220607203306.657998-7-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 322508170e3..6b17c0f507f 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6238,8 +6238,7 @@ uint32_t sve_zcr_len_for_el(CPUARMState *env, int el) ARMCPU *cpu = env_archcpu(env); uint32_t zcr_len = cpu->sve_max_vq - 1; - if (el <= 1 && - (arm_hcr_el2_eff(env) & (HCR_E2H | HCR_TGE)) != (HCR_E2H | HCR_TGE)) { + if (el <= 1 && !el_is_in_host(env, el)) { zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[1]); } if (el <= 2 && arm_feature(env, ARM_FEATURE_EL2)) {