From patchwork Wed Dec 13 13:00:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 753514 Delivered-To: patch@linaro.org Received: by 2002:adf:ff85:0:b0:336:3f68:820c with SMTP id j5csp179877wrr; Wed, 13 Dec 2023 05:02:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqY53ZuMGNN+gbQtsyVKP2kw4OcCYPFpMzXjLGH7Z7hO9J1zofjtawRy9SWg2lJbV4r8py X-Received: by 2002:a05:6102:4429:b0:462:e85b:b812 with SMTP id df41-20020a056102442900b00462e85bb812mr5854818vsb.24.1702472520901; Wed, 13 Dec 2023 05:02:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702472520; cv=none; d=google.com; s=arc-20160816; b=LMHJ5JkndJ5psn5XDm/RZwHwU7Gp17f+AwqGxIkEqnCjgKapAgdu28+ZLphv19HRJS AkKdTvEIGbMReDdEfKEqy20SuhZGgScGIo/Ap0DIufakoU0bxnuR3yTTe0I7jcwixmK8 Aayaxa7PcSJxTT6KDnZBuxvBlT6CLo4qdGO3/yhF2EGFXygazXiN4nRQHV02HUc7FmWn zDhYa0FBFCNEbmQalT0ivzlamVnV29GDwmUEbWKp6+dUFJPle4L5TjjqB3A1toLnSQYr CROEv29H5dITPyIBhTrXAtjMqLBeE02RMsRkEj1MsEuX5x7whtman1ioF1zn27l+jwR/ B/QA== 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; bh=K8gPhr1FD/cvkQM6331HoX0spR7yBwstoXyhogezqFk=; fh=TbI2pklXwlJGmj6m7lZZgI+jTnI/L5qcZuxsjME8SeI=; b=VzOgAwVQx2Jl2G+R5cXUfdN+OWpvrT7Bxog18shcBahaEOdiVwitKlYiV6ED2m3KG6 +9o3Ok7JU2DuQDWl4sIzex6YsENAs0Nxbb9/8Y8EUt+3FBa1d6He4YvAP1G0gZX7ooWJ hxE5rOXTxsz8hVOBpnaIRTgBavBGNDLqlJQk2PcimM9glB0mb87FCgdPYF0IXpapjCX1 fKJBD/FBGHbiCGkd/jbOVbhlfMnR64zVOu4A0NWlHn5u8Ojb7hMdh0KDEeq8Tp7lqfMr WeVvdOmUacimOCmZj07oKh3HSzqA02jiFRszWryuIWLXziZ7ZzHC2a5IH+Lq0AZMkwmC jmMw== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jm26-20020a056102199a00b0046495f8f98csi64460vsb.235.2023.12.13.05.02.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Dec 2023 05:02:00 -0800 (PST) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDOrW-00083H-Qt; Wed, 13 Dec 2023 08:01:19 -0500 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 1rDOrF-00082D-6I; Wed, 13 Dec 2023 08:01:01 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDOrC-0006so-UZ; Wed, 13 Dec 2023 08:01:00 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id B83F53B434; Wed, 13 Dec 2023 16:01:00 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 5B99B3C8C5; Wed, 13 Dec 2023 16:00:41 +0300 (MSK) Received: (nullmailer pid 1024696 invoked by uid 1000); Wed, 13 Dec 2023 13:00:41 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Michael Tokarev Subject: [Stable-7.2.8 01/24] target/arm: Fix SME FMOPA (16-bit), BFMOPA Date: Wed, 13 Dec 2023 16:00:10 +0300 Message-Id: <20231213130041.1024630-1-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, 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 From: Richard Henderson Perform the loop increment unconditionally, not nested within the predication. Cc: qemu-stable@nongnu.org Fixes: 3916841ac75 ("target/arm: Implement FMOPA, FMOPS (widening)") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1985 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20231117193135.1180657-1-richard.henderson@linaro.org Signed-off-by: Peter Maydell (cherry picked from commit 3efd8495735c69b863476e9003e624877382a72d) Signed-off-by: Michael Tokarev diff --git a/target/arm/sme_helper.c b/target/arm/sme_helper.c index 73dd838330..8856773635 100644 --- a/target/arm/sme_helper.c +++ b/target/arm/sme_helper.c @@ -1070,10 +1070,9 @@ void HELPER(sme_fmopa_h)(void *vza, void *vzn, void *vzm, void *vpn, m = f16mop_adj_pair(m, pcol, 0); *a = f16_dotadd(*a, n, m, &fpst_std, &fpst_odd); - - col += 4; - pcol >>= 4; } + col += 4; + pcol >>= 4; } while (col & 15); } row += 4; @@ -1106,10 +1105,9 @@ void HELPER(sme_bfmopa)(void *vza, void *vzn, void *vzm, void *vpn, m = f16mop_adj_pair(m, pcol, 0); *a = bfdotadd(*a, n, m); - - col += 4; - pcol >>= 4; } + col += 4; + pcol >>= 4; } while (col & 15); } row += 4;