From nobody Thu Dec 18 19:30:08 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1653933382; cv=none; d=zohomail.com; s=zohoarc; b=AR/PyqTOJVZ0eR3aih/qI8X0D/9r199KkkLePk3uBQniTJV6btZ/f18az//JGcesdaEp7T+Te9Cj8ldK/SqZa5uUG/qdRWHoTnScbuUNHbXbxp+z43G9wYw7xrETE0e83Ch1cm2Xw8hQhyCfaz8f19aM4nuSDIgf8CDpcRTvDbc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653933382; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ytydms9W5FFSpsppcw4HGoJVFWLdAeMuRsUCrOx5fAk=; b=Z/edTMk3FHaoUXEtr8V+vsFLqWMG9zqckA6JNgFa2eYWmZyVEgZoSUnW0Xr0g2Je9pdr8ue0jzS2NlwfOQ+gdR/qXVhVBPKO04nRjr0KF3oyYMYx+DvtG2/Jq5JTbetm1/H/CNrAMjFZGDbul5ALjyyPJVJK7mKEahSDbeAD1Ow= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1653933382610574.7947029582062; Mon, 30 May 2022 10:56:22 -0700 (PDT) Received: from localhost ([::1]:50410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvjcq-0007jb-Km for importer@patchew.org; Mon, 30 May 2022 13:56:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvhwf-0004Db-Uj for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:34538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvhwQ-0007Aj-IG for qemu-devel@nongnu.org; Mon, 30 May 2022 12:08:41 -0400 Received: by mail-wr1-x42b.google.com with SMTP id e2so15314489wrc.1 for ; Mon, 30 May 2022 09:08:26 -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.08.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 09:08:25 -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=ytydms9W5FFSpsppcw4HGoJVFWLdAeMuRsUCrOx5fAk=; b=ap26YMBtCQ2ftZKvNv2zQrQcmKGZ54Qeyn3lNLRTbWjhSP5C/hQ/oBSqxwbWkjckaz UF3T53K/IrFm7XAKqwBnRYEk0cqAX0uKXxLUQ0pIlHk4VziJIgL0KbuEywbmbx6ehib7 NMpIOFE1EY+3NdhCBzwH3D1mRnnNZRbXT3wtTalAtXYxqvSEdV9sl0tEmbTlFZ2OmVCD gqip2BUe87hdgIwNmXqZbu3lGhLtHy9+8VRHaXat2pF9+PXb/bru238nqJiNwQp5Q8k6 tJu6FwG5bGL+54Tq1EiWt7IKcOKiye7XoDnHPAtLMGGfXqn7zhRyw95JzI81T4Y3MjQ5 kcGA== 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=ytydms9W5FFSpsppcw4HGoJVFWLdAeMuRsUCrOx5fAk=; b=4UB+/NMe7gyxniP3XjJG393ISbvjnfotM4EvW0s80eAVlBmccjSOgKpvwQ9bXndU7E V/rIiBXSb2RAzyXdtjwP/3/cUo21iWs2hKdUB6iLkFm38klI6ZlPV3W7nbJtiXTvUuad cl2tOAcLNExzhmc3Vu650VH7vsl0LuHD/qmiQpo+SMTtumgAIljDo+tc0h3uvA2wueTE 2yn4IiKdC5dV4n728LRfyS3wWTRw/hzC+k5C+S7XXoh1IdVfMqZ4L3fQqiFeiP5XPYtL 1M1VU7CCIBDjcmQ9RoTCHHERLZxgUUbRQl3sQAIAiP/DksY5Y7FlDUI+lIwCiy+glsup /iXw== X-Gm-Message-State: AOAM530Zg6nAlujrqD9Md5TnUbAj4TzoEOFrLxmtNReyHf+mpoVJWgEy 32NLmVXI9mGI1S6xn06/MZV8xFhzgzm7qA== X-Google-Smtp-Source: ABdhPJy9cixv5vc9DA9BBHBf4446aMQSfDCEESHns6R/Bpq3djMdWifieWjk5CdNPBLJ/o7ilGPc0A== X-Received: by 2002:a05:6000:3c1:b0:210:2e6d:86cd with SMTP id b1-20020a05600003c100b002102e6d86cdmr7214844wrg.335.1653926905683; Mon, 30 May 2022 09:08:25 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 082/117] target/arm: Move sve check into gen_gvec_fn_ppp Date: Mon, 30 May 2022 17:06:33 +0100 Message-Id: <20220530160708.726466-83-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.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, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1653933383092100001 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Combined with the check already present in gen_mov_p, we can simplify some special cases in trans_AND_pppp and trans_BIC_pppp. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-80-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 364e419f3eb..f33bc9d480b 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -370,13 +370,16 @@ static void do_dupi_z(DisasContext *s, int rd, uint64= _t word) } =20 /* Invoke a vector expander on three Pregs. */ -static void gen_gvec_fn_ppp(DisasContext *s, GVecGen3Fn *gvec_fn, +static bool gen_gvec_fn_ppp(DisasContext *s, GVecGen3Fn *gvec_fn, int rd, int rn, int rm) { - unsigned psz =3D pred_gvec_reg_size(s); - gvec_fn(MO_64, pred_full_reg_offset(s, rd), - pred_full_reg_offset(s, rn), - pred_full_reg_offset(s, rm), psz, psz); + if (sve_access_check(s)) { + unsigned psz =3D pred_gvec_reg_size(s); + gvec_fn(MO_64, pred_full_reg_offset(s, rd), + pred_full_reg_offset(s, rn), + pred_full_reg_offset(s, rm), psz, psz); + } + return true; } =20 /* Invoke a vector move on two Pregs. */ @@ -1317,19 +1320,13 @@ static bool trans_AND_pppp(DisasContext *s, arg_rpr= r_s *a) }; =20 if (!a->s) { - if (!sve_access_check(s)) { - return true; - } if (a->rn =3D=3D a->rm) { if (a->pg =3D=3D a->rn) { - do_mov_p(s, a->rd, a->rn); - } else { - gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->pg); + return do_mov_p(s, a->rd, a->rn); } - return true; + return gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->p= g); } else if (a->pg =3D=3D a->rn || a->pg =3D=3D a->rm) { - gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->rm); - return true; + return gen_gvec_fn_ppp(s, tcg_gen_gvec_and, a->rd, a->rn, a->r= m); } } return do_pppp_flags(s, a, &op); @@ -1358,10 +1355,7 @@ static bool trans_BIC_pppp(DisasContext *s, arg_rprr= _s *a) }; =20 if (!a->s && a->pg =3D=3D a->rn) { - if (sve_access_check(s)) { - gen_gvec_fn_ppp(s, tcg_gen_gvec_andc, a->rd, a->rn, a->rm); - } - return true; + return gen_gvec_fn_ppp(s, tcg_gen_gvec_andc, a->rd, a->rn, a->rm); } return do_pppp_flags(s, a, &op); } --=20 2.25.1