fix bug with -fhex-asm and negative integers

This commit is contained in:
YamaArashi 2016-10-18 00:23:50 -07:00
parent 6c251db3ed
commit 5c3aa03ece

View File

@ -2670,14 +2670,14 @@ output_addr_const (file, x)
if (GET_CODE (XEXP (x, 0)) == CONST_INT)
{
output_addr_const (file, XEXP (x, 1));
if (INTVAL (XEXP (x, 0)) >= 0)
if (INTVAL (XEXP (x, 0)) >= 0 || flag_hex_asm)
fprintf (file, "+");
output_addr_const (file, XEXP (x, 0));
}
else
{
output_addr_const (file, XEXP (x, 0));
if (INTVAL (XEXP (x, 1)) >= 0)
if (INTVAL (XEXP (x, 1)) >= 0 || flag_hex_asm)
fprintf (file, "+");
output_addr_const (file, XEXP (x, 1));
}