diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-09-08 11:29:17 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-11-07 13:08:48 +0100 |
commit | 55f2cd77376c6f2187ff386ab3b330ef260eedb2 (patch) | |
tree | a2af3fb21741054a85fc157282bb1bd503816d8a /target/alpha/cpu.c | |
parent | 9348028e7ed089a1e9ed45091668c4c199e76fcd (diff) | |
download | qemu-55f2cd77376c6f2187ff386ab3b330ef260eedb2.zip qemu-55f2cd77376c6f2187ff386ab3b330ef260eedb2.tar.gz qemu-55f2cd77376c6f2187ff386ab3b330ef260eedb2.tar.bz2 |
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>
Diffstat (limited to 'target/alpha/cpu.c')
-rw-r--r-- | target/alpha/cpu.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 51b7d8d..fae2cb6 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -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); oc = object_class_by_name(typename); g_free(typename); - if (oc != NULL && object_class_is_abstract(oc)) { - oc = NULL; - } /* TODO: remove match everything nonsense */ - /* Default to ev67; no reason not to emulate insns by default. */ - if (!oc) { + if (!oc || object_class_is_abstract(oc)) { + /* Default to ev67; no reason not to emulate insns by default. */ oc = object_class_by_name(ALPHA_CPU_TYPE_NAME("ev67")); } |