disas: QOMify sh4 specific disas setup

Move the target_disas() sh4 specifics to the CPUClass::disas_set_info()
hook and delete the #ifdef specific code in disas.c.

Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Peter Crosthwaite 2015-07-11 19:00:03 -07:00 committed by Andreas Färber
parent 20984673e6
commit d49dd523e4
2 changed files with 10 additions and 7 deletions

View file

@ -236,9 +236,6 @@ void target_disas(FILE *out, CPUState *cpu, target_ulong code,
#else
s.info.print_insn = print_insn_little_mips;
#endif
#elif defined(TARGET_SH4)
s.info.mach = bfd_mach_sh4;
s.info.print_insn = print_insn_sh;
#elif defined(TARGET_ALPHA)
s.info.mach = bfd_mach_alpha_ev6;
s.info.print_insn = print_insn_alpha;
@ -436,9 +433,6 @@ void monitor_disas(Monitor *mon, CPUState *cpu,
#else
s.info.print_insn = print_insn_little_mips;
#endif
#elif defined(TARGET_SH4)
s.info.mach = bfd_mach_sh4;
s.info.print_insn = print_insn_sh;
#endif
if (!s.info.print_insn) {
monitor_printf(mon, "0x" TARGET_FMT_lx