diff options
author | Martin Hunt <hunt@redhat.com> | 1996-07-25 19:16:34 +0000 |
---|---|---|
committer | Martin Hunt <hunt@redhat.com> | 1996-07-25 19:16:34 +0000 |
commit | 0be715623f3f1bf09054670073670d1764d0c068 (patch) | |
tree | 76c6da0297104fd58bb454131bf8dd6027532e63 /opcodes/d10v-dis.c | |
parent | 8da1e5a75dbee3ead677ac3593b32732d2451ded (diff) | |
download | gdb-0be715623f3f1bf09054670073670d1764d0c068.zip gdb-0be715623f3f1bf09054670073670d1764d0c068.tar.gz gdb-0be715623f3f1bf09054670073670d1764d0c068.tar.bz2 |
Thu Jul 25 12:08:09 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v-opc.c: Changes to support signed and unsigned numbers.
All instructions with the same name that have long and short forms
now end in ".l" or ".s". Divs added.
* d10v-dis.c: Changes to support signed and unsigned numbers.
Diffstat (limited to 'opcodes/d10v-dis.c')
-rw-r--r-- | opcodes/d10v-dis.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/opcodes/d10v-dis.c b/opcodes/d10v-dis.c index ae18c55..ccc07e9 100644 --- a/opcodes/d10v-dis.c +++ b/opcodes/d10v-dis.c @@ -155,7 +155,19 @@ print_operand (oper, insn, op, memaddr, info) (*info->print_address_func) (memaddr + num, info); } else - (*info->fprintf_func) (info->stream, "0x%x",num); + { + if (oper->flags & OPERAND_SIGNED) + { + int max = (1 << (oper->bits - 1)); + if (num & max) + { + num = -num; + num &= (max-1); + (*info->fprintf_func) (info->stream, "-"); + } + } + (*info->fprintf_func) (info->stream, "0x%x",num); + } } } |