This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Convert a29k to new target CPP builtins
- From: Jason R Thorpe <thorpej at wasabisystems dot com>
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 10 May 2002 08:45:47 -0700
- Subject: Re: [RFC] Convert a29k to new target CPP builtins
- Organization: Wasabi Systems, Inc.
- References: <20020510065908.GA22193@daikokuya.demon.co.uk>
- Reply-to: thorpej at wasabisystems dot com
On Fri, May 10, 2002 at 07:59:08AM +0100, Neil Booth wrote:
> I think rather than TARGET_REGISTER_CPP_BUILTINS, it's best to have
> two subcategories (maybe a third?) of TARGET_OS_CPP_BUILTINS and
> TARGET_CPU_CPP_BUILTINS. This should allow us to get rid of some or
> all of the #undef tangle in the headers (as this patch does for a29k).
Yes! Richard Earnshaw and I were just discussing that yesterday, in
fact :-)
> Thoughts?
It would be nice if, in addition to the static predefines, there was
a corresponding spec for OS-specific CPP stuff (rather than having
each target have to stuff it into CPP_SPEC).
> Index: gcc/config/a29k/a29k.h
> --- gcc/config/a29k/a29k.h 12 Mar 2002 05:27:44 -0000 1.34
> +++ gcc/config/a29k/a29k.h 10 May 2002 06:50:40 -0000
> @@ -23,7 +23,12 @@ Boston, MA 02111-1307, USA. */
>
> /* Names to predefine in the preprocessor for this target machine. */
>
> -#define CPP_PREDEFINES "-D_AM29K -D_AM29000 -D_EPI -Acpu=a29k -Amachine=a29k"
> +#define TARGET_CPU_CPP_BUILTINS \
> + builtin_define ("_AM29K"); \
> + builtin_define ("_AM29000"); \
> + builtin_define ("_EPI"); \
> + builtin_assert ("cpu=29k"); \
> + builtin_assert ("macine=a29k");
^^^^^^
typo
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>