From patchwork Thu Sep 14 08:58:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 722538 Delivered-To: patch@linaro.org Received: by 2002:adf:f0d1:0:b0:31d:da82:a3b4 with SMTP id x17csp275700wro; Thu, 14 Sep 2023 01:59:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHi08DWCv2i9Zjy/YrEdB42F4uD1hyWSUjGeplnTfgY78BqxAke5yBWNt4U64oHIviIMHTa X-Received: by 2002:a05:620a:2846:b0:76d:ba72:689d with SMTP id h6-20020a05620a284600b0076dba72689dmr4985680qkp.30.1694681972358; Thu, 14 Sep 2023 01:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694681972; cv=none; d=google.com; s=arc-20160816; b=Cd4QALXKtBc3zeZQt+qjglTyYpqBpte71Rx68PeSCebF+35b6vZwbZSsOMhMGODVlE EFENGZJXsyBkPBPl7ehIgmVNIAOueMxSeB3xsSnJt1GSS6k77AA/KIBaFnJVD/cP21IW hYr+CF4NlaBdpxFdVQVo/YPsD8AZluVLTsv2ir74ZFSoLuvOhF721VwuwuUQtskiQcFI hwWRT/rSx9B8YaGZwDr3ftrNU8RWKCaJmwBEcWJ/bEHuGCPOkzLqic8jWyjOkHcDTIRK LI4FSenYG4q6yRsweINvgcC7IHFh+PgFEzXl2ztXfWh0qZyoJ2iwTVayFP0zT5cYFZYU OSfA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=ZY6bj8pOEE53hD8eYsi1398NGKLgp3tvJXGrO7CzlGk=; fh=A+wPI1gQvE21AlTKvTwIibT4r/dBmUQVn6+OFwvia8k=; b=FkUlQrDfi+ipz6u4bfSF+seVzvgl/fxideusCToc9FblheChJJulLoSS/Or2WgvY8Y 0KF7pa1KIwiI525iX6/dA9vk95NPwjZov3CeAmSzu67hB65qxPEEEHZNq1+1azu+iNtq GT/bI8Rl8o7gBB+BVeYlp0ntaYHbf+Ywg2fUkaTd2BTA9yHo/IxzCilFwr2Zij4LsOnN TtDGIxeIAeKCVzOxxa2PnFShZMKleJZr5dhTDqLhsoLj/brb/0ev7+v6FJr8AhiJIbAl Ks5Je/fb+CIAYUQtNL/xxkc7YFOozFZXeqDIL6uDTBnzU/6gRIco+/r5LaYxM7q1mvQ4 h3mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QZtRePtU; 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 ay17-20020a05620a179100b0076f22c7b92dsi621605qkb.695.2023.09.14.01.59.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Sep 2023 01:59:32 -0700 (PDT) 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=QZtRePtU; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgiB9-0000aq-Us; Thu, 14 Sep 2023 04:58:27 -0400 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 1qgiB7-0000a9-Sy for qemu-devel@nongnu.org; Thu, 14 Sep 2023 04:58:25 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgiAx-0000QN-1r for qemu-devel@nongnu.org; Thu, 14 Sep 2023 04:58:25 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-99bdeae1d0aso92289166b.1 for ; Thu, 14 Sep 2023 01:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694681890; x=1695286690; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZY6bj8pOEE53hD8eYsi1398NGKLgp3tvJXGrO7CzlGk=; b=QZtRePtUv+0bfm+30yypjMKBQzzrFSLm+0r2fHn9zIsDGWfbkPdwbxG5mMklpOJYgn Km/P8PK9Cednqk51tkpyrJEZwyIc7Rhj77Ik/IeU0VuuyKDdVW674JiNJnUfbaR7B39c lxbeZcDPnT5apTmigoipwT1EqkwtuifjpKe2dOtXKOWh0bt4o/SprJInZUPGHI93jhY+ EMovIKCwzKCyOOllyIitF64dJws17lGWGkSqo0UgWClDC2A1e2FOPLv+3+71z1cXgVSD dptYgz4r4QE/HqSDG3/EBc19FIytrd6TF0rq04Ux3dT/N+9KRDWaaL1GcMN95MhpWKWJ ReCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694681890; x=1695286690; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZY6bj8pOEE53hD8eYsi1398NGKLgp3tvJXGrO7CzlGk=; b=ovcdJaCQ0+ibaSqvmZ0PcWRTpX47+I8SwY88tjGYBexk1jzO1985wnmitzV38xmsT0 bpUn3Ya8Xg3XGArtxOqQeDZYi+aN1Ylb2CHPzDuYM6cHcZN/2ABGuDzdwGtNfLWevhLU uQ7vyuNcEURwpWjVWGK44HMI/0PQTn1u+xz/0c5JO207p/u//3rTvf0y7t9p295PfIdG dghBccucJHsOfNPhWgjwus7R4ODXnLvKcvecDXTsvr8uwc8V+XPu33F0/vVQGm0j3obG fV9hDjjr+Lv5KyQZ0+EfYITQqc7UkR/dsTkNPiZcAGQyvLjwZbbjEu3KGUt4nlDjnWbh E8dA== X-Gm-Message-State: AOJu0YxeacnpVJ02nMMATbTZ2tFkxAlzwtgucbR1S4CubpcILY/Rb6xw Cji10jB+Xqw4ZAv6NikzgbNkUfSy6AoKFC4Rtv8= X-Received: by 2002:a17:906:8a41:b0:9a5:c49e:7145 with SMTP id gx1-20020a1709068a4100b009a5c49e7145mr3943612ejc.69.1694681889987; Thu, 14 Sep 2023 01:58:09 -0700 (PDT) Received: from m1x-phil.lan (sem44-h01-176-172-56-29.dsl.sta.abo.bbox.fr. [176.172.56.29]) by smtp.gmail.com with ESMTPSA id mj12-20020a170906af8c00b009a1c05bd672sm692518ejb.127.2023.09.14.01.58.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 01:58:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Ni Hui , Jiaxun Yang , qemu-stable@nongnu.org, Sergey Evlashev Subject: [PATCH] target/mips: Fix MSA BZ/BNZ opcodes displacement Date: Thu, 14 Sep 2023 10:58:06 +0200 Message-ID: <20230914085807.12241-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=philmd@linaro.org; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 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 --- target/mips/tcg/msa.decode | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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