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