diff mbox

[2/7] disas: microblaze: Migrate setup to common code

Message ID 4b6fe8510587dff882587067343c330900b4e61e.1430798763.git.crosthwaite.peter@gmail.com
State New
Headers show

Commit Message

Peter Crosthwaite May 5, 2015, 4:44 a.m. UTC
Migrate the target_disas TARGET_MICROBLAZE code to common code, so
that the disassambly works for the monitor (as well the log).

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

Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
---
 disas.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/disas.c b/disas.c
index 1c80567..2ffef58 100644
--- a/disas.c
+++ b/disas.c
@@ -233,6 +233,9 @@  target_disas_set_info(int (**print_insn)(bfd_vma pc, disassemble_info *info),
 #elif defined(TARGET_LM32)
     s->info.mach = bfd_mach_lm32;
     *print_insn = print_insn_lm32;
+#elif defined(TARGET_MICROBLAZE)
+    s->info.mach = bfd_arch_microblaze;
+    *print_insn = print_insn_microblaze;
 #endif
 }
 
@@ -308,9 +311,6 @@  void target_disas(FILE *out, CPUArchState *env, target_ulong code,
         s.info.mach = bfd_mach_cris_v32;
         print_insn = print_insn_crisv32;
     }
-#elif defined(TARGET_MICROBLAZE)
-    s.info.mach = bfd_arch_microblaze;
-    print_insn = print_insn_microblaze;
 #endif
     if (print_insn == NULL) {
         print_insn = print_insn_od_target;