From 20984673e68ebd069222512c876b846ff2425cc0 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Sat, 11 Jul 2015 19:00:02 -0700 Subject: disas: QOMify lm32 specific disas setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the target_disas() lm32 specifics to the CPUClass::disas_set_info() hook and delete the #ifdef specific code in disas.c. Signed-off-by: Peter Crosthwaite Acked-by: Michael Walle Signed-off-by: Andreas Färber --- target-lm32/cpu.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'target-lm32') diff --git a/target-lm32/cpu.c b/target-lm32/cpu.c index d0ab278..0bc544c 100644 --- a/target-lm32/cpu.c +++ b/target-lm32/cpu.c @@ -131,6 +131,12 @@ static void lm32_cpu_reset(CPUState *s) tlb_flush(s, 1); } +static void lm32_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) +{ + info->mach = bfd_mach_lm32; + info->print_insn = print_insn_lm32; +} + static void lm32_cpu_realizefn(DeviceState *dev, Error **errp) { CPUState *cs = CPU(dev); @@ -275,6 +281,7 @@ static void lm32_cpu_class_init(ObjectClass *oc, void *data) cc->gdb_num_core_regs = 32 + 7; cc->gdb_stop_before_watchpoint = true; cc->debug_excp_handler = lm32_debug_excp_handler; + cc->disas_set_info = lm32_cpu_disas_set_info; /* * Reason: lm32_cpu_initfn() calls cpu_exec_init(), which saves -- cgit v1.1