From 55c3ceef61fcf06fc98ddc752b7cce788ce7680b Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 15 Oct 2017 19:02:42 -0700 Subject: qom: Introduce CPUClass.tcg_initialize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move target cpu tcg initialization to common code, called from cpu_exec_realizefn. Acked-by: Andreas Färber Reviewed-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/sh4/cpu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'target/sh4/cpu.c') diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 252440e019..89abce2472 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -258,10 +258,6 @@ static void superh_cpu_initfn(Object *obj) cs->env_ptr = env; env->movcal_backup_tail = &(env->movcal_backup); - - if (tcg_enabled()) { - sh4_translate_init(); - } } static const VMStateDescription vmstate_sh_cpu = { @@ -297,6 +293,7 @@ static void superh_cpu_class_init(ObjectClass *oc, void *data) cc->get_phys_page_debug = superh_cpu_get_phys_page_debug; #endif cc->disas_set_info = superh_cpu_disas_set_info; + cc->tcg_initialize = sh4_translate_init; cc->gdb_num_core_regs = 59; -- cgit v1.2.1