re PR target/58587 (Bootstrap error with ada with -mcpu=power7)
[official-gcc.git] / gcc / config / rs6000 / rs6000-cpus.def
blob548566eee8bf6c1f5689cdec5f3facc65391aa44
1 /* IBM RS/6000 CPU names..
2 Copyright (C) 1991-2013 Free Software Foundation, Inc.
3 Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published
9 by the Free Software Foundation; either version 3, or (at your
10 option) any later version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 /* ISA masks. */
22 #ifndef ISA_2_1_MASKS
23 #define ISA_2_1_MASKS OPTION_MASK_MFCRF
24 #define ISA_2_2_MASKS (ISA_2_1_MASKS | OPTION_MASK_POPCNTB)
25 #define ISA_2_4_MASKS (ISA_2_2_MASKS | OPTION_MASK_FPRND)
27 /* For ISA 2.05, do not add MFPGPR, since it isn't in ISA 2.06, and don't add
28 ALTIVEC, since in general it isn't a win on power6. In ISA 2.04, fsel,
29 fre, fsqrt, etc. were no longer documented as optional. Group masks by
30 server and embedded. */
31 #define ISA_2_5_MASKS_EMBEDDED (ISA_2_4_MASKS \
32 | OPTION_MASK_CMPB \
33 | OPTION_MASK_RECIP_PRECISION \
34 | OPTION_MASK_PPC_GFXOPT \
35 | OPTION_MASK_PPC_GPOPT)
37 #define ISA_2_5_MASKS_SERVER (ISA_2_5_MASKS_EMBEDDED | OPTION_MASK_DFP)
39 /* For ISA 2.06, don't add ISEL, since in general it isn't a win, but
40 altivec is a win so enable it. */
41 /* OPTION_MASK_VSX_TIMODE should be set, but disable it for now until
42 PR 58587 is fixed. */
43 #define ISA_2_6_MASKS_EMBEDDED (ISA_2_5_MASKS_EMBEDDED | OPTION_MASK_POPCNTD)
44 #define ISA_2_6_MASKS_SERVER (ISA_2_5_MASKS_SERVER \
45 | OPTION_MASK_POPCNTD \
46 | OPTION_MASK_ALTIVEC \
47 | OPTION_MASK_VSX)
49 /* For now, don't provide an embedded version of ISA 2.07. */
50 #define ISA_2_7_MASKS_SERVER (ISA_2_6_MASKS_SERVER \
51 | OPTION_MASK_P8_FUSION \
52 | OPTION_MASK_P8_VECTOR \
53 | OPTION_MASK_CRYPTO \
54 | OPTION_MASK_DIRECT_MOVE \
55 | OPTION_MASK_HTM \
56 | OPTION_MASK_QUAD_MEMORY)
58 #define POWERPC_7400_MASK (OPTION_MASK_PPC_GFXOPT | OPTION_MASK_ALTIVEC)
60 /* Deal with ports that do not have -mstrict-align. */
61 #ifdef OPTION_MASK_STRICT_ALIGN
62 #define OPTION_MASK_STRICT_ALIGN_OPTIONAL OPTION_MASK_STRICT_ALIGN
63 #else
64 #define OPTION_MASK_STRICT_ALIGN 0
65 #define OPTION_MASK_STRICT_ALIGN_OPTIONAL 0
66 #ifndef MASK_STRICT_ALIGN
67 #define MASK_STRICT_ALIGN 0
68 #endif
69 #endif
71 /* Mask of all options to set the default isa flags based on -mcpu=<xxx>. */
72 #define POWERPC_MASKS (OPTION_MASK_ALTIVEC \
73 | OPTION_MASK_CMPB \
74 | OPTION_MASK_CRYPTO \
75 | OPTION_MASK_DFP \
76 | OPTION_MASK_DIRECT_MOVE \
77 | OPTION_MASK_DLMZB \
78 | OPTION_MASK_FPRND \
79 | OPTION_MASK_HTM \
80 | OPTION_MASK_ISEL \
81 | OPTION_MASK_MFCRF \
82 | OPTION_MASK_MFPGPR \
83 | OPTION_MASK_MULHW \
84 | OPTION_MASK_NO_UPDATE \
85 | OPTION_MASK_P8_FUSION \
86 | OPTION_MASK_P8_VECTOR \
87 | OPTION_MASK_POPCNTB \
88 | OPTION_MASK_POPCNTD \
89 | OPTION_MASK_POWERPC64 \
90 | OPTION_MASK_PPC_GFXOPT \
91 | OPTION_MASK_PPC_GPOPT \
92 | OPTION_MASK_QUAD_MEMORY \
93 | OPTION_MASK_RECIP_PRECISION \
94 | OPTION_MASK_SOFT_FLOAT \
95 | OPTION_MASK_STRICT_ALIGN_OPTIONAL \
96 | OPTION_MASK_VSX \
97 | OPTION_MASK_VSX_TIMODE)
99 #endif
101 /* This table occasionally claims that a processor does not support a
102 particular feature even though it does, but the feature is slower than the
103 alternative. Thus, it shouldn't be relied on as a complete description of
104 the processor's support.
106 Please keep this list in order, and don't forget to update the documentation
107 in invoke.texi when adding a new processor or flag.
109 Before including this file, define a macro:
111 RS6000_CPU (NAME, CPU, FLAGS)
113 where the arguments are the fields of struct rs6000_ptt. */
115 RS6000_CPU ("401", PROCESSOR_PPC403, MASK_SOFT_FLOAT)
116 RS6000_CPU ("403", PROCESSOR_PPC403, MASK_SOFT_FLOAT | MASK_STRICT_ALIGN)
117 RS6000_CPU ("405", PROCESSOR_PPC405, MASK_SOFT_FLOAT | MASK_MULHW | MASK_DLMZB)
118 RS6000_CPU ("405fp", PROCESSOR_PPC405, MASK_MULHW | MASK_DLMZB)
119 RS6000_CPU ("440", PROCESSOR_PPC440, MASK_SOFT_FLOAT | MASK_MULHW | MASK_DLMZB)
120 RS6000_CPU ("440fp", PROCESSOR_PPC440, MASK_MULHW | MASK_DLMZB)
121 RS6000_CPU ("464", PROCESSOR_PPC440, MASK_SOFT_FLOAT | MASK_MULHW | MASK_DLMZB)
122 RS6000_CPU ("464fp", PROCESSOR_PPC440, MASK_MULHW | MASK_DLMZB)
123 RS6000_CPU ("476", PROCESSOR_PPC476,
124 MASK_SOFT_FLOAT | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB
125 | MASK_FPRND | MASK_CMPB | MASK_MULHW | MASK_DLMZB)
126 RS6000_CPU ("476fp", PROCESSOR_PPC476,
127 MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND
128 | MASK_CMPB | MASK_MULHW | MASK_DLMZB)
129 RS6000_CPU ("505", PROCESSOR_MPCCORE, 0)
130 RS6000_CPU ("601", PROCESSOR_PPC601, MASK_MULTIPLE | MASK_STRING)
131 RS6000_CPU ("602", PROCESSOR_PPC603, MASK_PPC_GFXOPT)
132 RS6000_CPU ("603", PROCESSOR_PPC603, MASK_PPC_GFXOPT)
133 RS6000_CPU ("603e", PROCESSOR_PPC603, MASK_PPC_GFXOPT)
134 RS6000_CPU ("604", PROCESSOR_PPC604, MASK_PPC_GFXOPT)
135 RS6000_CPU ("604e", PROCESSOR_PPC604e, MASK_PPC_GFXOPT)
136 RS6000_CPU ("620", PROCESSOR_PPC620, MASK_PPC_GFXOPT | MASK_POWERPC64)
137 RS6000_CPU ("630", PROCESSOR_PPC630, MASK_PPC_GFXOPT | MASK_POWERPC64)
138 RS6000_CPU ("740", PROCESSOR_PPC750, MASK_PPC_GFXOPT)
139 RS6000_CPU ("7400", PROCESSOR_PPC7400, POWERPC_7400_MASK)
140 RS6000_CPU ("7450", PROCESSOR_PPC7450, POWERPC_7400_MASK)
141 RS6000_CPU ("750", PROCESSOR_PPC750, MASK_PPC_GFXOPT)
142 RS6000_CPU ("801", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT)
143 RS6000_CPU ("821", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT)
144 RS6000_CPU ("823", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT)
145 RS6000_CPU ("8540", PROCESSOR_PPC8540, MASK_STRICT_ALIGN | MASK_ISEL)
146 RS6000_CPU ("8548", PROCESSOR_PPC8548, MASK_STRICT_ALIGN | MASK_ISEL)
147 RS6000_CPU ("a2", PROCESSOR_PPCA2,
148 MASK_PPC_GFXOPT | MASK_POWERPC64 | MASK_POPCNTB | MASK_CMPB
149 | MASK_NO_UPDATE)
150 RS6000_CPU ("e300c2", PROCESSOR_PPCE300C2, MASK_SOFT_FLOAT)
151 RS6000_CPU ("e300c3", PROCESSOR_PPCE300C3, 0)
152 RS6000_CPU ("e500mc", PROCESSOR_PPCE500MC, MASK_PPC_GFXOPT | MASK_ISEL)
153 RS6000_CPU ("e500mc64", PROCESSOR_PPCE500MC64,
154 MASK_POWERPC64 | MASK_PPC_GFXOPT | MASK_ISEL)
155 RS6000_CPU ("e5500", PROCESSOR_PPCE5500,
156 MASK_POWERPC64 | MASK_PPC_GFXOPT | MASK_ISEL)
157 RS6000_CPU ("e6500", PROCESSOR_PPCE6500, POWERPC_7400_MASK | MASK_POWERPC64
158 | MASK_MFCRF | MASK_ISEL)
159 RS6000_CPU ("860", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT)
160 RS6000_CPU ("970", PROCESSOR_POWER4,
161 POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64)
162 RS6000_CPU ("cell", PROCESSOR_CELL,
163 POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64)
164 RS6000_CPU ("ec603e", PROCESSOR_PPC603, MASK_SOFT_FLOAT)
165 RS6000_CPU ("G3", PROCESSOR_PPC750, MASK_PPC_GFXOPT)
166 RS6000_CPU ("G4", PROCESSOR_PPC7450, POWERPC_7400_MASK)
167 RS6000_CPU ("G5", PROCESSOR_POWER4,
168 POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64)
169 RS6000_CPU ("titan", PROCESSOR_TITAN, MASK_MULHW | MASK_DLMZB)
170 RS6000_CPU ("power3", PROCESSOR_PPC630, MASK_PPC_GFXOPT | MASK_POWERPC64)
171 RS6000_CPU ("power4", PROCESSOR_POWER4, MASK_POWERPC64 | MASK_PPC_GPOPT
172 | MASK_PPC_GFXOPT | MASK_MFCRF)
173 RS6000_CPU ("power5", PROCESSOR_POWER5, MASK_POWERPC64 | MASK_PPC_GPOPT
174 | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB)
175 RS6000_CPU ("power5+", PROCESSOR_POWER5, MASK_POWERPC64 | MASK_PPC_GPOPT
176 | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND)
177 RS6000_CPU ("power6", PROCESSOR_POWER6, MASK_POWERPC64 | MASK_PPC_GPOPT
178 | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND
179 | MASK_CMPB | MASK_DFP | MASK_RECIP_PRECISION)
180 RS6000_CPU ("power6x", PROCESSOR_POWER6, MASK_POWERPC64 | MASK_PPC_GPOPT
181 | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND
182 | MASK_CMPB | MASK_DFP | MASK_MFPGPR | MASK_RECIP_PRECISION)
183 RS6000_CPU ("power7", PROCESSOR_POWER7, /* Don't add MASK_ISEL by default */
184 POWERPC_7400_MASK | MASK_POWERPC64 | MASK_PPC_GPOPT | MASK_MFCRF
185 | MASK_POPCNTB | MASK_FPRND | MASK_CMPB | MASK_DFP | MASK_POPCNTD
186 | MASK_VSX | MASK_RECIP_PRECISION)
187 RS6000_CPU ("power8", PROCESSOR_POWER8, MASK_POWERPC64 | ISA_2_7_MASKS_SERVER)
188 RS6000_CPU ("powerpc", PROCESSOR_POWERPC, 0)
189 RS6000_CPU ("powerpc64", PROCESSOR_POWERPC64, MASK_PPC_GFXOPT | MASK_POWERPC64)
190 RS6000_CPU ("rs64", PROCESSOR_RS64A, MASK_PPC_GFXOPT | MASK_POWERPC64)