summaryrefslogtreecommitdiffstats
path: root/target/m68k/helper.c
diff options
context:
space:
mode:
authorIgor Mammedov2017-08-24 18:31:34 +0200
committerEduardo Habkost2017-09-01 16:54:24 +0200
commitf47cf4e31cac4e670e26226b549c379c982e223a (patch)
treee68ee0bc9a917dce78b6f6078d4f457c6b098e58 /target/m68k/helper.c
parenthppa: replace cpu_hppa_init() with cpu_generic_init() (diff)
downloadqemu-f47cf4e31cac4e670e26226b549c379c982e223a.tar.gz
qemu-f47cf4e31cac4e670e26226b549c379c982e223a.tar.xz
qemu-f47cf4e31cac4e670e26226b549c379c982e223a.zip
m68k: replace cpu_m68k_init() with cpu_generic_init()
call register_m68k_insns() at realize time which makes cpu_m68k_init() typical object creation function. As result we can replace it with cpu_generic_init() which does the same job, reducing code duplication a bit. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Thomas Huth <huth@tuxfamily.org> Acked-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <1503592308-93913-12-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target/m68k/helper.c')
-rw-r--r--target/m68k/helper.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/target/m68k/helper.c b/target/m68k/helper.c
index caae29100c..7e50ff5871 100644
--- a/target/m68k/helper.c
+++ b/target/m68k/helper.c
@@ -156,26 +156,6 @@ static int m68k_fpu_gdb_set_reg(CPUM68KState *env, uint8_t *mem_buf, int n)
return 0;
}
-M68kCPU *cpu_m68k_init(const char *cpu_model)
-{
- M68kCPU *cpu;
- CPUM68KState *env;
- ObjectClass *oc;
-
- oc = cpu_class_by_name(TYPE_M68K_CPU, cpu_model);
- if (oc == NULL) {
- return NULL;
- }
- cpu = M68K_CPU(object_new(object_class_get_name(oc)));
- env = &cpu->env;
-
- register_m68k_insns(env);
-
- object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
-
- return cpu;
-}
-
void m68k_cpu_init_gdb(M68kCPU *cpu)
{
CPUState *cs = CPU(cpu);