diff options
author | Peter Crosthwaite <crosthwaitepeter@gmail.com> | 2015-07-11 19:00:01 -0700 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2015-10-22 15:49:40 +0200 |
commit | df0900eb89a0672a3f924b7e8d20163dee2383db (patch) | |
tree | 31462c643042032eccef68446a6d677b14f0eb5b /target-sparc/cpu.c | |
parent | 4f669905d95bbb6296338f9e86ffcdd8eae453d2 (diff) |
disas: QOMify sparc specific disas setup
Move the target_disas() sparc specifics to the QOM disas_set_info hook
and delete the #ifdef specific code in disas.c.
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-sparc/cpu.c')
-rw-r--r-- | target-sparc/cpu.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c index 82bb72ab79..d98682b563 100644 --- a/target-sparc/cpu.c +++ b/target-sparc/cpu.c @@ -90,6 +90,14 @@ static bool sparc_cpu_exec_interrupt(CPUState *cs, int interrupt_request) return false; } +static void cpu_sparc_disas_set_info(CPUState *cpu, disassemble_info *info) +{ + info->print_insn = print_insn_sparc; +#ifdef TARGET_SPARC64 + info->mach = bfd_mach_sparc_v9b; +#endif +} + static int cpu_sparc_register(SPARCCPU *cpu, const char *cpu_model) { CPUClass *cc = CPU_GET_CLASS(cpu); @@ -848,6 +856,7 @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data) cc->do_unaligned_access = sparc_cpu_do_unaligned_access; cc->get_phys_page_debug = sparc_cpu_get_phys_page_debug; #endif + cc->disas_set_info = cpu_sparc_disas_set_info; #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) cc->gdb_num_core_regs = 86; |