annotate gcc/config/rs6000/aix71.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Definitions of target machine for GNU compiler,
kono
parents:
diff changeset
2 for IBM RS/6000 POWER running AIX V7.1.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
3 Copyright (C) 2002-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
4 Contributed by David Edelsohn (edelsohn@gnu.org).
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 This file is part of GCC.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
9 under the terms of the GNU General Public License as published
kono
parents:
diff changeset
10 by the Free Software Foundation; either version 3, or (at your
kono
parents:
diff changeset
11 option) any later version.
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
16 License for more details.
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
19 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
20 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 /* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
kono
parents:
diff changeset
23 get control in TARGET_OPTION_OVERRIDE. */
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 #define SUBTARGET_OVERRIDE_OPTIONS \
kono
parents:
diff changeset
26 do { \
kono
parents:
diff changeset
27 if (TARGET_64BIT && ! TARGET_POWERPC64) \
kono
parents:
diff changeset
28 { \
kono
parents:
diff changeset
29 rs6000_isa_flags |= OPTION_MASK_POWERPC64; \
kono
parents:
diff changeset
30 warning (0, "-maix64 requires PowerPC64 architecture remain enabled"); \
kono
parents:
diff changeset
31 } \
kono
parents:
diff changeset
32 if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128) \
kono
parents:
diff changeset
33 { \
kono
parents:
diff changeset
34 rs6000_long_double_type_size = 64; \
kono
parents:
diff changeset
35 if (global_options_set.x_rs6000_long_double_type_size) \
kono
parents:
diff changeset
36 warning (0, "soft-float and long-double-128 are incompatible"); \
kono
parents:
diff changeset
37 } \
kono
parents:
diff changeset
38 if (TARGET_POWERPC64 && ! TARGET_64BIT) \
kono
parents:
diff changeset
39 { \
kono
parents:
diff changeset
40 error ("-maix64 required: 64-bit computation with 32-bit addressing not yet supported"); \
kono
parents:
diff changeset
41 } \
kono
parents:
diff changeset
42 if ((rs6000_isa_flags_explicit \
kono
parents:
diff changeset
43 & OPTION_MASK_MINIMAL_TOC) != 0) \
kono
parents:
diff changeset
44 { \
kono
parents:
diff changeset
45 if (global_options_set.x_rs6000_current_cmodel \
kono
parents:
diff changeset
46 && rs6000_current_cmodel != CMODEL_SMALL) \
kono
parents:
diff changeset
47 error ("-mcmodel incompatible with other toc options"); \
kono
parents:
diff changeset
48 SET_CMODEL (CMODEL_SMALL); \
kono
parents:
diff changeset
49 } \
kono
parents:
diff changeset
50 if (rs6000_current_cmodel != CMODEL_SMALL) \
kono
parents:
diff changeset
51 { \
kono
parents:
diff changeset
52 TARGET_NO_FP_IN_TOC = 0; \
kono
parents:
diff changeset
53 TARGET_NO_SUM_IN_TOC = 0; \
kono
parents:
diff changeset
54 } \
kono
parents:
diff changeset
55 if (rs6000_current_cmodel == CMODEL_MEDIUM) \
kono
parents:
diff changeset
56 { \
kono
parents:
diff changeset
57 rs6000_current_cmodel = CMODEL_LARGE; \
kono
parents:
diff changeset
58 } \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
59 } while (0)
111
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 #undef ASM_SPEC
kono
parents:
diff changeset
62 #define ASM_SPEC "-u %{maix64:-a64 %{!mcpu*:-mppc64}} %(asm_cpu)"
kono
parents:
diff changeset
63
kono
parents:
diff changeset
64 /* Common ASM definitions used by ASM_SPEC amongst the various targets for
kono
parents:
diff changeset
65 handling -mcpu=xxx switches. There is a parallel list in driver-rs6000.c to
kono
parents:
diff changeset
66 provide the default assembler options if the user uses -mcpu=native, so if
kono
parents:
diff changeset
67 you make changes here, make them there also. */
kono
parents:
diff changeset
68 #undef ASM_CPU_SPEC
kono
parents:
diff changeset
69 #define ASM_CPU_SPEC \
kono
parents:
diff changeset
70 "%{!mcpu*: %{!maix64: \
kono
parents:
diff changeset
71 %{mpowerpc64: -mppc64} \
kono
parents:
diff changeset
72 %{maltivec: -m970} \
kono
parents:
diff changeset
73 %{!maltivec: %{!mpowerpc64: %(asm_default)}}}} \
kono
parents:
diff changeset
74 %{mcpu=native: %(asm_cpu_native)} \
kono
parents:
diff changeset
75 %{mcpu=power3: -m620} \
kono
parents:
diff changeset
76 %{mcpu=power4: -mpwr4} \
kono
parents:
diff changeset
77 %{mcpu=power5: -mpwr5} \
kono
parents:
diff changeset
78 %{mcpu=power5+: -mpwr5x} \
kono
parents:
diff changeset
79 %{mcpu=power6: -mpwr6} \
kono
parents:
diff changeset
80 %{mcpu=power6x: -mpwr6} \
kono
parents:
diff changeset
81 %{mcpu=power7: -mpwr7} \
kono
parents:
diff changeset
82 %{mcpu=power8: -mpwr8} \
kono
parents:
diff changeset
83 %{mcpu=power9: -mpwr9} \
kono
parents:
diff changeset
84 %{mcpu=powerpc: -mppc} \
kono
parents:
diff changeset
85 %{mcpu=rs64a: -mppc} \
kono
parents:
diff changeset
86 %{mcpu=603: -m603} \
kono
parents:
diff changeset
87 %{mcpu=603e: -m603} \
kono
parents:
diff changeset
88 %{mcpu=604: -m604} \
kono
parents:
diff changeset
89 %{mcpu=604e: -m604} \
kono
parents:
diff changeset
90 %{mcpu=620: -m620} \
kono
parents:
diff changeset
91 %{mcpu=630: -m620} \
kono
parents:
diff changeset
92 %{mcpu=970: -m970} \
kono
parents:
diff changeset
93 %{mcpu=G5: -m970} \
kono
parents:
diff changeset
94 %{mvsx: %{!mcpu*: -mpwr6}} \
kono
parents:
diff changeset
95 -many"
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 #undef ASM_DEFAULT_SPEC
kono
parents:
diff changeset
98 #define ASM_DEFAULT_SPEC "-mpwr4"
kono
parents:
diff changeset
99
kono
parents:
diff changeset
100 #undef TARGET_OS_CPP_BUILTINS
kono
parents:
diff changeset
101 #define TARGET_OS_CPP_BUILTINS() \
kono
parents:
diff changeset
102 do \
kono
parents:
diff changeset
103 { \
kono
parents:
diff changeset
104 builtin_define ("_AIX43"); \
kono
parents:
diff changeset
105 builtin_define ("_AIX51"); \
kono
parents:
diff changeset
106 builtin_define ("_AIX52"); \
kono
parents:
diff changeset
107 builtin_define ("_AIX53"); \
kono
parents:
diff changeset
108 builtin_define ("_AIX61"); \
kono
parents:
diff changeset
109 builtin_define ("_AIX71"); \
kono
parents:
diff changeset
110 TARGET_OS_AIX_CPP_BUILTINS (); \
kono
parents:
diff changeset
111 } \
kono
parents:
diff changeset
112 while (0)
kono
parents:
diff changeset
113
kono
parents:
diff changeset
114 #undef CPP_SPEC
kono
parents:
diff changeset
115 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
kono
parents:
diff changeset
116 %{ansi: -D_ANSI_C_SOURCE} \
kono
parents:
diff changeset
117 %{maix64: -D__64BIT__} \
kono
parents:
diff changeset
118 %{mpe: -I%R/usr/lpp/ppe.poe/include} \
kono
parents:
diff changeset
119 %{pthread: -D_THREAD_SAFE}"
kono
parents:
diff changeset
120
kono
parents:
diff changeset
121 /* The GNU C++ standard library requires that these macros be
kono
parents:
diff changeset
122 defined. Synchronize with libstdc++ os_defines.h. */
kono
parents:
diff changeset
123 #undef CPLUSPLUS_CPP_SPEC
kono
parents:
diff changeset
124 #define CPLUSPLUS_CPP_SPEC \
kono
parents:
diff changeset
125 "-D_ALL_SOURCE -D__COMPATMATH__ \
kono
parents:
diff changeset
126 %{maix64: -D__64BIT__} \
kono
parents:
diff changeset
127 %{mpe: -I%R/usr/lpp/ppe.poe/include} \
kono
parents:
diff changeset
128 %{pthread: -D_THREAD_SAFE}"
kono
parents:
diff changeset
129
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
130 #define RS6000_CPU(NAME, CPU, FLAGS)
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
131 #include "rs6000-cpus.def"
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
132 #undef RS6000_CPU
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
133
111
kono
parents:
diff changeset
134 #undef TARGET_DEFAULT
kono
parents:
diff changeset
135 #define TARGET_DEFAULT (MASK_PPC_GPOPT | MASK_PPC_GFXOPT | MASK_MFCRF)
kono
parents:
diff changeset
136
kono
parents:
diff changeset
137 #undef PROCESSOR_DEFAULT
kono
parents:
diff changeset
138 #define PROCESSOR_DEFAULT PROCESSOR_POWER7
kono
parents:
diff changeset
139 #undef PROCESSOR_DEFAULT64
kono
parents:
diff changeset
140 #define PROCESSOR_DEFAULT64 PROCESSOR_POWER7
kono
parents:
diff changeset
141
kono
parents:
diff changeset
142 /* AIX 7.1 kernel and assembler have necessary support for Altivec and VSX. */
kono
parents:
diff changeset
143 #undef OS_MISSING_ALTIVEC
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 /* Define this macro as a C expression for the initializer of an
kono
parents:
diff changeset
146 array of string to tell the driver program which options are
kono
parents:
diff changeset
147 defaults for this target and thus do not need to be handled
kono
parents:
diff changeset
148 specially when using `MULTILIB_OPTIONS'.
kono
parents:
diff changeset
149
kono
parents:
diff changeset
150 Do not define this macro if `MULTILIB_OPTIONS' is not defined in
kono
parents:
diff changeset
151 the target makefile fragment or if none of the options listed in
kono
parents:
diff changeset
152 `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
kono
parents:
diff changeset
153
kono
parents:
diff changeset
154 #undef MULTILIB_DEFAULTS
kono
parents:
diff changeset
155
kono
parents:
diff changeset
156 #undef LIB_SPEC
kono
parents:
diff changeset
157 #define LIB_SPEC "%{pg:-L%R/lib/profiled -L%R/usr/lib/profiled}\
kono
parents:
diff changeset
158 %{p:-L%R/lib/profiled -L%R/usr/lib/profiled}\
kono
parents:
diff changeset
159 %{!maix64:%{!shared:%{g*:-lg}}}\
kono
parents:
diff changeset
160 %{fprofile-arcs|fprofile-generate*|coverage:-lpthreads}\
kono
parents:
diff changeset
161 %{mpe:-L%R/usr/lpp/ppe.poe/lib -lmpi -lvtd}\
kono
parents:
diff changeset
162 %{pthread:-lpthreads} -lc"
kono
parents:
diff changeset
163
kono
parents:
diff changeset
164 #undef LINK_SPEC
kono
parents:
diff changeset
165 #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro}\
kono
parents:
diff changeset
166 %{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\
kono
parents:
diff changeset
167 %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}\
kono
parents:
diff changeset
168 %{mpe:-binitfini:poe_remote_main}"
kono
parents:
diff changeset
169
kono
parents:
diff changeset
170 #undef STARTFILE_SPEC
kono
parents:
diff changeset
171 #define STARTFILE_SPEC "%{!shared:\
kono
parents:
diff changeset
172 %{maix64:%{pg:gcrt0_64%O%s;:%{p:mcrt0_64%O%s;:crt0_64%O%s}};:\
kono
parents:
diff changeset
173 %{pthread:%{pg:gcrt0_r%O%s;:%{p:mcrt0_r%O%s;:crt0_r%O%s}};:\
kono
parents:
diff changeset
174 %{pg:gcrt0%O%s;:%{p:mcrt0%O%s;:crt0%O%s}}}}}\
kono
parents:
diff changeset
175 %{shared:crtcxa_s%O%s;:crtcxa%O%s} crtdbase%O%s"
kono
parents:
diff changeset
176
kono
parents:
diff changeset
177 /* AIX V5 typedefs ptrdiff_t as "long" while earlier releases used "int". */
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 #undef PTRDIFF_TYPE
kono
parents:
diff changeset
180 #define PTRDIFF_TYPE "long int"
kono
parents:
diff changeset
181
kono
parents:
diff changeset
182 /* Type used for wchar_t, as a string used in a declaration. */
kono
parents:
diff changeset
183 #undef WCHAR_TYPE
kono
parents:
diff changeset
184 #define WCHAR_TYPE (!TARGET_64BIT ? "short unsigned int" : "unsigned int")
kono
parents:
diff changeset
185
kono
parents:
diff changeset
186 /* Width of wchar_t in bits. */
kono
parents:
diff changeset
187 #undef WCHAR_TYPE_SIZE
kono
parents:
diff changeset
188 #define WCHAR_TYPE_SIZE (!TARGET_64BIT ? 16 : 32)
kono
parents:
diff changeset
189
kono
parents:
diff changeset
190 /* AIX 4.2 and above provides initialization and finalization function
kono
parents:
diff changeset
191 support from linker command line. */
kono
parents:
diff changeset
192 #undef HAS_INIT_SECTION
kono
parents:
diff changeset
193 #define HAS_INIT_SECTION
kono
parents:
diff changeset
194
kono
parents:
diff changeset
195 #undef LD_INIT_SWITCH
kono
parents:
diff changeset
196 #define LD_INIT_SWITCH "-binitfini"
kono
parents:
diff changeset
197
kono
parents:
diff changeset
198 #ifndef _AIX52
kono
parents:
diff changeset
199 extern long long int atoll(const char *);
kono
parents:
diff changeset
200 #endif
kono
parents:
diff changeset
201
kono
parents:
diff changeset
202 /* This target uses the aix64.opt file. */
kono
parents:
diff changeset
203 #define TARGET_USES_AIX64_OPT 1
kono
parents:
diff changeset
204
kono
parents:
diff changeset
205 /* Large TOC Support */
kono
parents:
diff changeset
206 #ifdef HAVE_LD_LARGE_TOC
kono
parents:
diff changeset
207 #undef TARGET_CMODEL
kono
parents:
diff changeset
208 #define TARGET_CMODEL rs6000_current_cmodel
kono
parents:
diff changeset
209 #define SET_CMODEL(opt) rs6000_current_cmodel = opt
kono
parents:
diff changeset
210 #else
kono
parents:
diff changeset
211 #define SET_CMODEL(opt) do {} while (0)
kono
parents:
diff changeset
212 #endif
kono
parents:
diff changeset
213
kono
parents:
diff changeset
214 /* This target defines SUPPORTS_WEAK and TARGET_ASM_NAMED_SECTION,
kono
parents:
diff changeset
215 but does not have crtbegin/end. */
kono
parents:
diff changeset
216
kono
parents:
diff changeset
217 #define TARGET_AIX_VERSION 71
kono
parents:
diff changeset
218
kono
parents:
diff changeset
219 /* AIX 7.1 supports DWARF3 debugging, but XCOFF remains the default. */
kono
parents:
diff changeset
220 #define DWARF2_DEBUGGING_INFO 1
kono
parents:
diff changeset
221 #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
kono
parents:
diff changeset
222 #define DEBUG_INFO_SECTION "0x10000"
kono
parents:
diff changeset
223 #define DEBUG_LINE_SECTION "0x20000"
kono
parents:
diff changeset
224 #define DEBUG_PUBNAMES_SECTION "0x30000"
kono
parents:
diff changeset
225 #define DEBUG_PUBTYPES_SECTION "0x40000"
kono
parents:
diff changeset
226 #define DEBUG_ARANGES_SECTION "0x50000"
kono
parents:
diff changeset
227 #define DEBUG_ABBREV_SECTION "0x60000"
kono
parents:
diff changeset
228 #define DEBUG_STR_SECTION "0x70000"
kono
parents:
diff changeset
229 #define DEBUG_RANGES_SECTION "0x80000"
kono
parents:
diff changeset
230 #define DEBUG_LOC_SECTION "0x90000"
kono
parents:
diff changeset
231 #define DEBUG_FRAME_SECTION "0xA0000"
kono
parents:
diff changeset
232 #define DEBUG_MACINFO_SECTION "0xB0000"
kono
parents:
diff changeset
233 #define DEBUG_MACRO_SECTION "0xB0000"
kono
parents:
diff changeset
234