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:
Martin Hunt
1996-07-25 19:16:34 +00:00
parent 8da1e5a75d
commit 0be715623f
3 changed files with 73 additions and 43 deletions

View File

@@ -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);
}
}
}