qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/5] tcg: add tcg_enabled() and stop compiling t


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 3/5] tcg: add tcg_enabled() and stop compiling translate.o when TCG is disabled
Date: Sat, 3 Sep 2011 00:51:14 +0100

On 2 September 2011 22:48, Anthony Liguori <address@hidden> wrote:
> diff --git a/translate-all.c b/translate-all.c
> index 041c108..ecb035a 100644
> --- a/translate-all.c
> +++ b/translate-all.c
> @@ -67,7 +67,9 @@ int cpu_gen_code(CPUState *env, TranslationBlock *tb, int 
> *gen_code_size_ptr)
>  #endif
>     tcg_func_start(s);
>
> -    gen_intermediate_code(env, tb);
> +    if (tcg_enabled()) {
> +        gen_intermediate_code(env, tb);
> +    }
>
>     /* generate machine code */
>     gen_code_buf = tb->tc_ptr;
> @@ -123,7 +125,9 @@ int cpu_restore_state(TranslationBlock *tb,
>  #endif
>     tcg_func_start(s);
>
> -    gen_intermediate_code_pc(env, tb);
> +    if (tcg_enabled()) {
> +        gen_intermediate_code_pc(env, tb);
> +    }
>
>     if (use_icount) {
>         /* Reset the cycle counter to the start of the block.  */
> @@ -153,7 +157,9 @@ int cpu_restore_state(TranslationBlock *tb,
>         j--;
>     env->icount_decr.u16.low -= gen_opc_icount[j];
>
> -    restore_state_to_opc(env, tb, j);
> +    if (tcg_enabled()) {
> +        restore_state_to_opc(env, tb, j);
> +    }
>
>  #ifdef CONFIG_PROFILER
>     s->restore_time += profile_getclock() - ti;

These changes make no sense (this whole function is completely
tcg specific so we should either be disabling all of it or none
of it) and anyway seem to be reverted in patch 4 ??

-- PMM



reply via email to

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