On Fri, Jul 14, 2017 at 23:42:42 -1000, Richard Henderson wrote: > We need not check for ARM vs Thumb state in order to dispatch > disassembly of every instruction. > > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > target/arm/translate.c | 134 > +++++++++++++++++++++++++++++++------------------ > 1 file changed, 86 insertions(+), 48 deletions(-) > > diff --git a/target/arm/translate.c b/target/arm/translate.c > index ebe1c1a..d7c3c10 100644 > --- a/target/arm/translate.c > +++ b/target/arm/translate.c > @@ -11944,20 +11944,17 @@ static bool > arm_tr_breakpoint_check(DisasContextBase *dcbase, CPUState *cpu, > return true; > } > > -static void arm_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu) > +static bool arm_pre_translate_insn(DisasContext *dc) > { > - DisasContext *dc = container_of(dcbase, DisasContext, base); > - CPUARMState *env = cpu->env_ptr; > - > #ifdef CONFIG_USER_ONLY > - /* Intercept jump to the magic kernel page. */ > - if (dc->pc >= 0xffff0000) { > - /* We always get here via a jump, so know we are not in a > - conditional execution block. */ > - gen_exception_internal(EXCP_KERNEL_TRAP); > - dc->base.is_jmp = DISAS_NORETURN; > - return; > - } > + /* Intercept jump to the magic kernel page. */ > + if (dc->pc >= 0xffff0000) { > + /* We always get here via a jump, so know we are not in a > + conditional execution block. */ > + gen_exception_internal(EXCP_KERNEL_TRAP); > + dc->base.is_jmp = DISAS_NORETURN; > + return true; > + }
See my comment in patch 24 about this. Other than that, this is neat. Reviewed-by: Emilio G. Cota <c...@braap.org> E.