From patchwork Thu Nov 9 13:42:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 742575 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:110f:b0:32d:baff:b0ca with SMTP id z15csp847449wrw; Thu, 9 Nov 2023 05:53:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IElafdikjpP0ns8Ol1zaMOQnrh0Y3cPcWX0xZjzcVQQb2Xzv6XuY4DyoRdbSUlytEy9SNn4 X-Received: by 2002:a05:622a:10f:b0:418:797:20b6 with SMTP id u15-20020a05622a010f00b00418079720b6mr5471467qtw.5.1699538020172; Thu, 09 Nov 2023 05:53:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699538020; cv=none; d=google.com; s=arc-20160816; b=CJ641syi2xILaHP1/iwZtCjEPjrtsOj2vv6w0TAJIhDmapQznYlgBwsiB3dnTljlnz 5LWWuUymUlUbZyAP41ydCS3fpbtZu4oDHMOKHYg2h9+1jFiOXBSGZHpP4ugBSojpwDSF mS3aVb5V9lCpSQkc3hBMeh2VO2iwhseJ6h5tDyXzZuYzbKDClzEN05PNDK2hFSlWc/UN tkMcQrQc426IGAPXZthTSEf91gRPf4DVP1k/DmiOfnKka3lCcnDKuANLv7/h0tobMB6e l3G/u0dpRp9Es6P/SyAorAf++0nhArgFx6/SoAmqjXMlDBB0Yf2LAt0av+NzC3N/jal8 gwPA== 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=+w//xop9vwl7oT1uRjINapQzVvAujLRM7+s81oK0Yiw=; fh=PiAP/tcXQRrLKJkD8+IkmRB/YLniLgzd6sMPrV2nVKI=; b=AbZ1dI1YQ25FeLs9WyoUbAwbdVTnJTFax+joncLZFLhoLZuw+fmQ7q4Baa/dR3MkzH vAE57HewYJ33UBfGq2TYY0E10W7sCN/DrH7f8np1xhWCUh1LiLenLONbUtpvwDVsTDy4 DI+sJX/iXumDQ113DCWHbRHOAMQyXVzvYjVWsIqFgx9pxVjmDtN6S9MKIJrZalV3iwnU NzD70vh+AIsG9mLK2Qrb3tihabQ2ppMRTZg1wWQ/9K5FDDLhtZgsfXKbA6z0rwNaMw95 TjSiDqoIjMtHe9GsSIeTAVa7KP8tBGZ/jcsAKE75BaPdK9HiPsmN+IbzkU57emWBd165 qUrw== 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 d1-20020a05622a100100b00418114c96e8si2909716qte.390.2023.11.09.05.53.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Nov 2023 05:53:40 -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 1r15OZ-00048x-5i; Thu, 09 Nov 2023 08:48:31 -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 1r15O7-0002jS-U5; Thu, 09 Nov 2023 08:48:04 -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 1r15O5-0002P3-7O; Thu, 09 Nov 2023 08:48:03 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 22D6631B27; Thu, 9 Nov 2023 16:43:15 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 31A14344CD; Thu, 9 Nov 2023 16:43:07 +0300 (MSK) Received: (nullmailer pid 1461904 invoked by uid 1000); Thu, 09 Nov 2023 13:43:02 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Sergey Evlashev , Richard Henderson , Michael Tokarev Subject: [Stable-8.1.3 47/55] target/mips: Fix MSA BZ/BNZ opcodes displacement Date: Thu, 9 Nov 2023 16:42:51 +0300 Message-Id: <20231109134300.1461632-47-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: Philippe Mathieu-Daudé The PC offset is *signed*. Cc: qemu-stable@nongnu.org Reported-by: Sergey Evlashev Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1624 Fixes: c7a9ef7517 ("target/mips: Introduce decode tree bindings for MSA ASE") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230914085807.12241-1-philmd@linaro.org> (cherry picked from commit 04591b3ddd9a96b9298a1dd437a6464ab55e62ee) Signed-off-by: Michael Tokarev diff --git a/target/mips/tcg/msa.decode b/target/mips/tcg/msa.decode index 9575289195..4410e2a02e 100644 --- a/target/mips/tcg/msa.decode +++ b/target/mips/tcg/msa.decode @@ -31,8 +31,8 @@ @lsa ...... rs:5 rt:5 rd:5 ... sa:2 ...... &r @ldst ...... sa:s10 ws:5 wd:5 .... df:2 &msa_i -@bz_v ...... ... .. wt:5 sa:16 &msa_bz df=3 -@bz ...... ... df:2 wt:5 sa:16 &msa_bz +@bz_v ...... ... .. wt:5 sa:s16 &msa_bz df=3 +@bz ...... ... df:2 wt:5 sa:s16 &msa_bz @elm_df ...... .... ...... ws:5 wd:5 ...... &msa_elm_df df=%elm_df n=%elm_n @elm ...... .......... ws:5 wd:5 ...... &msa_elm @vec ...... ..... wt:5 ws:5 wd:5 ...... &msa_r df=0