diff options
author | Peter Crosthwaite <crosthwaitepeter@gmail.com> | 2015-06-23 20:57:36 -0700 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2015-07-09 15:20:41 +0200 |
commit | efc6674be845e40d443b62e80eb9ea9a9adfee3c (patch) | |
tree | fc8f9acdcd23eefd4c42f6e1bfe01c8fe278f448 /target-microblaze | |
parent | 484406200e51eac023b346fdf987f86af1f6fe75 (diff) | |
download | qemu-efc6674be845e40d443b62e80eb9ea9a9adfee3c.tar.gz qemu-efc6674be845e40d443b62e80eb9ea9a9adfee3c.tar.bz2 qemu-efc6674be845e40d443b62e80eb9ea9a9adfee3c.zip |
disas: microblaze: QOMify target specific disas setup
Move the target_disas() MB specifics to the QOM disas_set_info hook
and delete the MB specific code in disas.c.
This also now adds support for monitor_disas() to Microblaze.
E.g.
(qemu) xp 0x90000000
0000000090000000: 0x94208001
And before this patch:
(qemu) xp/i 0x90000000
0x90000000: Asm output not supported on this arch
After:
(qemu) xp/i 0x90000000
0x90000000: mfs r1, rmsr
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-microblaze')
-rw-r--r-- | target-microblaze/cpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target-microblaze/cpu.c b/target-microblaze/cpu.c index 128d0320d4..9ac509af3e 100644 --- a/target-microblaze/cpu.c +++ b/target-microblaze/cpu.c @@ -119,6 +119,12 @@ static void mb_cpu_reset(CPUState *s) #endif } +static void mb_disas_set_info(CPUState *cpu, disassemble_info *info) +{ + info->mach = bfd_arch_microblaze; + info->print_insn = print_insn_microblaze; +} + static void mb_cpu_realizefn(DeviceState *dev, Error **errp) { CPUState *cs = CPU(dev); @@ -256,6 +262,8 @@ static void mb_cpu_class_init(ObjectClass *oc, void *data) dc->vmsd = &vmstate_mb_cpu; dc->props = mb_properties; cc->gdb_num_core_regs = 32 + 5; + + cc->disas_set_info = mb_disas_set_info; } static const TypeInfo mb_cpu_type_info = { |