qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Thomas Huth <thuth@redhat.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
	Ido Plat <Ido.Plat@ibm.com>,
	qemu-stable@nongnu.org
Subject: Re: [PATCH 1/2] target/s390x: Fix LAE setting a wrong access register
Date: Wed, 10 Jan 2024 10:11:47 +0100	[thread overview]
Message-ID: <d73cd114-50d4-4b53-8e15-08bc18c80a0b@redhat.com> (raw)
In-Reply-To: <20240109232319.600102-2-iii@linux.ibm.com>

On 10.01.24 00:22, Ilya Leoshkevich wrote:
> LAE should set the access register corresponding to the first operand,
> instead, it always modifies access register 1.
> 
> Co-developed-by: Ido Plat <Ido.Plat@ibm.com>
> Cc: qemu-stable@nongnu.org
> Fixes: a1c7610a6879 ("target-s390x: implement LAY and LAEY instructions")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>   target/s390x/tcg/translate.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
> index 62ab2be8b12..8df00b7df9f 100644
> --- a/target/s390x/tcg/translate.c
> +++ b/target/s390x/tcg/translate.c
> @@ -3221,6 +3221,7 @@ static DisasJumpType op_mov2e(DisasContext *s, DisasOps *o)
>   {
>       int b2 = get_field(s, b2);
>       TCGv ar1 = tcg_temp_new_i64();
> +    int r1 = get_field(s, r1);
>   
>       o->out = o->in2;
>       o->in2 = NULL;
> @@ -3244,7 +3245,7 @@ static DisasJumpType op_mov2e(DisasContext *s, DisasOps *o)
>           break;
>       }
>   
> -    tcg_gen_st32_i64(ar1, tcg_env, offsetof(CPUS390XState, aregs[1]));
> +    tcg_gen_st32_i64(ar1, tcg_env, offsetof(CPUS390XState, aregs[r1]));
>       return DISAS_NEXT;
>   }
>   

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb



  reply	other threads:[~2024-01-10  9:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 23:22 [PATCH 0/2] target/s390x: Fix LAE setting a wrong access register Ilya Leoshkevich
2024-01-09 23:22 ` [PATCH 1/2] " Ilya Leoshkevich
2024-01-10  9:11   ` David Hildenbrand [this message]
2024-01-09 23:22 ` [PATCH 2/2] tests/tcg/s390x: Test LOAD ADDRESS EXTENDED Ilya Leoshkevich
2024-01-10 16:50   ` Thomas Huth
2024-01-11  8:37   ` Thomas Huth
2024-01-11  9:04     ` Ilya Leoshkevich

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=d73cd114-50d4-4b53-8e15-08bc18c80a0b@redhat.com \
    --to=david@redhat.com \
    --cc=Ido.Plat@ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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).