From: Thomas Huth <thuth@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, david@redhat.com, philmd@linaro.org,
mjt@tls.msk.ru, qemu-stable@nongnu.org
Subject: Re: [PATCH 1/2] tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns
Date: Thu, 18 Jan 2024 07:50:00 +0100 [thread overview]
Message-ID: <463db12c-cb2c-495c-8dc8-5b0d2085c4bc@redhat.com> (raw)
In-Reply-To: <20240117213646.159697-2-richard.henderson@linaro.org>
On 17/01/2024 22.36, Richard Henderson wrote:
> 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 <mjt@tls.msk.ru>
> Fixes: 22cb37b4172 ("tcg/s390x: Implement vector shift operations")
> Fixes: 79cada8693d ("tcg/s390x: Implement tcg_out_dup*_vec")
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> 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,
I double-checked the Principles of Operation that VRI-c, VRS-a and VRS-c are
the only encodings where this could happen, and yes, your modification looks
right to me:
Reviewed-by: Thomas Huth <thuth@redhat.com>
Do you want to take it through our TCG branch or shall I pick it up for my
s390x branch?
next prev parent reply other threads:[~2024-01-18 6:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 21:36 [PATCH 0/2] tcg/s390x: Fix chacha20-s390 Richard Henderson
2024-01-17 21:36 ` [PATCH 1/2] tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns Richard Henderson
2024-01-18 6:50 ` Thomas Huth [this message]
2024-01-18 7:04 ` Richard Henderson
2024-01-19 21:54 ` Philippe Mathieu-Daudé
2024-01-17 21:36 ` [PATCH 2/2] tests/tcg/s390x: Import linux tools/testing/crypto/chacha20-s390 Richard Henderson
2024-01-17 22:45 ` Richard Henderson
2024-01-18 7:17 ` Thomas Huth
2024-01-18 6:07 ` [PATCH 0/2] tcg/s390x: Fix chacha20-s390 Michael Tokarev
2024-01-18 7:03 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=463db12c-cb2c-495c-8dc8-5b0d2085c4bc@redhat.com \
--to=thuth@redhat.com \
--cc=david@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).