sh4 disasm fixes
Add the sh4 target to the monitor disassembly function,
and remove a duplicate "0x" printout from the sh4 dis-
assembly code.
Signed-off-by: Magnus Damm <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
diff --git a/disas.c b/disas.c
index ce342bc..f7bcce7 100644
--- a/disas.c
+++ b/disas.c
@@ -393,6 +393,9 @@
#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);
diff --git a/sh4-dis.c b/sh4-dis.c
index a502a61..41fd866 100644
--- a/sh4-dis.c
+++ b/sh4-dis.c
@@ -2065,7 +2065,7 @@
}
if ((*info->symbol_at_address_func) (val, info))
{
- fprintf_fn (stream, "\t! 0x");
+ fprintf_fn (stream, "\t! ");
(*info->print_address_func) (val, info);
}
else