mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
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>
This commit is contained in:
parent
5f6c964389
commit
79614b781d
2 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue