]> git.proxmox.com Git - qemu.git/blobdiff - disas.c
LAN9118 improvements
[qemu.git] / disas.c
diff --git a/disas.c b/disas.c
index 37f7433c3b5095fda0951591bd2d5d1808c181d3..f7bcce748ce57d2470c99bbaf026cd66485d2e39 100644 (file)
--- a/disas.c
+++ b/disas.c
@@ -33,10 +33,7 @@ target_read_memory (bfd_vma memaddr,
                     int length,
                     struct disassemble_info *info)
 {
-    int i;
-    for(i = 0; i < length; i++) {
-        myaddr[i] = ldub_code(memaddr + i);
-    }
+    cpu_memory_rw_debug(cpu_single_env, memaddr, myaddr, length, 0);
     return 0;
 }
 
@@ -198,6 +195,9 @@ void target_disas(FILE *out, target_ulong code, target_ulong size, int flags)
 #elif defined(TARGET_CRIS)
     disasm_info.mach = bfd_mach_cris_v32;
     print_insn = print_insn_crisv32;
+#elif defined(TARGET_MICROBLAZE)
+    disasm_info.mach = bfd_arch_microblaze;
+    print_insn = print_insn_microblaze;
 #else
     fprintf(out, "0x" TARGET_FMT_lx
            ": Asm output not supported on this arch\n", code);
@@ -246,7 +246,7 @@ void disas(FILE *out, void *code, unsigned long size)
     disasm_info.buffer_vma = (unsigned long)code;
     disasm_info.buffer_length = size;
 
-#ifdef WORDS_BIGENDIAN
+#ifdef HOST_WORDS_BIGENDIAN
     disasm_info.endian = BFD_ENDIAN_BIG;
 #else
     disasm_info.endian = BFD_ENDIAN_LITTLE;
@@ -393,6 +393,9 @@ void monitor_disas(Monitor *mon, CPUState *env,
 #else
     print_insn = print_insn_little_mips;
 #endif
+#elif defined(TARGET_SH4)
+    disasm_info.mach = bfd_mach_sh4;
+    print_insn = print_insn_sh;
 #else
     monitor_printf(mon, "0x" TARGET_FMT_lx
                    ": Asm output not supported on this arch\n", pc);