qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Subject: Re: [PATCH for-8.2] target/sparc: Fix RETURN
Date: Wed, 8 Nov 2023 22:18:09 +0100	[thread overview]
Message-ID: <e8c242c8-471d-4375-86f1-60c23c64369c@linaro.org> (raw)
In-Reply-To: <20231108204739.279972-1-richard.henderson@linaro.org>

On 8/11/23 21:47, Richard Henderson wrote:
> Perform window restore before pc update. Required in order
> to recognize any window underflow trap with the current pc.
> 
> Fixes: 86b82fe021f4 ("target/sparc: Move JMPL, RETT, RETURN to decodetree")
> Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/sparc/translate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/sparc/translate.c b/target/sparc/translate.c
> index 6fc333a6b8..9387299559 100644
> --- a/target/sparc/translate.c
> +++ b/target/sparc/translate.c
> @@ -4096,12 +4096,12 @@ TRANS(RETT, 32, do_add_special, a, do_rett)
>   static bool do_return(DisasContext *dc, int rd, TCGv src)
>   {
>       gen_check_align(dc, src, 3);
> +    gen_helper_restore(tcg_env);
>   
>       gen_mov_pc_npc(dc);
>       tcg_gen_mov_tl(cpu_npc, src);
>       gen_address_mask(dc, cpu_npc);
>   
> -    gen_helper_restore(tcg_env);

Ahah! I noticed that earlier in a late review, wondered why you moved
that gen_helper_restore() call after updating $nPC, but my SPARC is now
rusty so I was sure I was missing something. Too shy to ask :/

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>       dc->npc = DYNAMIC_PC_LOOKUP;
>       return true;
>   }



  reply	other threads:[~2023-11-08 21:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08 20:47 [PATCH for-8.2] target/sparc: Fix RETURN Richard Henderson
2023-11-08 21:18 ` Philippe Mathieu-Daudé [this message]
2023-11-09 18:49 ` Mark Cave-Ayland

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=e8c242c8-471d-4375-86f1-60c23c64369c@linaro.org \
    --to=philmd@linaro.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@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).