diff options
Diffstat (limited to 'target/cris/cpu.c')
-rw-r--r-- | target/cris/cpu.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/target/cris/cpu.c b/target/cris/cpu.c index 88d93f2..527a344 100644 --- a/target/cris/cpu.c +++ b/target/cris/cpu.c @@ -181,7 +181,6 @@ static void cris_cpu_initfn(Object *obj) CRISCPU *cpu = CRIS_CPU(obj); CRISCPUClass *ccc = CRIS_CPU_GET_CLASS(obj); CPUCRISState *env = &cpu->env; - static bool tcg_initialized; cs->env_ptr = env; @@ -191,15 +190,6 @@ static void cris_cpu_initfn(Object *obj) /* IRQ and NMI lines. */ qdev_init_gpio_in(DEVICE(cpu), cris_cpu_set_irq, 2); #endif - - if (tcg_enabled() && !tcg_initialized) { - tcg_initialized = true; - if (env->pregs[PR_VR] < 32) { - cris_initialize_crisv10_tcg(); - } else { - cris_initialize_tcg(); - } - } } static void crisv8_cpu_class_init(ObjectClass *oc, void *data) @@ -210,6 +200,7 @@ static void crisv8_cpu_class_init(ObjectClass *oc, void *data) ccc->vr = 8; cc->do_interrupt = crisv10_cpu_do_interrupt; cc->gdb_read_register = crisv10_cpu_gdb_read_register; + cc->tcg_initialize = cris_initialize_crisv10_tcg; } static void crisv9_cpu_class_init(ObjectClass *oc, void *data) @@ -220,6 +211,7 @@ static void crisv9_cpu_class_init(ObjectClass *oc, void *data) ccc->vr = 9; cc->do_interrupt = crisv10_cpu_do_interrupt; cc->gdb_read_register = crisv10_cpu_gdb_read_register; + cc->tcg_initialize = cris_initialize_crisv10_tcg; } static void crisv10_cpu_class_init(ObjectClass *oc, void *data) @@ -230,6 +222,7 @@ static void crisv10_cpu_class_init(ObjectClass *oc, void *data) ccc->vr = 10; cc->do_interrupt = crisv10_cpu_do_interrupt; cc->gdb_read_register = crisv10_cpu_gdb_read_register; + cc->tcg_initialize = cris_initialize_crisv10_tcg; } static void crisv11_cpu_class_init(ObjectClass *oc, void *data) @@ -240,6 +233,7 @@ static void crisv11_cpu_class_init(ObjectClass *oc, void *data) ccc->vr = 11; cc->do_interrupt = crisv10_cpu_do_interrupt; cc->gdb_read_register = crisv10_cpu_gdb_read_register; + cc->tcg_initialize = cris_initialize_crisv10_tcg; } static void crisv17_cpu_class_init(ObjectClass *oc, void *data) @@ -250,6 +244,7 @@ static void crisv17_cpu_class_init(ObjectClass *oc, void *data) ccc->vr = 17; cc->do_interrupt = crisv10_cpu_do_interrupt; cc->gdb_read_register = crisv10_cpu_gdb_read_register; + cc->tcg_initialize = cris_initialize_crisv10_tcg; } static void crisv32_cpu_class_init(ObjectClass *oc, void *data) @@ -322,6 +317,7 @@ static void cris_cpu_class_init(ObjectClass *oc, void *data) cc->gdb_stop_before_watchpoint = true; cc->disas_set_info = cris_disas_set_info; + cc->tcg_initialize = cris_initialize_tcg; } static const TypeInfo cris_cpu_type_info = { |