diff options
author | Peter Crosthwaite <crosthwaitepeter@gmail.com> | 2015-07-11 19:00:05 -0700 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2015-10-22 15:49:40 +0200 |
commit | 0960be7cffa7b30189f2f0f76b1ac3c8115660f3 (patch) | |
tree | aed47a20518d0623449f3c642bc69f5b4bdecea8 /target-alpha | |
parent | 63a946c7e3b081d56e617bf264fcb2881a982848 (diff) |
disas: QOMify alpha specific disas setup
Move the target_disas() alpha specifics to the CPUClass::disas_set_info()
hook and delete the #ifdef specific code in disas.c.
This also makes monitor_disas() consistent with target_disas(), as
monitor_disas() was missing a set of the BFD (This was an omission from
commit b9bec751c8c8b08d8055da32306eb105db03031b).
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-alpha')
-rw-r--r-- | target-alpha/cpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target-alpha/cpu.c b/target-alpha/cpu.c index ff1926a5d0..e5bdfa8ca2 100644 --- a/target-alpha/cpu.c +++ b/target-alpha/cpu.c @@ -46,6 +46,12 @@ static bool alpha_cpu_has_work(CPUState *cs) | CPU_INTERRUPT_MCHK); } +static void alpha_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) +{ + info->mach = bfd_mach_alpha_ev6; + info->print_insn = print_insn_alpha; +} + static void alpha_cpu_realizefn(DeviceState *dev, Error **errp) { CPUState *cs = CPU(dev); @@ -297,6 +303,8 @@ static void alpha_cpu_class_init(ObjectClass *oc, void *data) cc->get_phys_page_debug = alpha_cpu_get_phys_page_debug; dc->vmsd = &vmstate_alpha_cpu; #endif + cc->disas_set_info = alpha_cpu_disas_set_info; + cc->gdb_num_core_regs = 67; /* |