Skip to contentSkip to conversation

sh4 disasm fixes

PATCH New Magnus Damm 1 participant 1 message Nov 13, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh4 disasm fixes

From: Magnus Damm <[email protected]>

Add the sh4 target to the monitor disassembly function, and remove a duplicate "0x" printout from the sh4 dis- assembly code.

---

 disas.c   |    4 ++++
 sh4-dis.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
disas.c +4 -0
@@ -393,6 +393,10 @@ void monitor_disas(Monitor *mon, CPUStat
 #else
     print_insn = print_insn_little_mips;
 #endif
+#elif
+#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);
sh4-dis.c +1 -1
@@ -2065,7 +2065,7 @@ print_insn_sh (bfd_vma memaddr, struct d
 		}
 	      if ((*info->symbol_at_address_func) (val, info))
 		{
-		  fprintf_fn (stream, "\t! 0x");
+		  fprintf_fn (stream, "\t! ");
 		  (*info->print_address_func) (val, info);
 		}
 	      else