qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v14 33/34] target/arm: Split out thumb_tr_transl


From: Emilio G. Cota
Subject: Re: [Qemu-devel] [PATCH v14 33/34] target/arm: Split out thumb_tr_translate_insn
Date: Fri, 21 Jul 2017 19:24:56 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

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 <address@hidden>
> ---
>  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 <address@hidden>

                E.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]