return MISSING_CLOSING_PARENTHESIS;
++*strp;
if (errmsg == NULL
- && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
- value >>= 16;
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ {
+ value >>= 16;
+ value &= 0xffff;
+ }
*valuep = value;
return errmsg;
}
{
*strp += 6;
errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_M32R_HI16_SLO,
- & result_type, & value);
+ & result_type, & value);
if (**strp != ')')
return MISSING_CLOSING_PARENTHESIS;
++*strp;
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
- {
- value = value + (value & 0x8000 ? 0x10000 : 0);
- value >>= 16;
- }
+ {
+ value += 0x8000;
+ value >>= 16;
+ value &= 0xffff;
+ }
*valuep = value;
return errmsg;
}
++*strp;
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
- {
- value &= 0xffff;
- if (value & 0x8000)
- value |= ~0xffff;
- }
+ value = ((value & 0xffff) ^ 0x8000) - 0x8000;
*valuep = value;
return errmsg;
}
m32r_cgen_init_ibld_table (cd);
cd->parse_handlers = & m32r_cgen_parse_handlers[0];
cd->parse_operand = m32r_cgen_parse_operand;
+#ifdef CGEN_ASM_INIT_HOOK
+CGEN_ASM_INIT_HOOK
+#endif
}
\f