From 868e2824276cbe6ef2e202c05c4eb3a3a19d3ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 20 Jan 2013 00:05:12 +0100 Subject: target-lm32: Move TCG initialization to LM32CPU initfn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Färber --- target-lm32/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'target-lm32/cpu.c') diff --git a/target-lm32/cpu.c b/target-lm32/cpu.c index 6a84f51bf9..5f167340e4 100644 --- a/target-lm32/cpu.c +++ b/target-lm32/cpu.c @@ -58,10 +58,16 @@ static void lm32_cpu_initfn(Object *obj) { LM32CPU *cpu = LM32_CPU(obj); CPULM32State *env = &cpu->env; + static bool tcg_initialized; cpu_exec_init(env); env->flags = 0; + + if (tcg_enabled() && !tcg_initialized) { + tcg_initialized = true; + lm32_translate_init(); + } } static void lm32_cpu_class_init(ObjectClass *oc, void *data) -- cgit v1.2.1