diff options
author | Jie Zhang <jie.zhang@analog.com> | 2005-10-18 16:39:41 +0000 |
---|---|---|
committer | Jie Zhang <jie.zhang@analog.com> | 2005-10-18 16:39:41 +0000 |
commit | 471e4e36fc2cf030b1bde3b92e651bd04106383a (patch) | |
tree | 5f149023b88d6365bfa082752327ec8fa200d85a /opcodes/bfin-dis.c | |
parent | 1e0486eab843eadf7c9a52c78bfe0e6d2dbaebaf (diff) | |
download | gdb-471e4e36fc2cf030b1bde3b92e651bd04106383a.zip gdb-471e4e36fc2cf030b1bde3b92e651bd04106383a.tar.gz gdb-471e4e36fc2cf030b1bde3b92e651bd04106383a.tar.bz2 |
* bfin-dis.c (print_insn_bfin): Do proper endian transform when
reading instruction from memory.
Diffstat (limited to 'opcodes/bfin-dis.c')
-rw-r--r-- | opcodes/bfin-dis.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/opcodes/bfin-dis.c b/opcodes/bfin-dis.c index 2714e90..08f9d23 100644 --- a/opcodes/bfin-dis.c +++ b/opcodes/bfin-dis.c @@ -5765,13 +5765,18 @@ illegal_instruction: int print_insn_bfin (bfd_vma pc, disassemble_info *outf) { - short iw0 = 0; - int status = 0; + bfd_byte buf[2]; + unsigned short iw0; + int status; int count = 0; - status = (*outf->read_memory_func) (pc & ~0x01, (bfd_byte *) & iw0, 2, outf); + + status = (*outf->read_memory_func) (pc & ~0x01, buf, 2, outf); + iw0 = bfd_getl16 (buf); count += _print_insn_bfin (pc, outf); + /* Proper display of multiple issue instructions. */ + if ((iw0 & 0xc000) == 0xc000 && (iw0 & BIT_MULTI_INS) && ((iw0 & 0xe800) != 0xe800 /* not Linkage */ )) { |