* config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
[official-gcc.git] / gcc / config / rs6000 / e500.h
blob53a849a86460a3ebfad0ea55470266d1a9f6a322
1 /* Enable E500 support.
2 Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software
3 Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published
8 by the Free Software Foundation; either version 3, or (at your
9 option) any later version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 #undef TARGET_SPE_ABI
21 #undef TARGET_SPE
22 #undef TARGET_FPRS
23 #undef TARGET_E500_SINGLE
24 #undef TARGET_E500_DOUBLE
25 #undef CHECK_E500_OPTIONS
27 #define TARGET_SPE_ABI rs6000_spe_abi
28 #define TARGET_SPE rs6000_spe
29 #define TARGET_FPRS (rs6000_float_gprs == 0)
30 #define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 1)
31 #define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 2)
32 #define CHECK_E500_OPTIONS \
33 do { \
34 if (TARGET_SPE || TARGET_SPE_ABI \
35 || TARGET_E500_SINGLE || TARGET_E500_DOUBLE) \
36 { \
37 if (TARGET_ALTIVEC) \
38 error ("AltiVec and SPE instructions cannot coexist"); \
39 if (TARGET_VSX) \
40 error ("VSX and SPE instructions cannot coexist"); \
41 if (TARGET_64BIT) \
42 error ("64-bit SPE not supported"); \
43 if (TARGET_HARD_FLOAT && TARGET_FPRS) \
44 error ("E500 and FPRs not supported"); \
45 } \
46 } while (0)
48 /* Override rs6000.h definition. */
49 #undef HARD_REGNO_CALLER_SAVE_MODE
50 /* When setting up caller-save slots (MODE == VOIDmode) ensure we
51 allocate space for DFmode. Save gprs in the correct mode too. */
52 #define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
53 (TARGET_E500_DOUBLE && ((MODE) == VOIDmode || (MODE) == DFmode) \
54 ? DFmode \
55 : choose_hard_reg_mode ((REGNO), (NREGS), false))