diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-19 07:37:45 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-02-16 14:50:58 +0100 |
commit | 79614b781df5096ffecf531992314781dbab54af (patch) | |
tree | 7c781ec40afe10ba31eed252d420c35d0d6c9266 /target-arm/cpu.c | |
parent | 5f6c964389ea5320e81e2fb8c2bc3aa40c5a8013 (diff) |
target-arm: Move TCG initialization to ARMCPU initfn
Ensures that a QOM-created ARMCPU is usable.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-arm/cpu.c')
-rw-r--r-- | target-arm/cpu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 9915172a1d..f54d20057d 100644 --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -135,10 +135,16 @@ static inline void set_feature(CPUARMState *env, int feature) static void arm_cpu_initfn(Object *obj) { ARMCPU *cpu = ARM_CPU(obj); + static bool inited; cpu_exec_init(&cpu->env); cpu->cp_regs = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_free); + + if (tcg_enabled() && !inited) { + inited = true; + arm_translate_init(); + } } static void arm_cpu_finalizefn(Object *obj) |