1122394Sharti/* Definitions of target machine for GNU compiler, 2122394Sharti for PowerPC e500 machines running GNU/Linux. 3122394Sharti Copyright (C) 2003, 2004 Free Software Foundation, Inc. 4122394Sharti Contributed by Aldy Hernandez (aldy@quesejoda.com). 5122394Sharti 6122394Sharti This file is part of GCC. 7133211Sharti 8133211Sharti GCC is free software; you can redistribute it and/or modify it 9133211Sharti under the terms of the GNU General Public License as published 10133211Sharti by the Free Software Foundation; either version 2, or (at your 11133211Sharti option) any later version. 12133211Sharti 13122394Sharti GCC is distributed in the hope that it will be useful, but WITHOUT 14122394Sharti ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15122394Sharti or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 16133211Sharti License for more details. 17133211Sharti 18133211Sharti You should have received a copy of the GNU General Public License 19133211Sharti along with GCC; see the file COPYING. If not, write to the 20133211Sharti Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, 21133211Sharti MA 02110-1301, USA. */ 22133211Sharti 23133211Sharti#undef TARGET_VERSION 24133211Sharti#define TARGET_VERSION fprintf (stderr, " (PowerPC E500 GNU/Linux)"); 25133211Sharti 26133211Sharti/* Override rs6000.h and sysv4.h definition. */ 27133211Sharti#undef TARGET_DEFAULT 28122394Sharti#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_STRICT_ALIGN) 29133211Sharti 30122394Sharti#undef TARGET_SPE_ABI 31122394Sharti#undef TARGET_SPE 32122394Sharti#undef TARGET_E500 33122394Sharti#undef TARGET_ISEL 34122394Sharti#undef TARGET_FPRS 35122394Sharti#undef TARGET_E500_SINGLE 36122394Sharti#undef TARGET_E500_DOUBLE 37122394Sharti 38122394Sharti#define TARGET_SPE_ABI rs6000_spe_abi 39122394Sharti#define TARGET_SPE rs6000_spe 40122394Sharti#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540) 41122394Sharti#define TARGET_ISEL rs6000_isel 42122394Sharti#define TARGET_FPRS (rs6000_float_gprs == 0) 43122394Sharti#define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 1) 44122394Sharti#define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 2) 45122394Sharti 46122394Sharti#undef SUBSUBTARGET_OVERRIDE_OPTIONS 47122394Sharti#define SUBSUBTARGET_OVERRIDE_OPTIONS \ 48122394Sharti if (rs6000_select[1].string == NULL) \ 49122394Sharti rs6000_cpu = PROCESSOR_PPC8540; \ 50122394Sharti if (!rs6000_explicit_options.abi) \ 51122394Sharti rs6000_spe_abi = 1; \ 52122394Sharti if (!rs6000_explicit_options.float_gprs) \ 53122394Sharti rs6000_float_gprs = 1; \ 54122394Sharti /* See note below. */ \ 55122394Sharti /*if (!rs6000_explicit_options.long_double)*/ \ 56122394Sharti /* rs6000_long_double_type_size = 128;*/ \ 57122394Sharti if (!rs6000_explicit_options.spe) \ 58122394Sharti rs6000_spe = 1; \ 59122394Sharti if (!rs6000_explicit_options.isel) \ 60122394Sharti rs6000_isel = 1; \ 61122394Sharti if (target_flags & MASK_64BIT) \ 62122394Sharti error ("-m64 not supported in this configuration") 63122394Sharti 64122394Sharti/* The e500 ABI says that either long doubles are 128 bits, or if 65122394Sharti implemented in any other size, the compiler/linker should error out. 66122394Sharti We have no emulation libraries for 128 bit long doubles, and I hate 67122394Sharti the dozens of failures on the regression suite. So I'm breaking ABI 68122394Sharti specifications, until I properly fix the emulation. 69122394Sharti 70122394Sharti Enable these later. 71122394Sharti#undef CPP_LONGDOUBLE_DEFAULT_SPEC 72122394Sharti#define CPP_LONGDOUBLE_DEFAULT_SPEC "-D__LONG_DOUBLE_128__=1" 73122394Sharti*/ 74122394Sharti 75122394Sharti#undef ASM_DEFAULT_SPEC 76122394Sharti#define ASM_DEFAULT_SPEC "-mppc -mspe -me500" 77122394Sharti