Patchwork [RFC,qom-cpu,v2,26/28] target-sparc: Move TCG initialization to SPARCCPU initfn

login
register
mail settings
Submitter Andreas Färber
Date Jan. 20, 2013, 7:22 a.m.
Message ID <1358666571-1737-27-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/213942/
State New
Headers show

Comments

Andreas Färber - Jan. 20, 2013, 7:22 a.m.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 target-sparc/cpu.c |    8 ++++----
 1 Datei geändert, 4 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-)

Patch

diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c
index a92822d..10dc709 100644
--- a/target-sparc/cpu.c
+++ b/target-sparc/cpu.c
@@ -114,10 +114,6 @@  SPARCCPU *cpu_sparc_init(const char *cpu_model)
     cpu = SPARC_CPU(object_new(TYPE_SPARC_CPU));
     env = &cpu->env;
 
-    if (tcg_enabled()) {
-        gen_intermediate_code_init(env);
-    }
-
     if (cpu_sparc_register(env, cpu_model) < 0) {
         object_delete(OBJECT(cpu));
         return NULL;
@@ -868,6 +864,10 @@  static void sparc_cpu_initfn(Object *obj)
     CPUSPARCState *env = &cpu->env;
 
     cpu_exec_init(env);
+
+    if (tcg_enabled()) {
+        gen_intermediate_code_init(env);
+    }
 }
 
 static void sparc_cpu_uninitfn(Object *obj)