sparc: fix qtest

Initialize TCG only when enabled.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2012-04-19 18:33:05 +00:00
parent e776bffb53
commit 90449c3887

View File

@ -119,7 +119,9 @@ CPUSPARCState *cpu_sparc_init(const char *cpu_model)
cpu = SPARC_CPU(object_new(TYPE_SPARC_CPU)); cpu = SPARC_CPU(object_new(TYPE_SPARC_CPU));
env = &cpu->env; env = &cpu->env;
if (tcg_enabled()) {
gen_intermediate_code_init(env); gen_intermediate_code_init(env);
}
if (cpu_sparc_register(env, cpu_model) < 0) { if (cpu_sparc_register(env, cpu_model) < 0) {
object_delete(OBJECT(cpu)); object_delete(OBJECT(cpu));