From patchwork Thu Jul 18 13:20:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 813189 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp291063wro; Thu, 18 Jul 2024 06:23:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXhhR4V9vNhlsPbecvwsE8MnYTC1GIkT/CJyl30+8M+0DLfoPfbAjNFyEj9t4MKN/pShxH18imB9sDjh+4jYvR9 X-Google-Smtp-Source: AGHT+IE+mHJNOS/DJjJNDwM8UI8qSfnA8XCra6/dhnXeipx0XTZHsXuXIfDYc0nfmkFutNWVfrLS X-Received: by 2002:a05:620a:1916:b0:79c:1345:a7f0 with SMTP id af79cd13be357-7a193b41d59mr147672185a.27.1721309028016; Thu, 18 Jul 2024 06:23:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721309027; cv=none; d=google.com; s=arc-20160816; b=bwugCUzD3nhBMvf+4R/XxXsYVOLh+8K2zxijSiHDUa7FWls2P9m8KdbPcnf5PKLeyW DiPk+azXhvFggAhaqfy8ok5vGSx23i4kWQseVMydk02TXS5lXMXJYWjCEMS/1COQEIGX hmJMt27gh8TfE1qxkxprD9SvuZgla0SxYK+lEXZai9G0YKeZ/nsodZebDWGB5/P35m1x hB2QzQ0W8hE/d0ELpMg/iN549RYVJXfCTWYmAy1W5+ailYzRPGjWHcshXMFH0oo0RJn1 6/Kgs3sy+rMWT+buRDE+GBhY2oo0vGVuiGVrJt0/KIIkDxcfAeA2fM9DGGPTiFVoVJb2 ksHg== 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=Gacol05z2j4g3ezomPw5aWtTptIdBc2mH3bQ/0FLyGY=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=C8s1lK0GmyrMRcAo6H6/FlDF+1p9dIlVp7icKSzqg5HTh6JT8GkhbHlcoc7e6Ki8hT eOVhrLBW5FLaW/EmtwLf4SnFuCxg2AzVptxWKUXhsQS4ICeWjH5375zl33z0qJXwXY4S fW39jpqx7B5ggXy3X0RoxvoFMm86SKhPYrntGk6VY0xQg3b8d2+PQuBM5lnGUWzBsyzQ 43neD+g740D0jo1c7DlvUv960+DyoSNv9twWTtzk53YGLY4bCHH9MV8Ml9ybCP4gJGju 2/5qvd03A/PiBYgjpbuX7MD7w27k7FaPwxxXPGoccDCEVCwvSO1x83BuLlILGyAMJbjJ Vveg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tdXlTC6A; 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 af79cd13be357-7a1939de666si55018385a.776.2024.07.18.06.23.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 06:23: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=tdXlTC6A; 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 1sUR48-0001kP-EV; Thu, 18 Jul 2024 09:21:00 -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 1sUR3t-00004r-Dk for qemu-devel@nongnu.org; Thu, 18 Jul 2024 09:20:46 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUR3q-0004WP-R2 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 09:20:45 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4266fd39527so2761195e9.1 for ; Thu, 18 Jul 2024 06:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721308841; x=1721913641; 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=Gacol05z2j4g3ezomPw5aWtTptIdBc2mH3bQ/0FLyGY=; b=tdXlTC6AYiD0x8+Du6jTgVJoFHZdwwpzpajsGimWfe3Evxm3Fk1YEP6QIWVi3LWwEZ YYBcMzlhVMQY+WYnZBYUYWmfJeHyWcSYo+x3z1jBTq1KLQ53R1cqpiEMdX0iUvJCKHbW bCDbWo3AmrxC2ZdL7L5mCGKcBle+pFnm4Jy0+UJxwA0JZfzEE6ukDoUUCVMJr/6LfjBE dXw+goUMCk3g3TgdVKRQX3o6ya0oTRJ5rHGuqtGUCmQSS2BlqT1SUJZUyc3rIuLrLtRL p18v7wVci1BEnnBByRyD95vXjh2RH8TLOgRfXIg2yso3ezKttMuI7bQV/m4r7ID6+r2o ck3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721308841; x=1721913641; 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=Gacol05z2j4g3ezomPw5aWtTptIdBc2mH3bQ/0FLyGY=; b=cwtjuMM0PDsul1sGsBzmXBdOsJftKF+LaagKlGjofG5zmBlp1grFDqoveJRwc8PtMw Qtjq7eJfKIrcEwLuO4HLhbwwbc0gWJYqlcSce9QxtRna4ATNzzXY8zVONihaYFEeyLZX /Z3ha6KOwx0yD1hK7XkzocmMkwu3t7QmA0IyzBwPu9NcsgzDJ26VpII6Tw4RDbrokevm U1+yLORMU22s0OFRRnwnJg9dSgH4x7ZOkeNuxH2iGsQ1X8iF88ghXYx9CR4v4ejmUaw1 WDqiLWzthWlyLiqx0hXZ8qte3Xcr08fs2pTOhhstdwDWrNQyN8CHSlCBv79tpR/W2OQZ jbXQ== X-Gm-Message-State: AOJu0YwUV5x7h/2jHTO84AbE0Un1/TBgNBylxcksvEQfS33fqhm40WCc xSu8r+8JzxjEly1c7v5XgwyqcvAf/9Ndac6S1QpZf+9QJroEBqGQAJDeu6l5qvGZnjykHfp9SZN o X-Received: by 2002:a05:600c:3553:b0:426:6455:f11c with SMTP id 5b1f17b1804b1-427c2cfc33fmr36642255e9.25.1721308841276; Thu, 18 Jul 2024 06:20:41 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427d2a8e420sm14059315e9.35.2024.07.18.06.20.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 06:20:41 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/26] target/arm: Use FPST_F16 for SME FMOPA (widening) Date: Thu, 18 Jul 2024 14:20:25 +0100 Message-Id: <20240718132028.697927-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240718132028.697927-1-peter.maydell@linaro.org> References: <20240718132028.697927-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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 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 From: Richard Henderson This operation has float16 inputs and thus must use the FZ16 control not the FZ control. Cc: qemu-stable@nongnu.org Fixes: 3916841ac75 ("target/arm: Implement FMOPA, FMOPS (widening)") Reported-by: Daniyal Khan Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Message-id: 20240717060149.204788-3-richard.henderson@linaro.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2374 Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Peter Maydell --- target/arm/tcg/translate-sme.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/target/arm/tcg/translate-sme.c b/target/arm/tcg/translate-sme.c index 46c7fce8b4e..185a8a917b0 100644 --- a/target/arm/tcg/translate-sme.c +++ b/target/arm/tcg/translate-sme.c @@ -304,6 +304,7 @@ static bool do_outprod(DisasContext *s, arg_op *a, MemOp esz, } static bool do_outprod_fpst(DisasContext *s, arg_op *a, MemOp esz, + ARMFPStatusFlavour e_fpst, gen_helper_gvec_5_ptr *fn) { int svl = streaming_vec_reg_size(s); @@ -319,15 +320,18 @@ static bool do_outprod_fpst(DisasContext *s, arg_op *a, MemOp esz, zm = vec_full_reg_ptr(s, a->zm); pn = pred_full_reg_ptr(s, a->pn); pm = pred_full_reg_ptr(s, a->pm); - fpst = fpstatus_ptr(FPST_FPCR); + fpst = fpstatus_ptr(e_fpst); fn(za, zn, zm, pn, pm, fpst, tcg_constant_i32(desc)); return true; } -TRANS_FEAT(FMOPA_h, aa64_sme, do_outprod_fpst, a, MO_32, gen_helper_sme_fmopa_h) -TRANS_FEAT(FMOPA_s, aa64_sme, do_outprod_fpst, a, MO_32, gen_helper_sme_fmopa_s) -TRANS_FEAT(FMOPA_d, aa64_sme_f64f64, do_outprod_fpst, a, MO_64, gen_helper_sme_fmopa_d) +TRANS_FEAT(FMOPA_h, aa64_sme, do_outprod_fpst, a, + MO_32, FPST_FPCR_F16, gen_helper_sme_fmopa_h) +TRANS_FEAT(FMOPA_s, aa64_sme, do_outprod_fpst, a, + MO_32, FPST_FPCR, gen_helper_sme_fmopa_s) +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)