mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
qom: Introduce CPUClass.tcg_initialize
Move target cpu tcg initialization to common code, called from cpu_exec_realizefn. Acked-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
11f4e8f8bf
commit
55c3ceef61
32 changed files with 40 additions and 163 deletions
|
@ -205,7 +205,6 @@ static void mb_cpu_initfn(Object *obj)
|
|||
CPUState *cs = CPU(obj);
|
||||
MicroBlazeCPU *cpu = MICROBLAZE_CPU(obj);
|
||||
CPUMBState *env = &cpu->env;
|
||||
static bool tcg_initialized;
|
||||
|
||||
cs->env_ptr = env;
|
||||
|
||||
|
@ -215,11 +214,6 @@ static void mb_cpu_initfn(Object *obj)
|
|||
/* Inbound IRQ and FIR lines */
|
||||
qdev_init_gpio_in(DEVICE(cpu), microblaze_cpu_set_irq, 2);
|
||||
#endif
|
||||
|
||||
if (tcg_enabled() && !tcg_initialized) {
|
||||
tcg_initialized = true;
|
||||
mb_tcg_init();
|
||||
}
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_mb_cpu = {
|
||||
|
@ -289,6 +283,7 @@ static void mb_cpu_class_init(ObjectClass *oc, void *data)
|
|||
cc->gdb_num_core_regs = 32 + 5;
|
||||
|
||||
cc->disas_set_info = mb_disas_set_info;
|
||||
cc->tcg_initialize = mb_tcg_init;
|
||||
}
|
||||
|
||||
static const TypeInfo mb_cpu_type_info = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue