This is the mail archive of the
mailing list for the GCC project.
Re: [RFA:] Adjust documentation for LEGITIMATE_CONSTANT_P et al to match reality, take 2
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: rdsandiford at googlemail dot com
- Cc: hans-peter dot nilsson at axis dot com, gcc-patches at gcc dot gnu dot org
- Date: Sun, 5 Oct 2008 23:35:39 +0200
- Subject: Re: [RFA:] Adjust documentation for LEGITIMATE_CONSTANT_P et al to match reality, take 2
> From: Richard Sandiford <firstname.lastname@example.org>
> 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. */