This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Add builtin_define of __xtensa__ (for Xtensa, of course)
- From: Bob Wilson <bwilson at tensilica dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 26 Feb 2004 12:14:16 -0800
- Subject: Add builtin_define of __xtensa__ (for Xtensa, of course)
- Organization: Tensilica, Inc.
It seems that most GCC ports provide a built-in definition of the processor name
in lowercase. The Xtensa port has been defining "__XTENSA__" in uppercase only.
This patch adds a lowercase "__xtensa__" built-in definition. Committed as
obvious on the mainline and 3.4 branch.
2004-02-26 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.h (TARGET_CPU_CPP_BUILTINS): Define __xtensa__.
Index: xtensa.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/xtensa.h,v
retrieving revision 1.52
diff -u -r1.52 xtensa.h
--- xtensa.h 19 Feb 2004 10:57:02 -0000 1.52
+++ xtensa.h 26 Feb 2004 19:56:28 -0000
@@ -106,6 +106,7 @@
do { \
builtin_assert ("cpu=xtensa"); \
builtin_assert ("machine=xtensa"); \
+ builtin_define ("__xtensa__"); \
builtin_define ("__XTENSA__"); \
builtin_define (TARGET_BIG_ENDIAN ? "__XTENSA_EB__" : "__XTENSA_EL__"); \
if (!TARGET_HARD_FLOAT) \