diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-11 23:14:47 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-11 23:14:47 +0000 |
commit | b2d381e8f611d68b6d0e3c62471963dadd14cb96 (patch) | |
tree | bd153325254c20b315dac9698fe9440ba8a2c693 /gcc/config/rs6000/rs6000-c.c | |
parent | 7b852dd699fc2cfb266969f50800b71f0f54339c (diff) | |
download | gcc-b2d381e8f611d68b6d0e3c62471963dadd14cb96.tar.gz |
* config.gcc (powerpc*-*-*, rs6000-*-*-*): Don't bother including
softfloat.h.
* config/rs6000/vxppc.h (CPP_ENDIAN_BIG_SPEC): Delete.
(CPP_ENDIAN_LITTLE_SPEC): Delete.
* config/rs6000/sysv4le.h (CPP_ENDIAN_DEFAULT_SPEC): Delete.
* config/rs6000/sysv4.h (CPP_SYSV_SPEC): Delete _SOFT_FLOAT setting,
__LONG_DOUBLE_128__ setting, _CALL_* setting.
(CPP_DEFAULT_SPEC): Delete.
(CPP_FLOAT_DEFAULT_SPEC): Delete.
(CPP_LONGDOUBLE_DEFAULT_SPEC): Delete.
(CPP_SYSV_DEFAULT_SPEC): Delete.
(CPP_ENDIAN_BIG_SPEC): Delete.
(CPP_ENDIAN_LITTLE_SPEC): Delete.
(CPP_ENDIAN_SPEC): Delete.
(CPP_SPEC): Don't include cpp_endian, cpp_cpu.
(SUBTARGET_EXTRA_SPECS): Delete cpp_sysv_default, cpp_endian_default,
cpp_endian, cpp_endian_big, cpp_endian_little, cpp_float_default,
cpp_longdouble_default.
* config/rs6000/softfloat.h: Delete.
* config/rs6000/rs6000.h (CPP_CPU_SPEC): Delete.
(EXTRA_SPECS): Delete cpp_cpu.
(TARGET_CPU_CPP_BUILTINS): New.
* config/rs6000/rs6000-protos.h (rs6000_cpu_cpp_builtins): New
prototype.
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): New.
* config/rs6000/linux64.h (CPP_PREDEFINES): Remove endianness defines.
(CPP_DEFAULT_SPEC): Delete.
* config/rs6000/eabiaix.h (CPP_SYSV_DEFAULT_SPEC): Delete.
* config/rs6000/darwin.h (CPP_PREDEFINES): Don't define __BIG_ENDIAN__.
* config/rs6000/beos.h (CPP_SPEC): Remove cpp_cpu.
(CPP_DEFAULT_SPEC): Delete.
* config/rs6000/aix51.h (CPP_SPEC): Remove cpp_cpu, -D_ARCH_PPC.
(CPLUSPLUS_CPP_SPEC): Likewise.
(CPP_CPU_SPEC): Delete.
(CPP_DEFAULT_SPEC): Delete.
* config/rs6000/aix43.h (CPP_SPEC): Remove cpp_cpu, -D_ARCH_PPC.
(CPLUSPLUS_CPP_SPEC): Likewise.
(CPP_CPU_SPEC): Delete.
(CPP_DEFAULT_SPEC): Delete.
* config/rs6000/aix41.h (CPP_SPEC): Remove cpp_cpu.
(CPP_DEFAULT_SPEC): Delete.
* config/rs6000/aix.h (CPP_SPEC): Remove cpp_cpu.
(CPP_DEFAULT_SPEC): Delete.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/rs6000-c.c')
-rw-r--r-- | gcc/config/rs6000/rs6000-c.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index 15cd5a6c338..ab31cc58f7c 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -69,3 +69,61 @@ rs6000_pragma_longcall (pfile) rs6000_default_long_calls = (n == integer_one_node); } + +/* Handle defining many CPP flags based on TARGET_xxx. As a general + policy, rather than trying to guess what flags a user might want a + #define for, it's better to define a flag for everything. */ + +#define builtin_define(TXT) cpp_define (pfile, TXT) +#define builtin_assert(TXT) cpp_assert (pfile, TXT) + +void +rs6000_cpu_cpp_builtins (pfile) + cpp_reader *pfile; +{ + if (TARGET_POWER2) + builtin_define ("_ARCH_PWR2"); + else if (TARGET_POWER) + builtin_define ("_ARCH_PWR"); + if (TARGET_POWERPC) + builtin_define ("_ARCH_PPC"); + if (TARGET_POWERPC64) + builtin_define ("_ARCH_PPC64"); + if (! TARGET_POWER && ! TARGET_POWER2 && ! TARGET_POWERPC) + builtin_define ("_ARCH_COM"); + if (TARGET_ALTIVEC) + builtin_define ("__ALTIVEC__"); + if (TARGET_SOFT_FLOAT) + builtin_define ("_SOFT_FLOAT"); + if (BYTES_BIG_ENDIAN) + { + builtin_define ("__BIG_ENDIAN__"); + builtin_define ("_BIG_ENDIAN"); + builtin_assert ("machine=bigendian"); + } + else + { + builtin_define ("__LITTLE_ENDIAN__"); + builtin_define ("_LITTLE_ENDIAN"); + builtin_assert ("machine=littleendian"); + } + if (TARGET_LONG_DOUBLE_128) + builtin_define ("__LONG_DOUBLE_128__"); + + switch (rs6000_current_abi) + { + case ABI_V4: + builtin_define ("_CALL_SYSV"); + break; + case ABI_AIX_NODESC: + builtin_define ("_CALL_AIX"); + break; + case ABI_AIX: + builtin_define ("_CALL_AIXDESC"); + builtin_define ("_CALL_AIX"); + break; + case ABI_DARWIN: + builtin_define ("_CALL_DARWIN"); + break; + } +} |