diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-20 00:05:12 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-02-16 14:50:58 +0100 |
commit | 868e2824276cbe6ef2e202c05c4eb3a3a19d3ee0 (patch) | |
tree | c256393c53f48f1438a8d49e0219cae6a4594555 /target-lm32/cpu.c | |
parent | d1a94fec3d8d70009fd5ac27ade5539fe58cd702 (diff) | |
download | qemu-868e2824276cbe6ef2e202c05c4eb3a3a19d3ee0.zip qemu-868e2824276cbe6ef2e202c05c4eb3a3a19d3ee0.tar.gz qemu-868e2824276cbe6ef2e202c05c4eb3a3a19d3ee0.tar.bz2 |
target-lm32: Move TCG initialization to LM32CPU initfn
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-lm32/cpu.c')
-rw-r--r-- | target-lm32/cpu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target-lm32/cpu.c b/target-lm32/cpu.c index 6a84f51..5f16734 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) |