target/alpha: Tidy up alpha_cpu_class_by_name()
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Gavin Shan <gshan@redhat.com> Message-Id: <20230908112235.75914-2-philmd@linaro.org>
This commit is contained in:
parent
9348028e7e
commit
55f2cd7737
@ -142,13 +142,10 @@ static ObjectClass *alpha_cpu_class_by_name(const char *cpu_model)
|
|||||||
typename = g_strdup_printf(ALPHA_CPU_TYPE_NAME("%s"), cpu_model);
|
typename = g_strdup_printf(ALPHA_CPU_TYPE_NAME("%s"), cpu_model);
|
||||||
oc = object_class_by_name(typename);
|
oc = object_class_by_name(typename);
|
||||||
g_free(typename);
|
g_free(typename);
|
||||||
if (oc != NULL && object_class_is_abstract(oc)) {
|
|
||||||
oc = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO: remove match everything nonsense */
|
/* TODO: remove match everything nonsense */
|
||||||
/* Default to ev67; no reason not to emulate insns by default. */
|
if (!oc || object_class_is_abstract(oc)) {
|
||||||
if (!oc) {
|
/* Default to ev67; no reason not to emulate insns by default. */
|
||||||
oc = object_class_by_name(ALPHA_CPU_TYPE_NAME("ev67"));
|
oc = object_class_by_name(ALPHA_CPU_TYPE_NAME("ev67"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user