aboutsummaryrefslogtreecommitdiff
path: root/target-m68k/cpu.c
diff options
context:
space:
mode:
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 = {