|
From: | Richard Henderson |
Subject: | Re: [PATCH v2 08/15] target/m68k: Fix address argument for EXCP_TRACE |
Date: | Fri, 3 Dec 2021 06:21:52 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
On 12/2/21 12:48 PM, Richard Henderson wrote:
+static void gen_raise_exception_format2(DisasContext *s, int nr) +{ + /* + * Pass the address of the insn to the exception handler, + * for recording in the Format $2 (6-word) stack frame. + * Re-use mmu.ar for the purpose, since that's only valid + * after tlb_fill. + */ + tcg_gen_st_i32(tcg_constant_i32(s->base.pc_next), cpu_env, + offsetof(CPUM68KState, mmu.ar)); + gen_raise_exception(nr); + s->base.is_jmp = DISAS_NORETURN; +}
Hmph, I think this only really works from within m68k_tr_translate_insn. But most of the uses are from within m68k_rt_tb_stop, where we have already advanced pc_next to the next instruction.
I'm not sure how to test this... r~
[Prev in Thread] | Current Thread | [Next in Thread] |