aboutsummaryrefslogtreecommitdiff
path: root/target/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'target/alpha')
-rw-r--r--target/alpha/cpu.c20
-rw-r--r--target/alpha/cpu.h4
2 files changed, 6 insertions, 18 deletions
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c
index 76150f4..1ea597b 100644
--- a/target/alpha/cpu.c
+++ b/target/alpha/cpu.c
@@ -155,24 +155,14 @@ static ObjectClass *alpha_cpu_class_by_name(const char *cpu_model)
if (oc != NULL && object_class_is_abstract(oc)) {
oc = NULL;
}
- return oc;
-}
-
-AlphaCPU *cpu_alpha_init(const char *cpu_model)
-{
- AlphaCPU *cpu;
- ObjectClass *cpu_class;
- cpu_class = alpha_cpu_class_by_name(cpu_model);
- if (cpu_class == NULL) {
- /* Default to ev67; no reason not to emulate insns by default. */
- cpu_class = object_class_by_name(TYPE("ev67"));
+ /* TODO: remove match everything nonsense */
+ /* Default to ev67; no reason not to emulate insns by default. */
+ if (!oc) {
+ oc = object_class_by_name(TYPE("ev67"));
}
- cpu = ALPHA_CPU(object_new(object_class_get_name(cpu_class)));
-
- object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
- return cpu;
+ return oc;
}
static void ev4_cpu_initfn(Object *obj)
diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h
index e95be2b..0738e97 100644
--- a/target/alpha/cpu.h
+++ b/target/alpha/cpu.h
@@ -468,9 +468,7 @@ enum {
void alpha_translate_init(void);
-AlphaCPU *cpu_alpha_init(const char *cpu_model);
-
-#define cpu_init(cpu_model) CPU(cpu_alpha_init(cpu_model))
+#define cpu_init(cpu_model) cpu_generic_init(TYPE_ALPHA_CPU, cpu_model)
void alpha_cpu_list(FILE *f, fprintf_function cpu_fprintf);
/* you can call this signal handler from your SIGBUS and SIGSEGV