From: Richard Stallman Date: Wed, 9 Sep 1992 20:35:19 +0000 (+0000) Subject: (output_addr_const): If 2nd arg of MINUS is negative integer, put it in parens. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce35884de13604fc10e70f2a19f988ee7eaa2067;p=gcc.git (output_addr_const): If 2nd arg of MINUS is negative integer, put it in parens. From-SVN: r2090 --- diff --git a/gcc/final.c b/gcc/final.c index 4ccfd4761b7..cef184fbc07 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2231,7 +2231,15 @@ output_addr_const (file, x) case MINUS: output_addr_const (file, XEXP (x, 0)); fprintf (file, "-"); - output_addr_const (file, XEXP (x, 1)); + if (GET_CODE (XEXP (x, 1)) == CONST_INT + && INTVAL (XEXP (x, 1)) < 0) + { + fprintf (file, ASM_OPEN_PAREN); + output_addr_const (file, XEXP (x, 1)); + fprintf (file, ASM_CLOSE_PAREN); + } + else + output_addr_const (file, XEXP (x, 1)); break; case ZERO_EXTEND: