* m32r.opc (parse_hi16): Do not assume a 32-bit host word size.

This commit is contained in:
Alan Modra 2005-10-26 07:49:05 +00:00
parent d53e85d8ff
commit e277c00b2d
4 changed files with 20 additions and 4 deletions

View file

@ -89,7 +89,10 @@ parse_hi16 (CGEN_CPU_DESC cd,
++*strp;
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
value >>= 16;
{
value >>= 16;
value &= 0xffff;
}
*valuep = value;
return errmsg;
}
@ -104,8 +107,9 @@ parse_hi16 (CGEN_CPU_DESC cd,
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
{
value = value + (value & 0x8000 ? 0x10000 : 0);
value += 0x8000;
value >>= 16;
value &= 0xffff;
}
*valuep = value;
return errmsg;