This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA:] Adjust documentation for LEGITIMATE_CONSTANT_P et al to match reality, take 2


Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:
>> From: Richard Sandiford <rdsandiford@googlemail.com>
>> Date: Sun, 05 Oct 2008 21:44:25 +0100
>
>> With the const minus simplifications gone, do you know of any other code
>> that would generate unexpected CONSTs?
>
> No.  Though, there is the confusing comment in cse.c:fold_rtx
> line 3189, which might be taken as such code being legitimate
> and more such code being introduced:
>
> 	/* NEG of PLUS could be converted into MINUS, but that causes
> 	   expressions of the form
> 	   (CONST (MINUS (CONST_INT) (SYMBOL_REF)))
> 	   which many ports mistakenly treat as LEGITIMATE_CONSTANT_P.
> 	   FIXME: those ports should be fixed.  */

Hmm, good catch, thanks.  When I submit the "CONST grammar" patch,
I'll remove that at the same time.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]