From patchwork Thu Nov 9 13:59:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 742580 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:110f:b0:32d:baff:b0ca with SMTP id z15csp856475wrw; Thu, 9 Nov 2023 06:08:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJ6wjxQXZRUsHBFcqywFR25f6iJ1uKSjFAQ0pB9jMtkKYu/Jp/7pWQYPuGeh9y+Uzqu4Om X-Received: by 2002:a05:600c:1c95:b0:405:409e:1fcb with SMTP id k21-20020a05600c1c9500b00405409e1fcbmr6625763wms.5.1699538903896; Thu, 09 Nov 2023 06:08:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699538903; cv=none; d=google.com; s=arc-20160816; b=Ck9ye8USW3pOYgCXvwbxByM+bPKe6XhXUNqJSjDea0/y7W0I/rGN04oIz5308Na4Xz tp1cNV9UJzYxcOq47XM1PZEN/oYud3V/uUHxvFMS3DpaoPsjmmPBR9XLc0nnyNqUghlj X9nQ69LAHaoMXxJwIvfwIbQx208uIFN5IEnBINRCMsFsXDKeXHLKCT3qWxwrttkQcI5P SnxbinDpk0DSWreCdy+V+MmzQZuDQi10GId9TQJORVxKMISpsrOteaGEtmbUEwfPTN8J Pweot6FKWUztluoRvRW6Yfm1932TfULLx17o7Zrl3hb9yDrnzuNfsZYowZPF3/Vb13Us F2lQ== 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=woD8Gb46keP7oN+sv2dQwY4XrpxIhdJ6+UY86WUn2joqzKemzG8j6dknfx9spHuOaB O0lzEXsCEMHyrqeP5Ml5tXD4e4xe5k4HN5+dRf8EgCj0+bprbw2U/GOX9rRcgOQwe3cy elJsCwxB5hd2NF/q96ivzAmZRvAKdN3tniMWYwd1ZDvJo9Q2IbKgmXfvUZ6vyyBGaGKY DYqA5nNllkEdIq9c+Vff2+96DE/sjamYwnbHC6RyxNN3Bw4VxCp6iS1FtojuZTgWKD+c wBmpkXFzmVxplYkIs3TJGsI/uqb5vRx5lfs4VVw/8l5y3NEnQM1v5QZMxfS4J5QVLeAQ OJoA== 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 co25-20020a0560000a1900b0032d9fce25f7si5917379wrb.364.2023.11.09.06.08.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Nov 2023 06:08:23 -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 1r15gc-0007td-3V; Thu, 09 Nov 2023 09:07:10 -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 1r15eK-0001FG-DG; Thu, 09 Nov 2023 09:04:52 -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 1r15eI-0007M3-HG; Thu, 09 Nov 2023 09:04:47 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 7260331BF0; Thu, 9 Nov 2023 16:59:58 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 7BAEF34527; Thu, 9 Nov 2023 16:59:50 +0300 (MSK) Received: (nullmailer pid 1462949 invoked by uid 1000); Thu, 09 Nov 2023 13:59:47 -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-7.2.7 56/62] target/mips: Fix MSA BZ/BNZ opcodes displacement Date: Thu, 9 Nov 2023 16:59:24 +0300 Message-Id: <20231109135933.1462615-56-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