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


> From: Richard Sandiford <rdsandiford@googlemail.com>
> Date: Sun, 05 Oct 2008 21:44:25 +0100

> removing the const minus generation from
> the middle-end is indeed the idea.  It's waiting for a Darwin
> maintainer to review the Darwin patch; every other pre-requisite
> has been approved.

Thank you for staying with this.

> 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.  */

brgds, H-P


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