qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
	Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Subject: Re: [PATCH 1/2] target/s390x: Fix EXECUTE of relative long instructions
Date: Tue, 14 Mar 2023 09:29:35 -0700	[thread overview]
Message-ID: <090ba4b8-5bc0-a8cf-afd9-02028d863ea3@linaro.org> (raw)
In-Reply-To: <20230313233819.122329-2-iii@linux.ibm.com>

On 3/13/23 16:38, Ilya Leoshkevich wrote:
> The code uses the wrong base for relative addressing: it should use the
> target instruction address and not the EXECUTE's address.
> 
> Fix by storing the target instruction address in the new CPUS390XState
> member and loading it from the code generated by in2_ri2().
> 
> Reported-by: Nina Schoetterl-Glausch<nsg@linux.ibm.com>
> Signed-off-by: Ilya Leoshkevich<iii@linux.ibm.com>
> ---
>   target/s390x/cpu.h            |  1 +
>   target/s390x/tcg/mem_helper.c |  1 +
>   target/s390x/tcg/translate.c  | 10 +++++++++-
>   3 files changed, 11 insertions(+), 1 deletion(-)

Good solution, reading the value from env.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


  parent reply	other threads:[~2023-03-14 16:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13 23:38 [PATCH 0/2] Fix EXECUTE of relative long instructions Ilya Leoshkevich
2023-03-13 23:38 ` [PATCH 1/2] target/s390x: " Ilya Leoshkevich
2023-03-14  9:10   ` David Hildenbrand
2023-03-14 16:29   ` Richard Henderson [this message]
2023-03-13 23:38 ` [PATCH 2/2] tests/tcg/s390x: Add ex-relative-long.c Ilya Leoshkevich
2023-03-14 17:05   ` 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=090ba4b8-5bc0-a8cf-afd9-02028d863ea3@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=david@redhat.com \
    --cc=iii@linux.ibm.com \
    --cc=nsg@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.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).