aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/cpu.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2012-04-19 18:33:05 +0000
committerBlue Swirl <blauwirbel@gmail.com>2012-04-19 18:52:48 +0000
commit90449c388711c3defdc76da490926d1eca177b06 (patch)
treed97a023a744e2b94a743b054090f370960226be8 /target-sparc/cpu.c
parente776bffb53973619e93e805fa441bd5f3d999e27 (diff)
sparc: fix qtest
Initialize TCG only when enabled. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc/cpu.c')
-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));