From 4f669905d95bbb6296338f9e86ffcdd8eae453d2 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Sat, 11 Jul 2015 19:00:00 -0700 Subject: disas: QOMify m68k specific disas setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the target_disas() m68k specifics to the CPUClass::disas_set_info() hook and delete the #ifdef specific code in disas.c. Signed-off-by: Peter Crosthwaite Reviewed-by: Laurent Vivier Reviewed-by: Greg Ungerer Signed-off-by: Andreas Färber --- target-m68k/cpu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'target-m68k') diff --git a/target-m68k/cpu.c b/target-m68k/cpu.c index 97527ef32a..e8a4eed1f9 100644 --- a/target-m68k/cpu.c +++ b/target-m68k/cpu.c @@ -61,6 +61,11 @@ static void m68k_cpu_reset(CPUState *s) tlb_flush(s, 1); } +static void m68k_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) +{ + info->print_insn = print_insn_m68k; +} + /* CPU models */ static ObjectClass *m68k_cpu_class_by_name(const char *cpu_model) @@ -208,11 +213,13 @@ static void m68k_cpu_class_init(ObjectClass *c, void *data) #endif cc->cpu_exec_enter = m68k_cpu_exec_enter; cc->cpu_exec_exit = m68k_cpu_exec_exit; + cc->disas_set_info = m68k_cpu_disas_set_info; - dc->vmsd = &vmstate_m68k_cpu; cc->gdb_num_core_regs = 18; cc->gdb_core_xml_file = "cf-core.xml"; + dc->vmsd = &vmstate_m68k_cpu; + /* * Reason: m68k_cpu_initfn() calls cpu_exec_init(), which saves * the object in cpus -> dangling pointer after final -- cgit v1.2.3