@@ -595,17 +595,21 @@ static void mips_cpu_class_init(ObjectClass *c, void *data)
#endif /* CONFIG_TCG */
}
-static const TypeInfo mips_cpu_type_info = {
- .name = TYPE_MIPS_CPU,
- .parent = TYPE_CPU,
- .instance_size = sizeof(MIPSCPU),
- .instance_align = __alignof(MIPSCPU),
- .instance_init = mips_cpu_initfn,
- .abstract = true,
- .class_size = sizeof(MIPSCPUClass),
- .class_init = mips_cpu_class_init,
+static const TypeInfo mips_cpu_types[] = {
+ {
+ .name = TYPE_MIPS_CPU,
+ .parent = TYPE_CPU,
+ .instance_size = sizeof(MIPSCPU),
+ .instance_align = __alignof(MIPSCPU),
+ .instance_init = mips_cpu_initfn,
+ .abstract = true,
+ .class_size = sizeof(MIPSCPUClass),
+ .class_init = mips_cpu_class_init,
+ }
};
+DEFINE_TYPES(mips_cpu_types)
+
static void mips_cpu_cpudef_class_init(ObjectClass *oc, void *data)
{
MIPSCPUClass *mcc = MIPS_CPU_CLASS(oc);
@@ -630,7 +634,6 @@ static void mips_cpu_register_types(void)
{
int i;
- type_register_static(&mips_cpu_type_info);
for (i = 0; i < mips_defs_number; i++) {
mips_register_cpudef_type(&mips_defs[i]);
}