Skip to content

Commit

Permalink
target-ppc: Move TCG initialization to PowerPCCPU initfn
Browse files Browse the repository at this point in the history
Ensures that a QOM-created PowerPCCPU is usable.

Signed-off-by: Andreas Färber <afaerber@suse.de>
  • Loading branch information
afaerber committed Jan 27, 2013
1 parent c43dc33 commit fb89cfd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions target-ppc/translate_init.c
Expand Up @@ -10349,11 +10349,6 @@ PowerPCCPU *cpu_ppc_init(const char *cpu_model)

cpu = POWERPC_CPU(object_new(object_class_get_name(oc)));
env = &cpu->env;

if (tcg_enabled()) {
ppc_translate_init();
}

env->cpu_model_str = cpu_model;

object_property_set_bool(OBJECT(cpu), true, "realized", &err);
Expand Down Expand Up @@ -10571,6 +10566,10 @@ static void ppc_cpu_initfn(Object *obj)
env->sps = defsps;
}
#endif /* defined(TARGET_PPC64) */

if (tcg_enabled()) {
ppc_translate_init();
}
}

static void ppc_cpu_class_init(ObjectClass *oc, void *data)
Expand Down

0 comments on commit fb89cfd

Please sign in to comment.