mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
target-microblaze: QOM'ify CPU init
Move code from cpu_mb_init() to a QOM initfn. Signed-off-by: Andreas Färber <afaerber@suse.de> Tested-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> [AF: Leave cpu_reset() call in cpu_mb_init()]
This commit is contained in:
parent
61b6208f8e
commit
d0e71ef56f
2 changed files with 11 additions and 2 deletions
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue