On Sun, 20 Jun 2021 at 06:31, Richard Henderson <richard.hender...@linaro.org> wrote: > > Migrate the is_jmp, tb and singlestep_enabled fields > from DisasContext into the base.
The commit message says we're only moving is_jmp, tb and singlestep_enabled, but... > static bool use_goto_tb(DisasContext *dc, uint32_t dest) > { > - if (unlikely(dc->singlestep_enabled)) { > + if (unlikely(dc->base.singlestep_enabled)) { > return false; > } > > #ifndef CONFIG_USER_ONLY > - return (dc->tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK); > + return (dc->base.pc_first & TARGET_PAGE_MASK) == (dest & > TARGET_PAGE_MASK); ...here we change one, but only one, of the uses of a PC related variable too... > @@ -812,11 +810,16 @@ void gen_intermediate_code(CPUState *cs, > TranslationBlock *tb, int max_insns) > int num_insns; > > /* Initialize DC */ > - dc->is_jmp = DISAS_NEXT; > + > + dc->base.tb = tb; > + dc->base.singlestep_enabled = cs->singlestep_enabled; > + dc->base.is_jmp = DISAS_NEXT; > + dc->base.pc_first = tb->pc; > + dc->base.pc_next = tb->pc; ...which AFAICT is the only reason we needed to set pc_first/pc_next here, which lines are then deleted again in the next patch. I guess we get to where we're trying to get to in the end. Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM