mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
cpu: Introduce cpu_set_cpustate_pointers
Consolidate some boilerplate from foo_cpu_initfn. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
677c4d69ac
commit
7506ed902e
22 changed files with 37 additions and 48 deletions
|
@ -142,11 +142,10 @@ static void lm32_cpu_realizefn(DeviceState *dev, Error **errp)
|
|||
|
||||
static void lm32_cpu_initfn(Object *obj)
|
||||
{
|
||||
CPUState *cs = CPU(obj);
|
||||
LM32CPU *cpu = LM32_CPU(obj);
|
||||
CPULM32State *env = &cpu->env;
|
||||
|
||||
cs->env_ptr = env;
|
||||
cpu_set_cpustate_pointers(cpu);
|
||||
|
||||
env->flags = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue