aboutsummaryrefslogtreecommitdiff
path: root/target/alpha/cpu.c
diff options
context:
space:
mode:
authorGavin Shan <gshan@redhat.com>2023-11-15 09:55:58 +1000
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-01-05 16:20:14 +0100
commit9c115f68e2d27a7aea71e4956689a091fad1ba64 (patch)
tree5dd1db356acfbfcb8fc48516067d6a5b16dbdbe7 /target/alpha/cpu.c
parentbf964322d643f03650806c33a951fc7d74649190 (diff)
target/alpha: Remove fallback to ev67 cpu class
'ev67' CPU class will be returned to match everything, which makes no sense as mentioned in the comments. Remove the logic to fall back to 'ev67' CPU class to match everything. Signed-off-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231114235628.534334-2-gshan@redhat.com> [PMD: Reword subject, replace 'any' -> 'ev67' on linux-user] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'target/alpha/cpu.c')
-rw-r--r--target/alpha/cpu.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c
index 39cf841b3e..91fe8ae095 100644
--- a/target/alpha/cpu.c
+++ b/target/alpha/cpu.c
@@ -141,11 +141,8 @@ 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);
-
- /* TODO: remove match everything nonsense */
- 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"));
+ if (!oc || !object_class_dynamic_cast(oc, TYPE_ALPHA_CPU)) {
+ return NULL;
}
return oc;