From patchwork Tue Dec 12 12:17:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 753047 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1867104wrs; Tue, 12 Dec 2023 04:19:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IHX83EJNBF3cTvXxi12ozeLH7fVUubfqFrOMiwG+ZboqfntPuFRGL3w5J4VvjbzKkE1wojF X-Received: by 2002:a05:622a:148f:b0:412:c2a:eaef with SMTP id t15-20020a05622a148f00b004120c2aeaefmr8142287qtx.11.1702383569242; Tue, 12 Dec 2023 04:19:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702383569; cv=none; d=google.com; s=arc-20160816; b=eLY8fhvMLUYpB/0Efcj4H6M9BPJXGqafCuqJCzAyPErohT50lkVFJxpNqiWezCfSJJ G3amevHxp3i568vxwEhN2nEVlg+XNISN+qmq2U7YpibDc2AG9jrykCAxKAt5rAebswzp XcCImOPp1hNEDN8KkJUB4tJcuMfzMbknrwwDDTwMgdMQSeNwzlFSlfoz43KMsYTlOt+g W5Lmoo7Ot0w+Nb/Xr0qSwXdjxakHAwfG+/vrKFAG4WCBwHxlALknF9qDtkjWFNJPMeSJ U42QYZi7EUJ9EEea1YG7LsqbJpW6Glo7e6101++M0pYRHTlYXCLdL7CCe8uIQibdHKb+ aJ2A== 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=V27TfXrFeQATSb5czE4qvxs3kxtgF+n+/XDv27oAFsk=; fh=TbI2pklXwlJGmj6m7lZZgI+jTnI/L5qcZuxsjME8SeI=; b=ZRaADggv6KpWMvAjyOKYutCCZ9EMhQS569wqXK/rD1RJYn6YBuRAR+CXoDd13OHZ7D smy1ubhw2cI/lY2nR469q8UIbKLZ+I5CCtCYFoJTfP+mlV0u/c5mkzuLXCGuUSv137UP WS8QivUu9Xx/RscrQJ25eqObGbS1pF1FGu0E53nCYYR2lkIObJG4YwD3CCQhuywu7I/3 WJD1cEMQb0jkofb8CJKLR0+S4JGQay/2+eHa0MVYMKTcOZwwG7W0lloEztovfOdpbOjS uvjBXhKqmvKYJkRCN84lX5TNaNhKFmvJEwFrgxuSPSXGrqQnV4/+jPFfMBJO6mwKjSea bpYw== 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 ey10-20020a05622a4c0a00b004237af6e8dfsi11877680qtb.180.2023.12.12.04.19.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Dec 2023 04:19:29 -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 1rD1iz-00057z-4J; Tue, 12 Dec 2023 07:18:57 -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 1rD1is-00056F-Gn; Tue, 12 Dec 2023 07:18:50 -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 1rD1ip-0000De-EN; Tue, 12 Dec 2023 07:18:50 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id DB8673AEF5; Tue, 12 Dec 2023 15:18:48 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 9FD6D3B943; Tue, 12 Dec 2023 15:18:31 +0300 (MSK) Received: (nullmailer pid 1003404 invoked by uid 1000); Tue, 12 Dec 2023 12:18:31 -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-8.1.4 02/31] target/arm: Fix SME FMOPA (16-bit), BFMOPA Date: Tue, 12 Dec 2023 15:17:50 +0300 Message-Id: <20231212121831.1003318-2-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/tcg/sme_helper.c b/target/arm/tcg/sme_helper.c index 296826ffe6..1ee2690ceb 100644 --- a/target/arm/tcg/sme_helper.c +++ b/target/arm/tcg/sme_helper.c @@ -1037,10 +1037,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; @@ -1073,10 +1072,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;