On Sun, 16 Oct 2022 at 23:23, Richard Henderson <richard.hender...@linaro.org> wrote: > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
> static void gen_goto_tb(DisasContext *s, int n, int64_t diff) > { > - uint64_t dest = s->pc_curr + diff; > - > - if (use_goto_tb(s, dest)) { > - tcg_gen_goto_tb(n); > - gen_a64_update_pc(s, diff); > + if (use_goto_tb(s, s->pc_curr + diff)) { > + if (TARGET_TB_PCREL) { > + gen_a64_update_pc(s, diff); > + tcg_gen_goto_tb(n); > + } else { > + tcg_gen_goto_tb(n); > + gen_a64_update_pc(s, diff); > + } Why do we need to do these things in the opposite order depending on TARGET_TB_PCREL ? If there's an obscure dependency then it would be worth commenting it, but it would be nicer if the semantics of the functions were such that they didn't need to be called the opposite way round for the two cases... > tcg_gen_exit_tb(s->base.tb, n); > s->base.is_jmp = DISAS_NORETURN; > } else { thanks -- PMM