target/sparc: Fix RETURN
Perform window restore before pc update. Required in order
to recognize any window underflow trap with the current pc.
Fixes: 86b82fe021
("target/sparc: Move JMPL, RETT, RETURN to decodetree")
Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
e2faabee78
commit
0dfae4f948
@ -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);
|
||||
dc->npc = DYNAMIC_PC_LOOKUP;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user