mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user