> -----Original Message----- > From: Richard Henderson <richard.hender...@linaro.org> > Sent: Saturday, March 13, 2021 7:44 PM > To: Taylor Simpson <tsimp...@quicinc.com>; qemu-devel@nongnu.org > Cc: phi...@redhat.com; alex.ben...@linaro.org; laur...@vivier.eu; > a...@rev.ng; Brian Cain <bc...@quicinc.com> > Subject: Re: [PATCH v8 29/35] Hexagon (target/hexagon) translation > > >> -----Original Message----- > >> From: Richard Henderson <richard.hender...@linaro.org> > >> Sent: Sunday, February 14, 2021 7:04 PM > >> To: Taylor Simpson <tsimp...@quicinc.com>; qemu-devel@nongnu.org > >> Cc: phi...@redhat.com; alex.ben...@linaro.org; laur...@vivier.eu; > >> a...@rev.ng; Brian Cain <bc...@quicinc.com> > >> Subject: Re: [PATCH v8 29/35] Hexagon (target/hexagon) translation > >> > >> On 2/7/21 9:46 PM, Taylor Simpson wrote: > >>> + case DISAS_NORETURN: > >>> + gen_exec_counters(ctx); > >>> + tcg_gen_mov_tl(hex_gpr[HEX_REG_PC], hex_next_PC); > >>> + if (ctx->base.singlestep_enabled) { > >>> + gen_exception_debug(); > >>> + } else { > >>> + tcg_gen_exit_tb(NULL, 0); > >>> + } > >> > >> DISAS_NORETURN says that we have *already* exited the TB. None of the > >> code you emit here will be reachable. > > > > Isn't this called before the TB ends? > > Yes, but DISAS_NORETURN still means we've already exited. > > Just like calling abort() in C means that we won't reach any following return > statement.
Then I'm missing something because the code emitted here does get executed. I thought the tb_stop function is a place for the target to add code. Should I push this up to all the places where we set ctx->base.is_jmp to DISAS_NORETURN? Taylor