提交 60925d26 编写于 作者: A Andreas Färber

target-ppc: Move TCG initialization to PowerPCCPU initfn

Ensures that a QOM-created PowerPCCPU is usable.
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 78ce64f4
...@@ -10349,11 +10349,6 @@ PowerPCCPU *cpu_ppc_init(const char *cpu_model) ...@@ -10349,11 +10349,6 @@ PowerPCCPU *cpu_ppc_init(const char *cpu_model)
cpu = POWERPC_CPU(object_new(object_class_get_name(oc))); cpu = POWERPC_CPU(object_new(object_class_get_name(oc)));
env = &cpu->env; env = &cpu->env;
if (tcg_enabled()) {
ppc_translate_init();
}
env->cpu_model_str = cpu_model; env->cpu_model_str = cpu_model;
object_property_set_bool(OBJECT(cpu), true, "realized", &err); object_property_set_bool(OBJECT(cpu), true, "realized", &err);
...@@ -10571,6 +10566,10 @@ static void ppc_cpu_initfn(Object *obj) ...@@ -10571,6 +10566,10 @@ static void ppc_cpu_initfn(Object *obj)
env->sps = defsps; env->sps = defsps;
} }
#endif /* defined(TARGET_PPC64) */ #endif /* defined(TARGET_PPC64) */
if (tcg_enabled()) {
ppc_translate_init();
}
} }
static void ppc_cpu_class_init(ObjectClass *oc, void *data) static void ppc_cpu_class_init(ObjectClass *oc, void *data)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册