From ce35884de13604fc10e70f2a19f988ee7eaa2067 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Wed, 9 Sep 1992 20:35:19 +0000 Subject: [PATCH] (output_addr_const): If 2nd arg of MINUS is negative integer, put it in parens. From-SVN: r2090 --- gcc/final.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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: -- 2.30.2