aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-sparc/cpu.c')
-rw-r--r--target-sparc/cpu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c
index 1690cf5b15..759be532a3 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_unref(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)