mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -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
|
@ -194,11 +194,10 @@ static void superh_cpu_realizefn(DeviceState *dev, Error **errp)
|
|||
|
||||
static void superh_cpu_initfn(Object *obj)
|
||||
{
|
||||
CPUState *cs = CPU(obj);
|
||||
SuperHCPU *cpu = SUPERH_CPU(obj);
|
||||
CPUSH4State *env = &cpu->env;
|
||||
|
||||
cs->env_ptr = env;
|
||||
cpu_set_cpustate_pointers(cpu);
|
||||
|
||||
env->movcal_backup_tail = &(env->movcal_backup);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue