aboutsummaryrefslogtreecommitdiff
path: root/target-m68k/cpu.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-20 00:48:29 +0100
committerAndreas Färber <afaerber@suse.de>2013-02-16 14:50:58 +0100
commit1cc896195bae54d7a5f48f9032037d8f6f65abd5 (patch)
tree4479002a27f7b5f58b49584127d77bf232c88358 /target-m68k/cpu.c
parent868e2824276cbe6ef2e202c05c4eb3a3a19d3ee0 (diff)
target-m68k: Move TCG initialization to M68kCPU initfn
Add a tcg_enabled() check to suppress it for qtest. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-m68k/cpu.c')
-rw-r--r--target-m68k/cpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target-m68k/cpu.c b/target-m68k/cpu.c
index e3eaffc9ed..42735dbe40 100644
--- a/target-m68k/cpu.c
+++ b/target-m68k/cpu.c
@@ -156,8 +156,14 @@ static void m68k_cpu_initfn(Object *obj)
{
M68kCPU *cpu = M68K_CPU(obj);
CPUM68KState *env = &cpu->env;
+ static bool inited;
cpu_exec_init(env);
+
+ if (tcg_enabled() && !inited) {
+ inited = true;
+ m68k_tcg_init();
+ }
}
static const VMStateDescription vmstate_m68k_cpu = {