diff options
author | Jeff Law <law@redhat.com> | 1996-11-20 18:39:48 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1996-11-20 18:39:48 +0000 |
commit | f0e98103c52eb1595dc4b68f9a36de36763041b7 (patch) | |
tree | d11c4a7f8559982fc7aeec0716b04d19a85c99ee | |
parent | f039819018eb7f0187dfd80342bcf0633af3da81 (diff) | |
download | gdb-f0e98103c52eb1595dc4b68f9a36de36763041b7.zip gdb-f0e98103c52eb1595dc4b68f9a36de36763041b7.tar.gz gdb-f0e98103c52eb1595dc4b68f9a36de36763041b7.tar.bz2 |
* mn10300-dis.c (disassemble): Handle register lists.
More disassembler stuff.
-rw-r--r-- | opcodes/ChangeLog | 2 | ||||
-rw-r--r-- | opcodes/mn10300-dis.c | 45 |
2 files changed, 47 insertions, 0 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 03a28d6..b942b5b 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,7 @@ Wed Nov 20 10:37:13 1996 Jeffrey A Law (law@cygnus.com) + * mn10300-dis.c (disassemble): Handle register lists. + * mn10300-opc.c: Fix handling of register list operand for "call", "ret", and "rets" instructions. diff --git a/opcodes/mn10300-dis.c b/opcodes/mn10300-dis.c index 3986418..1d449dd 100644 --- a/opcodes/mn10300-dis.c +++ b/opcodes/mn10300-dis.c @@ -370,6 +370,51 @@ disassemble (memaddr, info, insn, extension, size) else if ((operand->flags & MN10300_OPERAND_MEMADDR) != 0) (*info->print_address_func) (value, info); + else if ((operand->flags & MN10300_OPERAND_REG_LIST) != 0) + { + int comma = 0; + + (*info->fprintf_func) (info->stream, "["); + if (value & 0x80) + { + (*info->fprintf_func) (info->stream, "d2"); + comma = 1; + } + + if (value & 0x40) + { + if (comma) + (*info->fprintf_func) (info->stream, ","); + (*info->fprintf_func) (info->stream, "d3"); + comma = 1; + } + + if (value & 0x20) + { + if (comma) + (*info->fprintf_func) (info->stream, ","); + (*info->fprintf_func) (info->stream, "a2"); + comma = 1; + } + + if (value & 0x10) + { + if (comma) + (*info->fprintf_func) (info->stream, ","); + (*info->fprintf_func) (info->stream, "a3"); + comma = 1; + } + + if (value & 0x08) + { + if (comma) + (*info->fprintf_func) (info->stream, ","); + (*info->fprintf_func) (info->stream, "other"); + comma = 1; + } + (*info->fprintf_func) (info->stream, "]"); + } + else (*info->fprintf_func) (info->stream, "%d", value); } |