From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9008 invoked by alias); 22 Oct 2009 08:27:48 -0000 Received: (qmail 8999 invoked by uid 22791); 22 Oct 2009 08:27:47 -0000 X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO,SPF_PASS X-Spam-Check-By: sourceware.org Received: from cartman.nzsolutions.net (HELO cartman.nzsolutions.net) (87.117.194.66) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Oct 2009 08:27:41 +0000 Received: from [192.168.0.6] (localhost.localdomain [127.0.0.1]) by cartman.nzsolutions.net (Postfix) with ESMTP id 67CB11248020; Thu, 22 Oct 2009 09:27:38 +0100 (BST) Received: from 94.3.139.224 ([94.3.139.224] helo=[192.168.0.6]) by cartman.nzsolutions.co.uk; 22 Oct 2009 09:27:38 +0100 Message-ID: <4AE01778.3070905@picochip.com> Date: Thu, 22 Oct 2009 08:46:00 -0000 From: Hariharan Sandanagobalane User-Agent: Thunderbird 2.0.0.22 (X11/20090625) MIME-Version: 1.0 To: Nick Clifton CC: gcc-patches@gcc.gnu.org, Hari , Daniel Towner Subject: Re: RFA: Provide a default definition of CONSTANT_ADDRESS_P References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg01403.txt.bz2 This is okay (for picochip port). Cheers Hari Nick Clifton wrote: > Hi Guys, > > This is a follow up to a comment from Jeff Law about a patch I > created for the MN10300 port. We found that for that port that its > definition of CONSTANT_ADDRESS_P() as just CONSTANT_P() was a little > bit too permissive. In particular it was allowing CONST_DOUBLEs to > be treated as constant addresses which tended to confuse other parts > of the compiler. > > It turns out that quite a few backends use this definition of > CONSTANT_ADDRESS_P. It is suggested in the tm.texi documentation > which is probably why it has happened. So I am seeking approval for > the attached patch to address the problem. It does two things: > Firstly it provides a default definition of CONSTANT_ADDRESS_P in > defaults.h which includes a test to make sure that CONST_DOUBLEs are > not allowed. Secondly it updates all of the backends which used to > define CONSTANT_ADDRESS_P as CONSTANT_P so that they now use this > default definition. > > Tested by building the following targets: avr-elf, bfin-elf, > cris-elf, fr30-elf, frv-elf, m32c-elf, m68hc12-elf, mep-elf, > mn10300-elf, moxie-elf, pdp11-aout, picochip-elf, score-elf, > xstormy16-elf. > > I also ran an x86 bootstrap just to make sure that the change to > defaults.h did not break anything - it did not. > > OK to apply ? > > Cheers > Nick > > gcc/ChangeLog > 2009-10-20 Nick Clifton > > * defaults.h (CONSTANT_ADDRESS_P): Provide a default definition. > Make sure that it does not allow CONST_DOUBLEs. > * doc/tm.texi (CONSTANT_ADDRESS_P): Update description. > * config/avr/avr.h (CONSTANT_ADDRESS_P): Delete. > * config/bfin/bfin.h (CONSTANT_ADDRESS_P): Delete. > * config/cris/cris.h (CONSTANT_ADDRESS_P): Delete. > * config/fr30/fr30.h (CONSTANT_ADDRESS_P): Delete. > * config/frv/frv.h (CONSTANT_ADDRESS_P): Delete. > * config/m32c/m32c.h (CONSTANT_ADDRESS_P): Delete. > * config/m68hc11/m68hc11.h (CONSTANT_ADDRESS_P): Delete. > * config/mep/mep.h (CONSTANT_ADDRESS_P): Delete. > * config/mn10300/mn10300.h (CONSTANT_ADDRESS_P): Delete. > * config/moxie/moxie.h (CONSTANT_ADDRESS_P): Delete. > * config/pdp11/pdp11.h (CONSTANT_ADDRESS_P): Delete. > * config/picochip/picochip.h (CONSTANT_ADDRESS_P): Delete. > * config/score/score.h (CONSTANT_ADDRESS_P): Delete. > * config/stormy16/stormy16.h (CONSTANT_ADDRESS_P): Delete. > >