From nobody Tue Nov 26 19:53:44 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1706005550; cv=none; d=zohomail.com; s=zohoarc; b=L2gDZlwxQloPgfKl9/NFI5zg+waUKfDr6G18FjilbTK1bY/efciiQc5C2CYpXOwBC+fgFn7it/tcqYS0SfMmmOaWg6UWqqkcG78hSyvn8ceJU2Uqh5iURNIEUcYaLmJfIv1uEnPAvaC25bxz1YI66xoNGowFO9w9+RdMhKnLZGU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706005550; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lU9aH7ZY0n7uAdgAxQsFLjxICAM1xx6kGJSgqsKuTsU=; b=Gwgy5R7UbGM/DqUxluRuj3mdF5enRN2jlvldJjHOe/2xTGNliUkFlbAf5L9N16lJcVl6tCwLb9TWtqtVJPAWxVH5OfbgI8X/779DzISfTdA4lXTDxryQtE6qkaTrdqIRBSS/bAB9DrKsULhOJ/HiSmd8jWjKmmx0gn/fEf70sbU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17060055505876.945342868881767; Tue, 23 Jan 2024 02:25:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSDxJ-0000Os-Il; Tue, 23 Jan 2024 05:24:33 -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 1rSDxI-0000OW-GA for qemu-devel@nongnu.org; Tue, 23 Jan 2024 05:24:32 -0500 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSDxG-0004dE-S8 for qemu-devel@nongnu.org; Tue, 23 Jan 2024 05:24:32 -0500 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-3bd9030d68fso2540432b6e.3 for ; Tue, 23 Jan 2024 02:24:30 -0800 (PST) Received: from stoup.lan (2001-44b8-2176-c800-b8a0-0408-58be-7d2e.static.ipv6.internode.on.net. [2001:44b8:2176:c800:b8a0:408:58be:7d2e]) by smtp.gmail.com with ESMTPSA id d8-20020a62f808000000b006d9ce7d3258sm11072408pfh.204.2024.01.23.02.24.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 02:24:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706005469; x=1706610269; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lU9aH7ZY0n7uAdgAxQsFLjxICAM1xx6kGJSgqsKuTsU=; b=ClHIIabe9jdBX5l1dancxndVv4tsnIyEYyZYA3k1CGaAIgAW2qn9MogGwmF0fKFXql xVcYPJkG4KdKKexqBRla63+E596FH9yDN0tc64ZBql0YDTbbUk5mTAcoPfwVryk8yWxa xVPfU7at+7+Va2gniicAaALyvKYMp97UORiCaNA+Zt8HKXhNDvoKrI2d4zovDrcs13tZ ticVaZp8e4BacTBqHqGgaOyDXOpBvPO2zrRR7sY2FvGnIT4fgq5OWTqlXDa2s15jNYAv tLiwVY97CioNCZqoxS5tdjeNDI37xi0wBclA5NHBVa8l8oecsMod1Xxb9Fjm/pCxL8sE 46BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706005469; x=1706610269; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lU9aH7ZY0n7uAdgAxQsFLjxICAM1xx6kGJSgqsKuTsU=; b=Yt9re4UhD1vwpSNhbdHYwDxeJft5o/0SYFviJhbrLiTsQroqQa03EpEd2IOF0BEjPE 2EaXwKL6CA5DPBvEQVuG59JCkCpyzH6i52wWhXljmbsrkb0x765T24OocRdvWOi4ETiR 836XxBBy6/H2YMs8JyNqheu/1dh3zQ8QvG1FXt6HKpNaUPohys+6Cnx5Ehh4iE6Buedj HJerSMdnCHz9CugjCbKAURt2HWTN2lY6W2rW/qdGxy00UmJQusELMxBixomMIczYl1jb sGdEkJHVeItHN8/vhfRDSifEwMR1EafCJK+1Crf3+Tv53ctzjs/GxZpE6UxnSv1PHti4 RmhA== X-Gm-Message-State: AOJu0YyDH8abRGImdI6x67hAuv+lFTsEL1ZkiV4I48BYMm7nFCT9U/Jx M0G43EWSVtCgeKxEvZxta0OTGpUazyIhVmgKXWvJEgRI88/jyiYWLk/wQMgSXCwUAqQiPkhqvhk v8Uo= X-Google-Smtp-Source: AGHT+IGMv3XM0B+PZpvA1e6GdbfADmB4Z42FcPOZokGP+I0hzAU7gYDXgieyxcoP53uEosSAv5jiaA== X-Received: by 2002:a05:6808:1b26:b0:3bd:c997:4c55 with SMTP id bx38-20020a0568081b2600b003bdc9974c55mr198701oib.11.1706005469621; Tue, 23 Jan 2024 02:24:29 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Michael Tokarev , Thomas Huth Subject: [PULL v2 4/8] tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns Date: Tue, 23 Jan 2024 20:24:08 +1000 Message-Id: <20240123102412.4569-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123102412.4569-1-richard.henderson@linaro.org> References: <20240123102412.4569-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::230; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x230.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, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1706005552140100007 Content-Type: text/plain; charset="utf-8" While the format names the second vector register 'v3', it is still in the second position (bits 12-15) and the argument to RXB must match. Example error: - e7 00 00 10 2a 33 verllf %v16,%v0,16 + e7 00 00 10 2c 33 verllf %v16,%v16,16 Cc: qemu-stable@nongnu.org Reported-by: Michael Tokarev Fixes: 22cb37b4172 ("tcg/s390x: Implement vector shift operations") Fixes: 79cada8693d ("tcg/s390x: Implement tcg_out_dup*_vec") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2054 Reviewed-by: Thomas Huth Tested-by: Michael Tokarev Message-Id: <20240117213646.159697-2-richard.henderson@linaro.org> Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index fbee43d3b0..7f6b84aa2c 100644 --- a/tcg/s390x/tcg-target.c.inc +++ b/tcg/s390x/tcg-target.c.inc @@ -683,7 +683,7 @@ static void tcg_out_insn_VRIc(TCGContext *s, S390Opcode= op, tcg_debug_assert(is_vector_reg(v3)); tcg_out16(s, (op & 0xff00) | ((v1 & 0xf) << 4) | (v3 & 0xf)); tcg_out16(s, i2); - tcg_out16(s, (op & 0x00ff) | RXB(v1, 0, v3, 0) | (m4 << 12)); + tcg_out16(s, (op & 0x00ff) | RXB(v1, v3, 0, 0) | (m4 << 12)); } =20 static void tcg_out_insn_VRRa(TCGContext *s, S390Opcode op, @@ -738,7 +738,7 @@ static void tcg_out_insn_VRSa(TCGContext *s, S390Opcode= op, TCGReg v1, tcg_debug_assert(is_vector_reg(v3)); tcg_out16(s, (op & 0xff00) | ((v1 & 0xf) << 4) | (v3 & 0xf)); tcg_out16(s, b2 << 12 | d2); - tcg_out16(s, (op & 0x00ff) | RXB(v1, 0, v3, 0) | (m4 << 12)); + tcg_out16(s, (op & 0x00ff) | RXB(v1, v3, 0, 0) | (m4 << 12)); } =20 static void tcg_out_insn_VRSb(TCGContext *s, S390Opcode op, TCGReg v1, @@ -762,7 +762,7 @@ static void tcg_out_insn_VRSc(TCGContext *s, S390Opcode= op, TCGReg r1, tcg_debug_assert(is_vector_reg(v3)); tcg_out16(s, (op & 0xff00) | (r1 << 4) | (v3 & 0xf)); tcg_out16(s, b2 << 12 | d2); - tcg_out16(s, (op & 0x00ff) | RXB(0, 0, v3, 0) | (m4 << 12)); + tcg_out16(s, (op & 0x00ff) | RXB(0, v3, 0, 0) | (m4 << 12)); } =20 static void tcg_out_insn_VRX(TCGContext *s, S390Opcode op, TCGReg v1, --=20 2.34.1