aboutsummaryrefslogtreecommitdiff
path: root/target-ppc
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-20 01:26:37 +0100
committerAndreas Färber <afaerber@suse.de>2013-02-16 14:50:58 +0100
commit60925d2644953ce1ca7813411853d8c04e637050 (patch)
treec81e8cfff315d96f75b260d5de1e435ddca7060b /target-ppc
parent78ce64f492498050083e46cdd7e6cbae6435843c (diff)
downloadqemu-60925d2644953ce1ca7813411853d8c04e637050.zip
qemu-60925d2644953ce1ca7813411853d8c04e637050.tar.gz
qemu-60925d2644953ce1ca7813411853d8c04e637050.tar.bz2
target-ppc: Move TCG initialization to PowerPCCPU initfn
Ensures that a QOM-created PowerPCCPU is usable. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-ppc')
-rw-r--r--target-ppc/translate_init.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 49eaeac..5a2acaa 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -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);
@@ -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)