Re: [Qemu-devel] [PATCH v2] cpu: Drop unnecessary dynamic casts in *_env_get_cpu()

2013-06-29 Thread Andreas Färber
Am 28.06.2013 19:32, schrieb Richard Henderson: > On 06/28/2013 06:23 AM, Andreas Färber wrote: >> A transition from CPUFooState to FooCPU can be considered safe, >> just like FooCPU::env access in the opposite direction. >> The only benefit of the FOO_CPU() casts would be protection against >> bog

Re: [Qemu-devel] [PATCH v2] cpu: Drop unnecessary dynamic casts in *_env_get_cpu()

2013-06-28 Thread Richard Henderson
On 06/28/2013 06:23 AM, Andreas Färber wrote: > A transition from CPUFooState to FooCPU can be considered safe, > just like FooCPU::env access in the opposite direction. > The only benefit of the FOO_CPU() casts would be protection against > bogus CPUFooState pointers, but then surrounding code wou

[Qemu-devel] [PATCH v2] cpu: Drop unnecessary dynamic casts in *_env_get_cpu()

2013-06-28 Thread Andreas Färber
A transition from CPUFooState to FooCPU can be considered safe, just like FooCPU::env access in the opposite direction. The only benefit of the FOO_CPU() casts would be protection against bogus CPUFooState pointers, but then surrounding code would likely break, too. This should slightly improve in