OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / e500.h
1 /* Enable E500 support.
2    Copyright (C) 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
3    This file is part of GCC.
4
5    GCC is free software; you can redistribute it and/or modify it
6    under the terms of the GNU General Public License as published
7    by the Free Software Foundation; either version 3, or (at your
8    option) any later version.
9
10    GCC is distributed in the hope that it will be useful, but WITHOUT
11    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
13    License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with GCC; see the file COPYING3.  If not see
17    <http://www.gnu.org/licenses/>.  */
18
19 #undef TARGET_SPE_ABI
20 #undef TARGET_SPE
21 #undef TARGET_E500
22 #undef TARGET_FPRS
23 #undef TARGET_E500_SINGLE
24 #undef TARGET_E500_DOUBLE
25 #undef CHECK_E500_OPTIONS
26
27 #define TARGET_SPE_ABI rs6000_spe_abi
28 #define TARGET_SPE rs6000_spe
29 #define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540)
30 #define TARGET_FPRS (rs6000_float_gprs == 0)
31 #define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 1)
32 #define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 2)
33 #define CHECK_E500_OPTIONS                                              \
34   do {                                                                  \
35     if (TARGET_E500 || TARGET_SPE || TARGET_SPE_ABI                     \
36         || TARGET_E500_SINGLE || TARGET_E500_DOUBLE)                    \
37       {                                                                 \
38         if (TARGET_ALTIVEC)                                             \
39           error ("AltiVec and E500 instructions cannot coexist");       \
40         if (TARGET_64BIT)                                               \
41           error ("64-bit E500 not supported");                          \
42         if (TARGET_HARD_FLOAT && TARGET_FPRS)                           \
43           error ("E500 and FPRs not supported");                        \
44       }                                                                 \
45   } while (0)