From patchwork Thu Sep 5 13:00:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 825654 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp288410wrb; Thu, 5 Sep 2024 06:05:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXXfl8Zux1/y4JyioE/1k02o73q0Mm9GnURrRdSTcPPW/YGfwIYYX+9y6MsASXQkadxysCRuQ==@linaro.org X-Google-Smtp-Source: AGHT+IEn7mf4gT5HCgclqxojbVt1JMPR0Umnc1+3JO+RigPsM/AlTuYOfeQ+0LcL5/TUl0SmZfOd X-Received: by 2002:a05:6102:3ec8:b0:498:d495:2cd7 with SMTP id ada2fe7eead31-49a779b5f33mr17290001137.14.1725541556203; Thu, 05 Sep 2024 06:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725541556; cv=none; d=google.com; s=arc-20160816; b=i7sDB8efhbfctHnR8dcaonOYMpVo6o3wJoKJOsuQII6iBOnioE4R16Kn2b4xCBOv59 QNvzF3oS9KhK51COOqjSkfvW6Gybgh9s5Y38+OZvwYN3w0mfqwDU0Fj29XQBkDhSHWYm OhHj65BC55j9W70orAUkZ1WYBz+0G+tPCe+ddAcCkJZXR7JXmQndVq3jtZ5OzF+nuCti ozm737SfeITgdhD+HWqB5Dv+WRcNDBPoGnnUdGvmriKgk9Nqk+SEaXqhaJSOaorSqXlg GscRkXvUNPkFflkqyLhxUoEC7+eEFtagcLvmJNSQdPOY3clidWFh+4u+uvLR5Ff/aonO LPeg== 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=2ZZJRnDQpXVmhxlb1bFCeHBKJRVNNn9/NPG2id8LS9Y=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=Zv7y5qTZb9H2fMTysq/MeaC7hOQrWrtAbW/T2h4BhAGdfsVP1Bc4bmAd92BNqZwNQv q7ICBhDZYuYpTaqtYY675MMs8o0fOJeWWbN7ij1Dcy9+5nT3fuaP8vf7dkiPcLkhv5S8 bdb3JVwqp/EAsPzM2KmDEx11SFOD/cwX0uQ/MXHoaEhXXG5/NhJ64Yg2oNE9+VXNze49 LHi9f/cOG0hF1WafUvl7DE5T96JTtJ5ZpYLnTnQIOYcYEOOKgtITBF8AK+l+MkrxKoow o1hFjOW8l2CTnWKytXNLfJsTaw/islJJ1THkFFUNnEzSR/aBKqhrEXuNbkF79+W+OZN6 UonA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qfLd2VjI; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-49bbef84c05si729722137.154.2024.09.05.06.05.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Sep 2024 06:05:56 -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=qfLd2VjI; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smC75-0001Yr-Gx; Thu, 05 Sep 2024 09:01:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smC6x-00015b-UK for qemu-devel@nongnu.org; Thu, 05 Sep 2024 09:01:20 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smC6q-0001iq-WA for qemu-devel@nongnu.org; Thu, 05 Sep 2024 09:01:18 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42bb81e795bso5947345e9.1 for ; Thu, 05 Sep 2024 06:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725541265; x=1726146065; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=2ZZJRnDQpXVmhxlb1bFCeHBKJRVNNn9/NPG2id8LS9Y=; b=qfLd2VjIE7ZTP5fNxapQbXQ9QqzzPiU2bCuCV43bGMTdNy/n5He5DqAACB/H8Q1riW q9dE43sJidrpkkfy1MLvtZR+nVi/V3tj2sQwaYGbvnz/5mSzqp6x901uERMtoe6prDzL /mSUc7SkgDmQQN94fK5ouLGgLCN3+X3WutgSInMgCRSPpGsnS2aT3x5KHIjNqcQL6ODB L4GnstSj1D7xD4Vn0RswgDh3FAz+SIi9pzkKLrd0UHyLowSYZ+kPIc72ZLvOBXi7H9Ry dDEivhwBYYqF6NnI8zadjKqEZRCMnIonTK9UQIzUznyaH3+EVuUQ1rSb2eSdRoBZirpv XAfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725541265; x=1726146065; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2ZZJRnDQpXVmhxlb1bFCeHBKJRVNNn9/NPG2id8LS9Y=; b=fW7Ink3Xm0DfxZ0wfshv1pd7dZvh2fgzOZSHP4HpvkArBnROOlHF4CdeqA+Iix5VpG upQLrWekYz3KTu/r0F0XFvUp1Jg2QwpLmYInN226y6zDjt7InzOoAIwU3eSzr5K8tWLX scbf18929VeLLkpUr3lUfSELkHtrLkGRaj/xcyhqAl0OQ0LyywhAJjQ34rX+CMvYzeC6 +bomupHSSCphurtpRe7QIadBaZv2Y/fKhR/w0ixW5cIOJpS657R1F2Ah0mlg1wZGY++m 8wrHuq16JKFFEV5Vcn0XyCE8aY0Nb3ig2YyUoDVXjtdfaok3dYJvftvN/FbrzdtPZ61H 2Gsw== X-Gm-Message-State: AOJu0YxHrg7uMt9xz1JtdUBp0NPtewELCzog5ai1wwQXgk+l89mg7p/6 mZNiC0TyQ7Sp/ipD56UrE+9FMyzO4d40k1SSlLUbpQfo1FRMJ4/WsBZCGIGodrLEZ1yhN5GPTiT M X-Received: by 2002:a05:6000:cce:b0:371:8cc3:3995 with SMTP id ffacd0b85a97d-374a95c344fmr13547082f8f.34.1725541264492; Thu, 05 Sep 2024 06:01:04 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6e355dfsm232251365e9.46.2024.09.05.06.01.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 06:01:04 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/25] target/arm: Pass env pointer through to sme_bfmopa helper Date: Thu, 5 Sep 2024 14:00:37 +0100 Message-Id: <20240905130100.298768-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240905130100.298768-1-peter.maydell@linaro.org> References: <20240905130100.298768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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-bounces+patch=linaro.org@nongnu.org To implement the FEAT_EBF16 semantics, we are going to need the CPUARMState env pointer in every helper function which calls bfdotadd(). Pass the env pointer through from generated code to the sme_bfmopa helper. (We'll add the code that uses it when we've adjusted all the helpers to have access to the env pointer.) Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/helper-sme.h | 4 ++-- target/arm/tcg/sme_helper.c | 4 ++-- target/arm/tcg/translate-sme.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/arm/tcg/helper-sme.h b/target/arm/tcg/helper-sme.h index d22bf9d21b0..59ecaa15485 100644 --- a/target/arm/tcg/helper-sme.h +++ b/target/arm/tcg/helper-sme.h @@ -126,8 +126,8 @@ DEF_HELPER_FLAGS_7(sme_fmopa_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_7(sme_fmopa_d, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, ptr, ptr, i32) -DEF_HELPER_FLAGS_6(sme_bfmopa, TCG_CALL_NO_RWG, - void, ptr, ptr, ptr, ptr, ptr, i32) +DEF_HELPER_FLAGS_7(sme_bfmopa, TCG_CALL_NO_RWG, + void, ptr, ptr, ptr, ptr, ptr, env, i32) DEF_HELPER_FLAGS_6(sme_smopa_s, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, ptr, ptr, i32) DEF_HELPER_FLAGS_6(sme_umopa_s, TCG_CALL_NO_RWG, diff --git a/target/arm/tcg/sme_helper.c b/target/arm/tcg/sme_helper.c index 02106809ce1..289ffabbfbe 100644 --- a/target/arm/tcg/sme_helper.c +++ b/target/arm/tcg/sme_helper.c @@ -1079,8 +1079,8 @@ void HELPER(sme_fmopa_h)(void *vza, void *vzn, void *vzm, void *vpn, } } -void HELPER(sme_bfmopa)(void *vza, void *vzn, void *vzm, void *vpn, - void *vpm, uint32_t desc) +void HELPER(sme_bfmopa)(void *vza, void *vzn, void *vzm, + void *vpn, void *vpm, CPUARMState *env, uint32_t desc) { intptr_t row, col, oprsz = simd_maxsz(desc); uint32_t neg = simd_data(desc) * 0x80008000u; diff --git a/target/arm/tcg/translate-sme.c b/target/arm/tcg/translate-sme.c index ae42ddef7b3..3ceb32e8bd9 100644 --- a/target/arm/tcg/translate-sme.c +++ b/target/arm/tcg/translate-sme.c @@ -363,7 +363,7 @@ TRANS_FEAT(FMOPA_d, aa64_sme_f64f64, do_outprod_fpst, a, MO_64, FPST_FPCR, gen_helper_sme_fmopa_d) /* TODO: FEAT_EBF16 */ -TRANS_FEAT(BFMOPA, aa64_sme, do_outprod, a, MO_32, gen_helper_sme_bfmopa) +TRANS_FEAT(BFMOPA, aa64_sme, do_outprod_env, a, MO_32, gen_helper_sme_bfmopa) TRANS_FEAT(SMOPA_s, aa64_sme, do_outprod, a, MO_32, gen_helper_sme_smopa_s) TRANS_FEAT(UMOPA_s, aa64_sme, do_outprod, a, MO_32, gen_helper_sme_umopa_s)