aboutsummaryrefslogtreecommitdiff
path: root/target/m68k/cpu.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-08-24 18:31:34 +0200
committerEduardo Habkost <ehabkost@redhat.com>2017-09-01 11:54:24 -0300
commitf47cf4e31cac4e670e26226b549c379c982e223a (patch)
treee68ee0bc9a917dce78b6f6078d4f457c6b098e58 /target/m68k/cpu.c
parent8fc24ad5dd081e5655ad0e87fbea2e0812235f5a (diff)
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/cpu.c')
-rw-r--r--target/m68k/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index a14b6dda7f..55bf24bae6 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -230,6 +230,8 @@ static void m68k_cpu_realizefn(DeviceState *dev, Error **errp)
M68kCPUClass *mcc = M68K_CPU_GET_CLASS(dev);
Error *local_err = NULL;
+ register_m68k_insns(&cpu->env);
+
cpu_exec_realizefn(cs, &local_err);
if (local_err != NULL) {
error_propagate(errp, local_err);