From patchwork Sun Mar 6 19:40:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 548739 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6713:0:0:0:0 with SMTP id u19csp1113713mag; Sun, 6 Mar 2022 11:41:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMZaHmh8pwg5ztmhgqv52H/B0HDZZFqb1/086EYuj7uPomaWXUvN4ScWKI/1cHyGa217dN X-Received: by 2002:a25:4884:0:b0:628:c114:eb34 with SMTP id v126-20020a254884000000b00628c114eb34mr5708944yba.602.1646595681760; Sun, 06 Mar 2022 11:41:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646595681; cv=none; d=google.com; s=arc-20160816; b=05rzsry8tfczH8WR0EpqBskFMqG7bnoguvlDJg75LNfWxHQ00BQIC0eS2yNoC7F32s ULz/rmyvxCKVrN9BAFx8kndw7s6trqPv6N00s4peMIX3tt3uh6rJdIPwqQZklPEl091o T6eEVUx2mKFyHlDuVnYHl+08JTg4fiIasAE5DVHipwGWABgu9J5MZ+CTYvxrgifExwOM amME90J4KAs+ZbMD2GGLUbSdm/x/IIH+QU4QZik47ek23C4ZeGirsz+GVqbaLEilPMTe tDdWceAxEmCfQaMXMYiqL6kB4dBHAObmc5uH/ShNUPhhMOMcbdPUSeO0VLwoRaT1pmcE Za9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=USrD4Z+NJk0T9WhASYatV+Fg7sTb+IN7ppCcZuRfV40=; b=G3OzypADoo2PeDmPS4N0e7gG16af9SxrOCcwZsBXKh7s1jX0OcdSOUUfYHughmnREC 6r+KmckhNM1nQPWs3QXRW3LxuvznqLa3pxkfC0OoaVchoCcVhCwjyBhVJo2zcxO1mycO bvglVgKNsSRUsYPgd+qid6/D+Ff38mAUe9zxwUaEIs4plOMiOPvysdKLz3qco3z8Bvnv cZFZpUDCIG418xz3l0Mjj47cJEom0EXSZqTzmXKrPunUosR9PCrzdwzc1hfXYHr1BVdg 9IZMd/AwQK+kXL3wOENmRqJ3ND4btYsD28vmLzFeFFC5YQzBVUR8o62ZhupdQMStK4/K zr4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OROnPy9W; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a4-20020a056902144400b006286a3da971si8106403ybv.131.2022.03.06.11.41.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 06 Mar 2022 11:41:21 -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; dkim=pass header.i=@linaro.org header.s=google header.b=OROnPy9W; 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 Received: from localhost ([::1]:55332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQwkr-0004QC-BI for patch@linaro.org; Sun, 06 Mar 2022 14:41:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQwji-00042D-Qs for qemu-devel@nongnu.org; Sun, 06 Mar 2022 14:40:11 -0500 Received: from [2607:f8b0:4864:20::102b] (port=43626 helo=mail-pj1-x102b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQwjg-0001p8-Up for qemu-devel@nongnu.org; Sun, 06 Mar 2022 14:40:10 -0500 Received: by mail-pj1-x102b.google.com with SMTP id z12-20020a17090ad78c00b001bf022b69d6so11183464pju.2 for ; Sun, 06 Mar 2022 11:40:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=USrD4Z+NJk0T9WhASYatV+Fg7sTb+IN7ppCcZuRfV40=; b=OROnPy9Wox0MyUPuijQwGjQsFhmtRqX9twk/Gg603ULU7LCB94jPURuBhvx4PQ1ztm rDuoLpR6wCBzJMCy6TFPFLVwd3896rRPtsdlqx4RLJyxacHRuKHSTH6uU5th2glyBYrr tl5Qz1NOVV/1hu8FiRzLAo/LH28/B/UbK5hrLwaV4UcsJWsqnJhJl8uQM4aV6QsSXFQG HYmbbrL4ON32JbSG2d/nthiukrtup0ulA0rimo3rCO9GNi2EHpAmcpY+GKAa5DVx1TR3 SPZBG+nBFLD1GQ1krMgvBFaLr6Xk2NVCXQqPmzqHP2cOLfNZJaMFWOE2rGtcDOVRAZEz 0tcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=USrD4Z+NJk0T9WhASYatV+Fg7sTb+IN7ppCcZuRfV40=; b=uf7AIJLBO6vekWq41QRNaNcsb/b5nbHbSDEeZ/8YE6CqnkAB4uYPX/w0UtzNrlHL92 KDYDBndE5czDRjouCxX5YrYe0bwghd/pOuEYMvGwd2k+8Q3XNT6zXvX2R3KpylBgQWFQ HrWSsLBMTmKBkYHp6onsg3PgqJ3Rakjc5CHbi7QfhxcR52QZdjJODOzRbyiysK51ztav 4adEVlU/PcLSgvcTgqILeBkCYe+lhPsNite0CTUfKzxHHBoppxsrhtSs4e0UK0SNl3BN G2j9mV5bbDdpESQaPm/MLV5dQE7iTLzJUKRgcI9ddTBX9D+PSZyDu5O+Tan4jnPzUmv1 ADqQ== X-Gm-Message-State: AOAM531Qel+uZfW7vKc7YsOA4SsLUukh4okAg/rGbqrO+OPNiKFPlZai 5NeyUj5X9xkk29T2NU8oa0BT4fW5UUOP8g== X-Received: by 2002:a17:903:2442:b0:151:e3e2:cbf9 with SMTP id l2-20020a170903244200b00151e3e2cbf9mr3056424pls.115.1646595607135; Sun, 06 Mar 2022 11:40:07 -0800 (PST) Received: from localhost.localdomain (cpe-50-113-46-110.hawaii.res.rr.com. [50.113.46.110]) by smtp.gmail.com with ESMTPSA id on18-20020a17090b1d1200b001b9cfbfbf00sm10060886pjb.40.2022.03.06.11.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Mar 2022 11:40:06 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH] target/arm: Fix sve2 ldnt1 and stnt1 Date: Sun, 6 Mar 2022 09:40:03 -1000 Message-Id: <20220306194003.13030-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102b (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The order of arguments between ldnt1 and ld1 are swapped in the architecture, and similarly for stnt1 and st1. Swap them in the decode so that we have "m" be the vector operand and "n" be the general operand. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/826 Signed-off-by: Richard Henderson --- target/arm/sve.decode | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/target/arm/sve.decode b/target/arm/sve.decode index fd96baeb68..91a0873b7c 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -1577,22 +1577,25 @@ USDOT_zzzz 01000100 .. 0 ..... 011 110 ..... ..... @rda_rn_rm # SVE2 64-bit gather non-temporal load # (scalar plus 64-bit unscaled offsets) -LDNT1_zprz 1100010 msz:2 00 rm:5 1 u:1 0 pg:3 rn:5 rd:5 \ +# Note that Rm and Rn are swapped, so that the vector and general +# register arguments match LD1_zprz. +LDNT1_zprz 1100010 msz:2 00 rn:5 1 u:1 0 pg:3 rm:5 rd:5 \ &rprr_gather_load xs=2 esz=3 scale=0 ff=0 # SVE2 32-bit gather non-temporal load (scalar plus 32-bit unscaled offsets) -LDNT1_zprz 1000010 msz:2 00 rm:5 10 u:1 pg:3 rn:5 rd:5 \ +LDNT1_zprz 1000010 msz:2 00 rn:5 10 u:1 pg:3 rm:5 rd:5 \ &rprr_gather_load xs=0 esz=2 scale=0 ff=0 ### SVE2 Memory Store Group # SVE2 64-bit scatter non-temporal store (vector plus scalar) -STNT1_zprz 1110010 .. 00 ..... 001 ... ..... ..... \ - @rprr_scatter_store xs=2 esz=3 scale=0 +# Note the Rm and Rn swap, similar to LDNT1_zprz. +STNT1_zprz 1110010 msz:2 00 rn:5 001 pg:3 rm:5 rd:5 \ + &rprr_scatter_store xs=2 esz=3 scale=0 # SVE2 32-bit scatter non-temporal store (vector plus scalar) -STNT1_zprz 1110010 .. 10 ..... 001 ... ..... ..... \ - @rprr_scatter_store xs=0 esz=2 scale=0 +STNT1_zprz 1110010 msz:2 10 rn:5 001 pg:3 rm:5 rd:5 \ + &rprr_scatter_store xs=0 esz=2 scale=0 ### SVE2 Crypto Extensions