target-lm32: init tcg only if available
authorMichael Walle <michael@walle.cc>
Sat, 31 Mar 2012 17:54:05 +0000 (19:54 +0200)
committerMichael Walle <michael@walle.cc>
Sat, 31 Mar 2012 17:56:03 +0000 (19:56 +0200)
Once qtest support for target-lm32 arrives, tcg may be disabled.

Signed-off-by: Michael Walle <michael@walle.cc>
target-lm32/helper.c

index 5db8f8d60fd7998067fd3cd846b4dbbd224e7f77..78076e4603e464f1f22c9c75adc6a02282c6d924 100644 (file)
@@ -215,7 +215,7 @@ CPULM32State *cpu_lm32_init(const char *cpu_model)
     cpu_state_reset(env);
     qemu_init_vcpu(env);
 
-    if (!tcg_initialized) {
+    if (tcg_enabled() && !tcg_initialized) {
         tcg_initialized = 1;
         lm32_translate_init();
     }