aboutsummaryrefslogtreecommitdiff
path: root/opcodes/sh-dis.c
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes/sh-dis.c')
-rw-r--r--opcodes/sh-dis.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c
index 70fdffb..527eb75 100644
--- a/opcodes/sh-dis.c
+++ b/opcodes/sh-dis.c
@@ -1,5 +1,5 @@
/* Disassemble SH instructions.
- Copyright 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003
+ Copyright 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -433,8 +433,10 @@ print_insn_sh (memaddr, info)
case bfd_mach_sh3e:
target_arch = arch_sh3e;
break;
- case bfd_mach_sh4:
case bfd_mach_sh4_nofpu:
+ target_arch = arch_sh4_nofpu;
+ break;
+ case bfd_mach_sh4:
target_arch = arch_sh4;
break;
case bfd_mach_sh4a:
@@ -444,6 +446,9 @@ print_insn_sh (memaddr, info)
case bfd_mach_sh4al_dsp:
target_arch = arch_sh4al_dsp;
break;
+ case bfd_mach_sh4_nommu_nofpu:
+ target_arch = arch_sh4_nommu_nofpu;
+ break;
case bfd_mach_sh5:
#ifdef INCLUDE_SHMEDIA
status = print_insn_sh64 (memaddr, info);
@@ -577,12 +582,21 @@ print_insn_sh (memaddr, info)
case IMM1_8BY4:
imm = ((nibs[2] << 4) | nibs[3]) << 2;
goto ok;
+ case REG_N_D:
+ if ((nibs[n] & 1) != 0)
+ goto fail;
+ /* fall through */
case REG_N:
rn = nibs[n];
break;
case REG_M:
rm = nibs[n];
break;
+ case REG_N_B01:
+ if ((nibs[n] & 0x3) != 1 /* binary 01 */)
+ goto fail;
+ rn = (nibs[n] & 0xc) >> 2;
+ break;
case REG_NM:
rn = (nibs[n] & 0xc) >> 2;
rm = (nibs[n] & 0x3);
@@ -841,7 +855,13 @@ print_insn_sh (memaddr, info)
else
val = bfd_getb32 (bytes);
}
- fprintf_fn (stream, "\t! 0x%x", val);
+ if ((*info->symbol_at_address_func) (val, info))
+ {
+ fprintf_fn (stream, "\t! 0x");
+ (*info->print_address_func) (val, info);
+ }
+ else
+ fprintf_fn (stream, "\t! 0x%x", val);
}
}