diff options
Diffstat (limited to 'target-microblaze/cpu.c')
-rw-r--r-- | target-microblaze/cpu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target-microblaze/cpu.c b/target-microblaze/cpu.c index 6f00b0d13a..9c3b74ea8a 100644 --- a/target-microblaze/cpu.c +++ b/target-microblaze/cpu.c @@ -83,6 +83,16 @@ static void mb_cpu_reset(CPUState *s) #endif } +static void mb_cpu_initfn(Object *obj) +{ + MicroBlazeCPU *cpu = MICROBLAZE_CPU(obj); + CPUMBState *env = &cpu->env; + + cpu_exec_init(env); + + set_float_rounding_mode(float_round_nearest_even, &env->fp_status); +} + static void mb_cpu_class_init(ObjectClass *oc, void *data) { CPUClass *cc = CPU_CLASS(oc); @@ -96,6 +106,7 @@ static const TypeInfo mb_cpu_type_info = { .name = TYPE_MICROBLAZE_CPU, .parent = TYPE_CPU, .instance_size = sizeof(MicroBlazeCPU), + .instance_init = mb_cpu_initfn, .class_size = sizeof(MicroBlazeCPUClass), .class_init = mb_cpu_class_init, }; |