qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/7] disas: microblaze: Migrate setup to common code


From: Peter Crosthwaite
Subject: [Qemu-devel] [PATCH 2/7] disas: microblaze: Migrate setup to common code
Date: Mon, 4 May 2015 21:44:59 -0700

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 <address@hidden>
---
 disas.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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;
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]