From 5266d20a12f2ef01841aad5f1692d73551a39dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 20 Jan 2013 01:34:18 +0100 Subject: target-sparc: Move TCG initialization to SPARCCPU initfn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Färber --- target-sparc/cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'target-sparc') 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) -- cgit v1.2.1