From 90449c388711c3defdc76da490926d1eca177b06 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Thu, 19 Apr 2012 18:33:05 +0000 Subject: [PATCH] sparc: fix qtest Initialize TCG only when enabled. Signed-off-by: Blue Swirl --- target-sparc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c index 24f90f1ded..7ac6bdb058 100644 --- a/target-sparc/cpu.c +++ b/target-sparc/cpu.c @@ -119,7 +119,9 @@ CPUSPARCState *cpu_sparc_init(const char *cpu_model) cpu = SPARC_CPU(object_new(TYPE_SPARC_CPU)); env = &cpu->env; - gen_intermediate_code_init(env); + if (tcg_enabled()) { + gen_intermediate_code_init(env); + } if (cpu_sparc_register(env, cpu_model) < 0) { object_delete(OBJECT(cpu));