mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -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
|
@ -103,14 +103,8 @@ static void tilegx_cpu_initfn(Object *obj)
|
|||
CPUState *cs = CPU(obj);
|
||||
TileGXCPU *cpu = TILEGX_CPU(obj);
|
||||
CPUTLGState *env = &cpu->env;
|
||||
static bool tcg_initialized;
|
||||
|
||||
cs->env_ptr = env;
|
||||
|
||||
if (tcg_enabled() && !tcg_initialized) {
|
||||
tcg_initialized = true;
|
||||
tilegx_tcg_init();
|
||||
}
|
||||
}
|
||||
|
||||
static void tilegx_cpu_do_interrupt(CPUState *cs)
|
||||
|
@ -161,6 +155,7 @@ static void tilegx_cpu_class_init(ObjectClass *oc, void *data)
|
|||
cc->set_pc = tilegx_cpu_set_pc;
|
||||
cc->handle_mmu_fault = tilegx_cpu_handle_mmu_fault;
|
||||
cc->gdb_num_core_regs = 0;
|
||||
cc->tcg_initialize = tilegx_tcg_init;
|
||||
}
|
||||
|
||||
static const TypeInfo tilegx_cpu_type_info = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue