From patchwork Tue Jan 23 10:24:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 765194 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:10c4:b0:337:62d3:c6d5 with SMTP id b4csp1528769wrx; Tue, 23 Jan 2024 02:25:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IGc0FUAM/eZ0kAF3xSXT5K/KrwfaF0YB+6VdSU8P1VXwmDaMTdYYzaZH5vtMcsEJmEXbRIl X-Received: by 2002:ad4:5f4a:0:b0:680:fee5:9b47 with SMTP id p10-20020ad45f4a000000b00680fee59b47mr580440qvg.76.1706005550265; Tue, 23 Jan 2024 02:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706005550; cv=none; d=google.com; s=arc-20160816; b=KFapwxxfodihuXseCtzyf/KIzb/xbGBVb6fjSWeMGLuIv6syzhS5uiSTMYmKGjHzYr /Zh997fvzR7XLLfsDQChr+1SS44Drimr8SSgQiLE3WcpMW5HBZvtqTaD3RnF2oZB6hmv 8O5vut/Op+1oV4kJXM63PJH0gE6oxiKMlaHhObXp/dNYXhUABAvpY+rjGNGr3sCT81fN G26AAsZ0LSjL7992uQcN9hg/cc/MBMbGySC5P5a8AAelTHK8L2G7Zz4RpkYD0eBGYRUP 0XMkXlT68jbUC8YvqnPSlSVhxwmb1ydFnyqB3NVQJImd+IqonISbjeHk+2V2y0dokE5k AE3Q== 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:dkim-signature; bh=lU9aH7ZY0n7uAdgAxQsFLjxICAM1xx6kGJSgqsKuTsU=; fh=HbLj/5yooXb+Hoe1WPA3vZVKPDdpNdYNbhwpVZI8wJI=; b=Z/ViThJ2saA1Dv/kfgzeKfKkbCBnYNHJPIGTzgBaYfIwuNwZIlVioCmmMtW6oc0roE jU4h6y9jURtn8rARxVYNg6F0miOi199dcfb7GmOngsaHgQye3zCZ8wxCclMdCuZa+NPz 64jWvEwfZntZLwyFnjKAHnQoMRxLrmGb22SPH5QG2XtLgSflTqwHmFbRU//oQXffFZid PZnQAgNxgdIuH5PY65RVrjh1mnmBqvCcV+1BUaXtSbagm29K9J8v2KqWckCrPjbQCsMq qUYaw6FodWzJcSPC+EaOAFhez9f10qjB88ya6mm/xpXuBBYWsRX9Ta0cJIFInn4ulhAc w+3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ClHIIabe; 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 k15-20020a0cf28f000000b0067f662df032si7710682qvl.271.2024.01.23.02.25.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jan 2024 02:25:50 -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=ClHIIabe; 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 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) 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-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) 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) 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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)); } 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)); } 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)); } static void tcg_out_insn_VRX(TCGContext *s, S390Opcode op, TCGReg v1,