qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v2 02/34] cpu-exec: Purge all uses of CPU_GET_ENV


From: Richard Henderson
Subject: Re: [Qemu-devel] [RFC v2 02/34] cpu-exec: Purge all uses of CPU_GET_ENV
Date: Mon, 01 Jun 2015 12:03:31 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 05/30/2015 11:11 PM, Peter Crosthwaite wrote:
> Remove un-needed usages of CPU_GET_ENV by converting the APIs to use
> CPUState pointers and retrieving the env_ptr as minimally needed.
> 
> FIXME: apply target-foo change pattern to all archs.

Yes, please.

>  #ifdef TARGET_I386
>      X86CPU *x86_cpu = X86_CPU(cpu);
> +    CPUArchState *env = (CPUArchState *)cpu->env_ptr;
>  #endif

  CPUArchState *env = &x86_cpu.env;

>  #ifdef TARGET_I386
> +            env = cpu->env_ptr;
>              x86_cpu = X86_CPU(cpu);
>  #endif

Likewise.

Or, indeed, it might be worth propagating away "env" entirely, so you don't
have to reload it here at the end of the setjmp.

Otherwise this starter patch looks good.


r~




reply via email to

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