annotate gcc/config/rs6000/aix.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
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* Definitions of target machine for GNU compiler,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 for IBM RS/6000 POWER running AIX.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
3 Copyright (C) 2000-2018 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify it
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 under the terms of the GNU General Public License as published
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 by the Free Software Foundation; either version 3, or (at your
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 option) any later version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful, but WITHOUT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 License for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 /* Yes! We are AIX! */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 #define DEFAULT_ABI ABI_AIX
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 #undef TARGET_AIX
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 #define TARGET_AIX 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
26 /* System headers are not C++-aware. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
27 #define SYSTEM_IMPLICIT_EXTERN_C 1
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
28
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
29 /* Linux64.h wants to redefine TARGET_AIX based on -m64, but it can't be used
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
30 in the #if conditional in options-default.h, so provide another macro. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
31 #undef TARGET_AIX_OS
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
32 #define TARGET_AIX_OS 1
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
33
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 /* AIX always has a TOC. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 #define TARGET_NO_TOC 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 #define TARGET_TOC 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 #define FIXED_R2 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 /* AIX allows r13 to be used in 32-bit mode. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 #define FIXED_R13 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 /* 32-bit and 64-bit AIX stack boundary is 128. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 #undef STACK_BOUNDARY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 #define STACK_BOUNDARY 128
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
111
kono
parents: 67
diff changeset
46 /* Offset within stack frame to start allocating local variables at.
kono
parents: 67
diff changeset
47 If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
kono
parents: 67
diff changeset
48 first local allocated. Otherwise, it is the offset to the BEGINNING
kono
parents: 67
diff changeset
49 of the first local allocated.
kono
parents: 67
diff changeset
50
kono
parents: 67
diff changeset
51 On the RS/6000, the frame pointer is the same as the stack pointer,
kono
parents: 67
diff changeset
52 except for dynamic allocations. So we start after the fixed area and
kono
parents: 67
diff changeset
53 outgoing parameter area.
kono
parents: 67
diff changeset
54
kono
parents: 67
diff changeset
55 If the function uses dynamic stack space (CALLS_ALLOCA is set), that
kono
parents: 67
diff changeset
56 space needs to be aligned to STACK_BOUNDARY, i.e. the sum of the
kono
parents: 67
diff changeset
57 sizes of the fixed area and the parameter area must be a multiple of
kono
parents: 67
diff changeset
58 STACK_BOUNDARY. */
kono
parents: 67
diff changeset
59
kono
parents: 67
diff changeset
60 #undef RS6000_STARTING_FRAME_OFFSET
kono
parents: 67
diff changeset
61 #define RS6000_STARTING_FRAME_OFFSET \
kono
parents: 67
diff changeset
62 (cfun->calls_alloca \
kono
parents: 67
diff changeset
63 ? RS6000_ALIGN (crtl->outgoing_args_size + RS6000_SAVE_AREA, 16) \
kono
parents: 67
diff changeset
64 : (RS6000_ALIGN (crtl->outgoing_args_size, 16) + RS6000_SAVE_AREA))
kono
parents: 67
diff changeset
65
kono
parents: 67
diff changeset
66 /* Offset from the stack pointer register to an item dynamically
kono
parents: 67
diff changeset
67 allocated on the stack, e.g., by `alloca'.
kono
parents: 67
diff changeset
68
kono
parents: 67
diff changeset
69 The default value for this macro is `STACK_POINTER_OFFSET' plus the
kono
parents: 67
diff changeset
70 length of the outgoing arguments. The default is correct for most
kono
parents: 67
diff changeset
71 machines. See `function.c' for details.
kono
parents: 67
diff changeset
72
kono
parents: 67
diff changeset
73 This value must be a multiple of STACK_BOUNDARY (hard coded in
kono
parents: 67
diff changeset
74 `emit-rtl.c'). */
kono
parents: 67
diff changeset
75 #undef STACK_DYNAMIC_OFFSET
kono
parents: 67
diff changeset
76 #define STACK_DYNAMIC_OFFSET(FUNDECL) \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
77 RS6000_ALIGN (crtl->outgoing_args_size.to_constant () \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
78 + STACK_POINTER_OFFSET, 16)
111
kono
parents: 67
diff changeset
79
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 #undef TARGET_IEEEQUAD
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 #define TARGET_IEEEQUAD 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82
111
kono
parents: 67
diff changeset
83 #undef TARGET_IEEEQUAD_DEFAULT
kono
parents: 67
diff changeset
84 #define TARGET_IEEEQUAD_DEFAULT 0
kono
parents: 67
diff changeset
85
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 /* The AIX linker will discard static constructors in object files before
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 collect has a chance to see them, so scan the object files directly. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 #define COLLECT_EXPORT_LIST
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89
111
kono
parents: 67
diff changeset
90 /* On AIX, initialisers specified with -binitfini are called in breadth-first
kono
parents: 67
diff changeset
91 order.
kono
parents: 67
diff changeset
92 e.g. if a.out depends on lib1.so, the init function for a.out is called before
kono
parents: 67
diff changeset
93 the init function for lib1.so.
kono
parents: 67
diff changeset
94
kono
parents: 67
diff changeset
95 To ensure global C++ constructors in linked libraries are run before global
kono
parents: 67
diff changeset
96 C++ constructors from the current module, there is additional symbol scanning
kono
parents: 67
diff changeset
97 logic in collect2.
kono
parents: 67
diff changeset
98
kono
parents: 67
diff changeset
99 The global initialiser/finaliser functions are named __GLOBAL_AIXI_{libname}
kono
parents: 67
diff changeset
100 and __GLOBAL_AIXD_{libname} and are exported from each shared library.
kono
parents: 67
diff changeset
101
kono
parents: 67
diff changeset
102 collect2 will detect these symbols when they exist in shared libraries that
kono
parents: 67
diff changeset
103 the current program is being linked against. All such initiliser functions
kono
parents: 67
diff changeset
104 will be called prior to the constructors of the current program, and
kono
parents: 67
diff changeset
105 finaliser functions called after destructors.
kono
parents: 67
diff changeset
106
kono
parents: 67
diff changeset
107 Reference counting generated by collect2 will ensure that constructors are
kono
parents: 67
diff changeset
108 only invoked once in the case of multiple dependencies on a library.
kono
parents: 67
diff changeset
109
kono
parents: 67
diff changeset
110 -binitfini is still used in parallel to this solution.
kono
parents: 67
diff changeset
111 This handles the case where a library is loaded through dlopen(), and also
kono
parents: 67
diff changeset
112 handles the option -blazy.
kono
parents: 67
diff changeset
113 */
kono
parents: 67
diff changeset
114 #define COLLECT_SHARED_INIT_FUNC(STREAM, FUNC) \
kono
parents: 67
diff changeset
115 fprintf ((STREAM), "void %s() {\n\t%s();\n}\n", aix_shared_initname, (FUNC))
kono
parents: 67
diff changeset
116 #define COLLECT_SHARED_FINI_FUNC(STREAM, FUNC) \
kono
parents: 67
diff changeset
117 fprintf ((STREAM), "void %s() {\n\t%s();\n}\n", aix_shared_fininame, (FUNC))
kono
parents: 67
diff changeset
118
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
119 #if HAVE_AS_REF
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
120 /* Issue assembly directives that create a reference to the given DWARF table
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
121 identifier label from the current function section. This is defined to
111
kono
parents: 67
diff changeset
122 ensure we drag frame tables associated with needed function bodies in
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
123 a link with garbage collection activated. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
124 #define ASM_OUTPUT_DWARF_TABLE_REF rs6000_aix_asm_output_dwarf_table_ref
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
125 #endif
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
126
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 /* This is the only version of nm that collect2 can work with. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 #define REAL_NM_FILE_NAME "/usr/ucb/nm"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 #define USER_LABEL_PREFIX ""
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 /* Don't turn -B into -L if the argument specifies a relative file name. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 #define RELATIVE_PREFIX_NOT_LINKDIR
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
134
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 /* Because of the above, we must have gcc search itself to find libgcc.a. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 #define LINK_LIBGCC_SPECIAL_1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 /* Names to predefine in the preprocessor for this target machine. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 #define TARGET_OS_AIX_CPP_BUILTINS() \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 do \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 builtin_define ("_IBMR2"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 builtin_define ("_POWER"); \
111
kono
parents: 67
diff changeset
144 builtin_define ("__unix__"); \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 builtin_define ("_AIX"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 builtin_define ("_AIX32"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 builtin_define ("_AIX41"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 builtin_define ("_LONG_LONG"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 if (TARGET_LONG_DOUBLE_128) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 builtin_define ("__LONGDOUBLE128"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 builtin_assert ("system=unix"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 builtin_assert ("system=aix"); \
111
kono
parents: 67
diff changeset
153 if (TARGET_64BIT) \
kono
parents: 67
diff changeset
154 { \
kono
parents: 67
diff changeset
155 builtin_define ("__PPC__"); \
kono
parents: 67
diff changeset
156 builtin_define ("__PPC64__"); \
kono
parents: 67
diff changeset
157 builtin_define ("__powerpc__"); \
kono
parents: 67
diff changeset
158 builtin_define ("__powerpc64__"); \
kono
parents: 67
diff changeset
159 builtin_assert ("cpu=powerpc64"); \
kono
parents: 67
diff changeset
160 builtin_assert ("machine=powerpc64"); \
kono
parents: 67
diff changeset
161 } \
kono
parents: 67
diff changeset
162 else \
kono
parents: 67
diff changeset
163 { \
kono
parents: 67
diff changeset
164 builtin_define ("__PPC__"); \
kono
parents: 67
diff changeset
165 builtin_define ("__powerpc__"); \
kono
parents: 67
diff changeset
166 builtin_assert ("cpu=powerpc"); \
kono
parents: 67
diff changeset
167 builtin_assert ("machine=powerpc"); \
kono
parents: 67
diff changeset
168 } \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
171
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 /* Define appropriate architecture macros for preprocessor depending on
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 target switches. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 %{ansi: -D_ANSI_C_SOURCE}"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
177
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 #define CC1_SPEC "%(cc1_cpu)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 #undef ASM_DEFAULT_SPEC
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 #define ASM_DEFAULT_SPEC ""
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 /* Tell the assembler to assume that all undefined names are external.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 Don't do this until the fixed IBM assembler is more generally available.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 When this becomes permanently defined, the ASM_OUTPUT_EXTERNAL,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 ASM_OUTPUT_EXTERNAL_LIBCALL, and RS6000_OUTPUT_BASENAME macros will no
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 longer be needed. Also, the extern declaration of mcount in
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 rs6000_xcoff_file_start will no longer be needed. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 /* #define ASM_SPEC "-u %(asm_cpu)" */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
192
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 /* Default location of syscalls.exp under AIX */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
194 #define LINK_SYSCALLS_SPEC "-bI:%R/lib/syscalls.exp"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
195
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 /* Default location of libg.exp under AIX */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
197 #define LINK_LIBG_SPEC "-bexport:%R/usr/lib/libg.exp"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 /* Define the options for the binder: Start text at 512, align all segments
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 to 512 bytes, and warn if there is text relocation.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 The -bhalt:4 option supposedly changes the level at which ld will abort,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 but it also suppresses warnings about multiply defined symbols and is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 used by the AIX cc command. So we use it here.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 -bnodelcsect undoes a poor choice of default relating to multiply-defined
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 csects. See AIX documentation for more information about this.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 -bM:SRE tells the linker that the output file is Shared REusable. Note
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 that to actually build a shared library you will also need to specify an
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 export list with the -Wl,-bE option. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 #define LINK_SPEC "-T512 -H512 %{!r:-btextro} -bhalt:4 -bnodelcsect\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 %{static:-bnso %(link_syscalls) } \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 %{!shared:%{g*: %(link_libg) }} %{shared:-bM:SRE}"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 /* Profiled library versions are used by linking with special directories. */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
218 #define LIB_SPEC "%{pg:-L%R/lib/profiled -L%R/usr/lib/profiled}\
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
219 %{p:-L%R/lib/profiled -L%R/usr/lib/profiled} %{!shared:%{g*:-lg}} -lc"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
220
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 /* Static linking with shared libstdc++ requires libsupc++ as well. */
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
222 #define LIBSTDCXX_STATIC "supc++"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
223
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 /* This now supports a natural alignment mode. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 /* AIX word-aligns FP doubles but doubleword-aligns 64-bit ints. */
111
kono
parents: 67
diff changeset
226 #define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 ((TARGET_ALIGN_NATURAL == 0 \
111
kono
parents: 67
diff changeset
228 && TYPE_MODE (strip_array_types (TYPE)) == DFmode) \
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 ? MIN ((COMPUTED), 32) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 : (COMPUTED))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
232 /* AIX increases natural record alignment to doubleword if the first
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 field is an FP double while the FP fields remain word aligned. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 ((TREE_CODE (STRUCT) == RECORD_TYPE \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
236 || TREE_CODE (STRUCT) == UNION_TYPE \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 || TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 && TARGET_ALIGN_NATURAL == 0 \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 : MAX ((COMPUTED), (SPECIFIED)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
241
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 /* The AIX ABI isn't explicit on whether aggregates smaller than a
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 word/doubleword should be padded upward or downward. One could
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 reasonably assume that they follow the normal rules for structure
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 layout treating the parameter area as any other block of memory,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 then map the reg param area to registers, i.e., pad upward, which
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 is the way IBM Compilers for AIX behave.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 Setting both of the following defines results in this behavior. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 #define AGGREGATE_PADDING_FIXED 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 #define AGGREGATES_PAD_UPWARD_ALWAYS 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
251
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 /* Specify padding for the last element of a block move between
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 registers and memory. FIRST is nonzero if this is the only
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 element. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
255 #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
111
kono
parents: 67
diff changeset
256 (!(FIRST) ? PAD_UPWARD : targetm.calls.function_arg_padding (MODE, TYPE))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
257
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 /* Indicate that jump tables go in the text section. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
259
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
260 #define JUMP_TABLES_IN_TEXT_SECTION 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
261
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
262 /* Define any extra SPECS that the compiler needs to generate. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
263 #undef SUBTARGET_EXTRA_SPECS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
264 #define SUBTARGET_EXTRA_SPECS \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 { "link_syscalls", LINK_SYSCALLS_SPEC }, \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
266 { "link_libg", LINK_LIBG_SPEC }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
267
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 #define PROFILE_HOOK(LABEL) output_profile_hook (LABEL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 /* No version of AIX fully supports AltiVec or 64-bit instructions in
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 32-bit mode. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
272 #define OS_MISSING_POWERPC64 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 #define OS_MISSING_ALTIVEC 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
274
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 /* WINT_TYPE */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 #define WINT_TYPE "int"
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
277
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
278 /* Static stack checking is supported by means of probes. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
279 #define STACK_CHECK_STATIC_BUILTIN 1
111
kono
parents: 67
diff changeset
280
kono
parents: 67
diff changeset
281 /* Use standard DWARF numbering for DWARF debugging information. */
kono
parents: 67
diff changeset
282 #define RS6000_USE_DWARF_NUMBERING
kono
parents: 67
diff changeset
283