diff options
author | Stan Shebs <shebs@codesourcery.com> | 1994-06-28 20:27:02 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1994-06-28 20:27:02 +0000 |
commit | fea3fe6407ef6bb3239c5ff8b91e89b66db45e33 (patch) | |
tree | 806c7dae1c293cf88accb0f8ac61c37969a5a8bb /opcodes | |
parent | 22691fe7be208f8e82739c4d470d6e6ae85cfdf0 (diff) | |
download | gdb-fea3fe6407ef6bb3239c5ff8b91e89b66db45e33.zip gdb-fea3fe6407ef6bb3239c5ff8b91e89b66db45e33.tar.gz gdb-fea3fe6407ef6bb3239c5ff8b91e89b66db45e33.tar.bz2 |
* h8300-dis.c, mips-dis.c: Don't use true and false.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 8 | ||||
-rw-r--r-- | opcodes/h8300-dis.c | 22 |
2 files changed, 24 insertions, 6 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 39ad891..62894c9 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,11 @@ +Tue Jun 28 13:22:06 1994 Stan Shebs (shebs@andros.cygnus.com) + + * h8300-dis.c, mips-dis.c: Don't use true and false. + +Thu Jun 23 12:53:19 1994 David J. Mackenzie (djm@rtl.cygnus.com) + + * configure.in: Change --with-targets to --enable-targets. + Wed Jun 22 13:38:32 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * mips-dis.c (_print_insn_mips): Build a static hash table mapping diff --git a/opcodes/h8300-dis.c b/opcodes/h8300-dis.c index c9d2353..4064158 100644 --- a/opcodes/h8300-dis.c +++ b/opcodes/h8300-dis.c @@ -93,10 +93,12 @@ bfd_h8_disassemble (addr, info, hmode) int rdisp = 0; int abs = 0; int plen = 0; - static boolean init; + static boolean init = 0; struct h8_opcode *q = h8_opcodes; char CONST **pregnames = hmode ? lregnames : wregnames; int status; + int l; + unsigned char data[20]; void *stream = info->stream; fprintf_ftype fprintf = info->fprintf_func; @@ -104,7 +106,7 @@ bfd_h8_disassemble (addr, info, hmode) if (!init) { bfd_h8_disassemble_init (); - init = true; + init = 1; } status = info->read_memory_func(addr, data, 2, info); @@ -113,8 +115,11 @@ bfd_h8_disassemble (addr, info, hmode) info->memory_error_func(status, addr, info); return -1; } - status = info->read_memory_func(addr, data+2, 8, info); - + for (l = 2; status == 0 && l < 10; l+=2) + { + status = info->read_memory_func(addr+l, data+l, 2, info); + } + /* Find the exact opcode/arg combo */ @@ -132,7 +137,7 @@ bfd_h8_disassemble (addr, info, hmode) thisnib = (len & 1) ? (thisnib & 0xf) : ((thisnib >> 4) & 0xf); - if (looking_for < 16) + if (looking_for < 16 && looking_for >=0) { if (looking_for != thisnib) @@ -185,7 +190,10 @@ bfd_h8_disassemble (addr, info, hmode) | (data[2] << 8) | (data[3]); } - + else if(looking_for & MEMIND) + { + abs = data[1]; + } else if (looking_for & L_32) { int i = len >> 1; @@ -318,6 +326,8 @@ bfd_h8_disassemble (addr, info, hmode) else if (x & PCREL) { + if (x & L_16) + abs +=2; fprintf (stream, ".%s%d (%x)", (char) abs > 0 ? "+" : "", (char) abs, addr + (char) abs + 2); } |