aboutsummaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/cpu.c4
1 files changed, 3 insertions, 1 deletions
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));