Skip TCG init for qtest.

Signed-off-by: Blue Swirl <blauwir...@gmail.com>
---
 target-sparc/cpu.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c
index 24f90f1..6720837 100644
--- a/target-sparc/cpu.c
+++ b/target-sparc/cpu.c
@@ -17,6 +17,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */

+#include "qtest.h"
 #include "cpu.h"

 //#define DEBUG_FEATURES
@@ -119,7 +120,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 (!qtest_enabled()) {
+        gen_intermediate_code_init(env);
+    }

     if (cpu_sparc_register(env, cpu_model) < 0) {
         object_delete(OBJECT(cpu));
-- 
1.7.10
From 1e4369c89c599a73d688535a7b2350e9512cd073 Mon Sep 17 00:00:00 2001
Message-Id: <1e4369c89c599a73d688535a7b2350e9512cd073.1334866660.git.blauwir...@gmail.com>
In-Reply-To: <85215d419b17aeedbfe93ff8d739b27937f72739.1334866660.git.blauwir...@gmail.com>
References: <85215d419b17aeedbfe93ff8d739b27937f72739.1334866660.git.blauwir...@gmail.com>
From: Blue Swirl <blauwir...@gmail.com>
Date: Thu, 19 Apr 2012 18:33:05 +0000
Subject: [PATCH 3/4] sparc: fix qtest

Skip TCG init for qtest.

Signed-off-by: Blue Swirl <blauwir...@gmail.com>
---
 target-sparc/cpu.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c
index 24f90f1..6720837 100644
--- a/target-sparc/cpu.c
+++ b/target-sparc/cpu.c
@@ -17,6 +17,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "qtest.h"
 #include "cpu.h"
 
 //#define DEBUG_FEATURES
@@ -119,7 +120,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 (!qtest_enabled()) {
+        gen_intermediate_code_init(env);
+    }
 
     if (cpu_sparc_register(env, cpu_model) < 0) {
         object_delete(OBJECT(cpu));
-- 
1.7.2.5

Reply via email to