target/i386/cpu: Use type_register instead of type_register_static in x86_cpu_register_types()

The lifetime of the TypeInfo instance doesn't live indefinitely, so we
should be using the regular type_register().
This commit is contained in:
Lioncash 2018-09-03 17:28:53 -04:00
parent 0a759bf7f3
commit 34b22968a4
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -5243,12 +5243,10 @@ void x86_cpu_register_types(void *opaque)
true,
};
//printf("... register X86 cpu\n");
int i;
type_register_static(opaque, &x86_cpu_type_info);
type_register(opaque, &x86_cpu_type_info);
for (i = 0; i < ARRAY_SIZE(builtin_x86_defs); i++) {
x86_register_cpudef_type(opaque, &builtin_x86_defs[i]);
}
//printf("... END OF register X86 cpu\n");
}