OSDN Git Service

See the ChangeLog on the branch for more details.
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / sysv4.h
1 /* Target definitions for GNU compiler for PowerPC running System V.4
2    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
3    Contributed by Cygnus Support.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 #include "rs6000/rs6000.h"
23
24 /* Use the regular svr4 definitions.  */
25
26 #include "svr4.h"
27
28 /* Yes!  We are ELF.  */
29 #define TARGET_OBJECT_FORMAT OBJECT_ELF
30
31 /* Default ABI to compile code for.  */
32 #define DEFAULT_ABI rs6000_current_abi
33
34 /* Default ABI to use.  */
35 #define RS6000_ABI_NAME "sysv"
36
37 /* Override rs6000.h definition.  */
38 #undef  ASM_DEFAULT_SPEC
39 #define ASM_DEFAULT_SPEC "-mppc"
40
41 /* Override rs6000.h definition.  */
42 #undef  CPP_DEFAULT_SPEC
43 #define CPP_DEFAULT_SPEC "-D_ARCH_PPC"
44
45 /* Small data support types.  */
46 enum rs6000_sdata_type {
47   SDATA_NONE,                   /* No small data support.  */
48   SDATA_DATA,                   /* Just put data in .sbss/.sdata, don't use relocs.  */
49   SDATA_SYSV,                   /* Use r13 to point to .sdata/.sbss.  */
50   SDATA_EABI                    /* Use r13 like above, r2 points to .sdata2/.sbss2.  */
51 };
52
53 extern enum rs6000_sdata_type rs6000_sdata;
54
55 /* V.4/eabi switches.  */
56 #define MASK_NO_BITFIELD_TYPE   0x40000000      /* Set PCC_BITFIELD_TYPE_MATTERS to 0.  */
57 #define MASK_STRICT_ALIGN       0x20000000      /* Set STRICT_ALIGNMENT to 1.  */
58 #define MASK_RELOCATABLE        0x10000000      /* GOT pointers are PC relative.  */
59 #define MASK_EABI               0x08000000      /* Adhere to eabi, not System V spec.  */
60 #define MASK_LITTLE_ENDIAN      0x04000000      /* Target is little endian.  */
61 #define MASK_REGNAMES           0x02000000      /* Use alternate register names.  */
62 #define MASK_PROTOTYPE          0x01000000      /* Only prototyped fcns pass variable args.  */
63
64 #define TARGET_NO_BITFIELD_TYPE (target_flags & MASK_NO_BITFIELD_TYPE)
65 #define TARGET_STRICT_ALIGN     (target_flags & MASK_STRICT_ALIGN)
66 #define TARGET_RELOCATABLE      (target_flags & MASK_RELOCATABLE)
67 #define TARGET_EABI             (target_flags & MASK_EABI)
68 #define TARGET_LITTLE_ENDIAN    (target_flags & MASK_LITTLE_ENDIAN)
69 #define TARGET_REGNAMES         (target_flags & MASK_REGNAMES)
70 #define TARGET_PROTOTYPE        (target_flags & MASK_PROTOTYPE)
71 #define TARGET_TOC              ((target_flags & MASK_64BIT)            \
72                                  || ((target_flags & (MASK_RELOCATABLE  \
73                                                       | MASK_MINIMAL_TOC)) \
74                                      && flag_pic > 1)                   \
75                                  || DEFAULT_ABI == ABI_AIX)
76
77 #define TARGET_BITFIELD_TYPE    (! TARGET_NO_BITFIELD_TYPE)
78 #define TARGET_BIG_ENDIAN       (! TARGET_LITTLE_ENDIAN)
79 #define TARGET_NO_PROTOTYPE     (! TARGET_PROTOTYPE)
80 #define TARGET_NO_TOC           (! TARGET_TOC)
81 #define TARGET_NO_EABI          (! TARGET_EABI)
82
83 /* Strings provided by SUBTARGET_OPTIONS */
84 extern const char *rs6000_abi_name;
85 extern const char *rs6000_sdata_name;
86
87 /* Override rs6000.h definition.  */
88 #undef  SUBTARGET_OPTIONS
89 #define SUBTARGET_OPTIONS                                               \
90   { "call-",  &rs6000_abi_name, "Select ABI calling convention." },                     \
91   { "sdata=", &rs6000_sdata_name, "Select method for sdata handling." }
92
93 /* Max # of bytes for variables to automatically be put into the .sdata
94    or .sdata2 sections.  */
95 extern int g_switch_value;              /* Value of the -G xx switch.  */
96 extern int g_switch_set;                /* Whether -G xx was passed.  */
97
98 #define SDATA_DEFAULT_SIZE 8
99
100 /* Note, V.4 no longer uses a normal TOC, so make -mfull-toc, be just
101    the same as -mminimal-toc.  */
102 /* Override rs6000.h definition.  */
103 #undef  SUBTARGET_SWITCHES
104 #define SUBTARGET_SWITCHES                                              \
105   { "bit-align",        -MASK_NO_BITFIELD_TYPE, "Align to the base type of the bitfield." },\
106   { "no-bit-align",      MASK_NO_BITFIELD_TYPE, "Don't align to the base type of the bitfield." },\
107   { "strict-align",      MASK_STRICT_ALIGN, "Don't assume that unaligned accesses are handled by the system" },\
108   { "no-strict-align",  -MASK_STRICT_ALIGN, "Assume that unaligned accesses are handled by the system" },\
109   { "relocatable",       MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC, "Produce code relocatable at runtime." },\
110   { "no-relocatable",   -MASK_RELOCATABLE, "Don't produce code relocatable at runtime." },\
111   { "relocatable-lib",   MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC, "Produce code relocatable at runtime." },\
112   { "no-relocatable-lib", -MASK_RELOCATABLE, "Don't produce code relocatable at runtime." },\
113   { "little-endian",     MASK_LITTLE_ENDIAN, "Produce little endian code." },   \
114   { "little",            MASK_LITTLE_ENDIAN, "Produce little endian code." },   \
115   { "big-endian",       -MASK_LITTLE_ENDIAN, "Produce big endian code." },      \
116   { "big",              -MASK_LITTLE_ENDIAN, "Produce big endian code." },      \
117   { "no-toc",            0, "no description yet" },                             \
118   { "toc",               MASK_MINIMAL_TOC, "no description yet" },              \
119   { "full-toc",          MASK_MINIMAL_TOC, "no description yet" },              \
120   { "prototype",         MASK_PROTOTYPE, "no description yet" },                \
121   { "no-prototype",     -MASK_PROTOTYPE, "no description yet" },                \
122   { "no-traceback",      0, "no description yet" },                             \
123   { "eabi",              MASK_EABI, "Use EABI." },                              \
124   { "no-eabi",          -MASK_EABI, "Don't use EABI." },                        \
125   { "regnames",           MASK_REGNAMES, "Use alternate register names." },     \
126   { "no-regnames",       -MASK_REGNAMES, "Don't use alternate register names." },\
127   { "sdata",             0, "no description yet" },                             \
128   { "no-sdata",          0, "no description yet" },                             \
129   { "sim",               0, "Link with libsim.a, libc.a and sim-crt0.o." },     \
130   { "ads",               0, "Link with libads.a, libc.a and crt0.o." },         \
131   { "yellowknife",       0, "Link with libyk.a, libc.a and crt0.o." },          \
132   { "mvme",              0, "Link with libmvme.a, libc.a and crt0.o." },        \
133   { "emb",               0, "Set the PPC_EMB bit in the ELF flags header" },    \
134   { "vxworks",           0, "no description yet" },                             \
135   { "solaris-cclib",     0, "no description yet" },                             \
136   { "shlib",             0, "no description yet" },                             \
137   EXTRA_SUBTARGET_SWITCHES                                                      \
138   { "newlib",            0, "no description yet" },
139
140 /* This is meant to be redefined in the host dependent files.  */
141 #define EXTRA_SUBTARGET_SWITCHES
142
143 /* Sometimes certain combinations of command options do not make sense
144    on a particular target machine.  You can define a macro
145    `OVERRIDE_OPTIONS' to take account of this.  This macro, if
146    defined, is executed once just after all the command options have
147    been parsed.
148
149    The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
150    get control.  */
151
152 #define SUBTARGET_OVERRIDE_OPTIONS                                      \
153 do {                                                                    \
154   if (!g_switch_set)                                                    \
155     g_switch_value = SDATA_DEFAULT_SIZE;                                \
156                                                                         \
157   if (!strcmp (rs6000_abi_name, "sysv"))                                \
158     rs6000_current_abi = ABI_V4;                                        \
159   else if (!strcmp (rs6000_abi_name, "sysv-noeabi"))                    \
160     {                                                                   \
161       rs6000_current_abi = ABI_V4;                                      \
162       target_flags &= ~ MASK_EABI;                                      \
163     }                                                                   \
164   else if (!strcmp (rs6000_abi_name, "sysv-eabi")                       \
165            || !strcmp (rs6000_abi_name, "eabi"))                        \
166     {                                                                   \
167       rs6000_current_abi = ABI_V4;                                      \
168       target_flags |= MASK_EABI;                                        \
169     }                                                                   \
170   else if (!strcmp (rs6000_abi_name, "aix"))                            \
171     {                                                                   \
172       rs6000_current_abi = ABI_AIX_NODESC;                              \
173       target_flags |= MASK_EABI;                                        \
174     }                                                                   \
175   else if (!strcmp (rs6000_abi_name, "aixdesc"))                        \
176     rs6000_current_abi = ABI_AIX;                                       \
177   else if (!strcmp (rs6000_abi_name, "linux"))                          \
178     rs6000_current_abi = ABI_V4;                                        \
179   else if (!strcmp (rs6000_abi_name, "solaris"))                        \
180     rs6000_current_abi = ABI_SOLARIS;                                   \
181   else                                                                  \
182     {                                                                   \
183       rs6000_current_abi = ABI_V4;                                      \
184       error ("Bad value for -mcall-%s", rs6000_abi_name);               \
185     }                                                                   \
186                                                                         \
187   if (rs6000_sdata_name)                                                \
188     {                                                                   \
189       if (!strcmp (rs6000_sdata_name, "none"))                          \
190         rs6000_sdata = SDATA_NONE;                                      \
191       else if (!strcmp (rs6000_sdata_name, "data"))                     \
192         rs6000_sdata = SDATA_DATA;                                      \
193       else if (!strcmp (rs6000_sdata_name, "default"))                  \
194         rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV;         \
195       else if (!strcmp (rs6000_sdata_name, "sysv"))                     \
196         rs6000_sdata = SDATA_SYSV;                                      \
197       else if (!strcmp (rs6000_sdata_name, "eabi"))                     \
198         rs6000_sdata = SDATA_EABI;                                      \
199       else                                                              \
200         error ("Bad value for -msdata=%s", rs6000_sdata_name);          \
201     }                                                                   \
202   else if (DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)         \
203     {                                                                   \
204       rs6000_sdata = SDATA_DATA;                                        \
205       rs6000_sdata_name = "data";                                       \
206     }                                                                   \
207   else                                                                  \
208     {                                                                   \
209       rs6000_sdata = SDATA_NONE;                                        \
210       rs6000_sdata_name = "none";                                       \
211     }                                                                   \
212                                                                         \
213   if (TARGET_RELOCATABLE &&                                             \
214       (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV))       \
215     {                                                                   \
216       rs6000_sdata = SDATA_DATA;                                        \
217       error ("-mrelocatable and -msdata=%s are incompatible.",          \
218              rs6000_sdata_name);                                        \
219     }                                                                   \
220                                                                         \
221   else if (flag_pic &&                                                  \
222            (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV))  \
223     {                                                                   \
224       rs6000_sdata = SDATA_DATA;                                        \
225       error ("-f%s and -msdata=%s are incompatible.",                   \
226              (flag_pic > 1) ? "PIC" : "pic",                            \
227              rs6000_sdata_name);                                        \
228     }                                                                   \
229                                                                         \
230   if (rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4               \
231       && DEFAULT_ABI != ABI_SOLARIS)                                    \
232     {                                                                   \
233       rs6000_sdata = SDATA_NONE;                                        \
234       error ("-msdata=%s and -mcall-%s are incompatible.",              \
235              rs6000_sdata_name, rs6000_abi_name);                       \
236     }                                                                   \
237                                                                         \
238   if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC)                        \
239     {                                                                   \
240       target_flags |= MASK_MINIMAL_TOC;                                 \
241       error ("-mrelocatable and -mno-minimal-toc are incompatible.");   \
242     }                                                                   \
243                                                                         \
244   if (TARGET_RELOCATABLE && rs6000_current_abi == ABI_AIX)              \
245     {                                                                   \
246       target_flags &= ~MASK_RELOCATABLE;                                \
247       error ("-mrelocatable and -mcall-%s are incompatible.",           \
248              rs6000_abi_name);                                          \
249     }                                                                   \
250                                                                         \
251   if (flag_pic > 1 && rs6000_current_abi == ABI_AIX)                    \
252     {                                                                   \
253       flag_pic = 0;                                                     \
254       error ("-fPIC and -mcall-%s are incompatible.",                   \
255              rs6000_abi_name);                                          \
256     }                                                                   \
257                                                                         \
258   if (rs6000_current_abi == ABI_AIX && TARGET_LITTLE_ENDIAN)            \
259     {                                                                   \
260       target_flags &= ~MASK_LITTLE_ENDIAN;                              \
261       error ("-mcall-aixdesc must be big endian");                      \
262     }                                                                   \
263                                                                         \
264   /* Treat -fPIC the same as -mrelocatable.  */                         \
265   if (flag_pic > 1)                                                     \
266     target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC; \
267                                                                         \
268   else if (TARGET_RELOCATABLE)                                          \
269     flag_pic = 2;                                                       \
270                                                                         \
271 } while (0)
272
273
274 /* Override rs6000.h definition.  */
275 #undef  TARGET_DEFAULT
276 #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
277
278 /* Override rs6000.h definition.  */
279 #undef  PROCESSOR_DEFAULT
280 #define PROCESSOR_DEFAULT PROCESSOR_PPC750
281
282 /* System V.4 uses register 13 as a pointer to the small data area,
283    so it is not available to the normal user.  */
284
285 #define FIXED_R13 1
286
287 /* Size of the V.4 varargs area if needed.  */
288 /* Override rs6000.h definition.  */
289 #undef  RS6000_VARARGS_AREA
290 #define RS6000_VARARGS_AREA ((rs6000_sysv_varargs_p) ? RS6000_VARARGS_SIZE : 0)
291
292 /* Override default big endianism definitions in rs6000.h.  */
293 #undef  BYTES_BIG_ENDIAN
294 #undef  WORDS_BIG_ENDIAN
295 #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN)
296 #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN)
297
298 /* Define this to set the endianness to use in libgcc2.c, which can
299    not depend on target_flags.  */
300 #if !defined(_LITTLE_ENDIAN) && !defined(__sun__)
301 #define LIBGCC2_WORDS_BIG_ENDIAN 1
302 #else
303 #define LIBGCC2_WORDS_BIG_ENDIAN 0
304 #endif
305
306 /* Define cutoff for using external functions to save floating point.
307    Currently on V.4, always use inline stores.  */
308 #define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 64)
309
310 /* Put jump tables in read-only memory, rather than in .text.  */
311 #define JUMP_TABLES_IN_TEXT_SECTION 0
312
313 /* Prefix and suffix to use to saving floating point.  */
314 #define SAVE_FP_PREFIX "_savefpr_"
315 #define SAVE_FP_SUFFIX "_l"
316
317 /* Prefix and suffix to use to restoring floating point.  */
318 #define RESTORE_FP_PREFIX "_restfpr_"
319 #define RESTORE_FP_SUFFIX "_l"
320
321 /* Type used for ptrdiff_t, as a string used in a declaration.  */
322 #define PTRDIFF_TYPE "int"
323
324 /* Type used for wchar_t, as a string used in a declaration.  */
325 /* Override svr4.h definition.  */
326 #undef  WCHAR_TYPE
327 #define WCHAR_TYPE "long int"
328
329 /* Width of wchar_t in bits.  */
330 /* Override svr4.h definition.  */
331 #undef  WCHAR_TYPE_SIZE
332 #define WCHAR_TYPE_SIZE 32
333
334 /* Make int foo : 8 not cause structures to be aligned to an int boundary.  */
335 /* Override elfos.h definition.  */
336 #undef  PCC_BITFIELD_TYPE_MATTERS
337 #define PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)
338
339 /* Define this macro to be the value 1 if instructions will fail to
340    work if given data not on the nominal alignment.  If instructions
341    will merely go slower in that case, define this macro as 0.  */
342 #undef  STRICT_ALIGNMENT
343 #define STRICT_ALIGNMENT (TARGET_STRICT_ALIGN)
344
345 /* Alignment in bits of the stack boundary.  Note, in order to allow building
346    one set of libraries with -mno-eabi instead of eabi libraries and non-eabi
347    versions, just use 64 as the stack boundary.  */
348 #undef  STACK_BOUNDARY
349 #define STACK_BOUNDARY  64
350
351 /* Real stack boundary as mandated by the appropriate ABI.  */
352 #define ABI_STACK_BOUNDARY ((TARGET_EABI) ? 64 : 128)
353
354 /* No data type wants to be aligned rounder than this.  */
355 #undef  BIGGEST_ALIGNMENT
356 #define BIGGEST_ALIGNMENT ((TARGET_EABI) ? 64 : 128)
357
358 #undef  BIGGEST_FIELD_ALIGNMENT
359 #undef  ADJUST_FIELD_ALIGN
360 #undef  ROUND_TYPE_ALIGN
361
362 /* Use ELF style section commands.  */
363
364 #define TEXT_SECTION_ASM_OP     "\t.section\t\".text\""
365
366 #define DATA_SECTION_ASM_OP     "\t.section\t\".data\""
367
368 #define BSS_SECTION_ASM_OP      "\t.section\t\".bss\""
369
370 /* Override elfos.h definition.  */
371 #undef  INIT_SECTION_ASM_OP
372 #define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""
373
374 /* Override elfos.h definition.  */
375 #undef  FINI_SECTION_ASM_OP
376 #define FINI_SECTION_ASM_OP "\t.section\t\".fini\",\"ax\""
377
378 #define TOC_SECTION_ASM_OP "\t.section\t\".got\",\"aw\""
379
380 /* Put PC relative got entries in .got2.  */
381 #define MINIMAL_TOC_SECTION_ASM_OP \
382   ((TARGET_RELOCATABLE || flag_pic) ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")
383
384 /* Put relocatable data in .data, not .rodata so initialized pointers can be updated.  */
385 /* Override elfos.h definition.  */
386 #undef  CONST_SECTION_ASM_OP
387 #define CONST_SECTION_ASM_OP \
388   ((TARGET_RELOCATABLE || flag_pic) ? "\t.section\t\".data\"\t# .rodata" : "\t.section\t\".rodata\"")
389
390
391 #define SDATA_SECTION_ASM_OP "\t.section\t\".sdata\",\"aw\""
392 #define SDATA2_SECTION_ASM_OP "\t.section\t\".sdata2\",\"a\""
393 #define SBSS_SECTION_ASM_OP \
394   ((DEFAULT_ABI == ABI_SOLARIS) ? "\t.section\t\".sbss\",\"aw\"" : "\t.section\t\".sbss\",\"aw\",@nobits")
395
396
397 /* Besides the usual ELF sections, we need a toc section.  */
398 /* Override elfos.h definition.  */
399 #undef  EXTRA_SECTIONS
400 #define EXTRA_SECTIONS in_const, in_ctors, in_dtors, in_toc, in_sdata, in_sdata2, in_sbss, in_init, in_fini
401
402 /* Override elfos.h definition.  */
403 #undef  EXTRA_SECTION_FUNCTIONS
404 #define EXTRA_SECTION_FUNCTIONS                                         \
405   CONST_SECTION_FUNCTION                                                \
406   CTORS_SECTION_FUNCTION                                                \
407   DTORS_SECTION_FUNCTION                                                \
408   TOC_SECTION_FUNCTION                                                  \
409   SDATA_SECTION_FUNCTION                                                \
410   SDATA2_SECTION_FUNCTION                                               \
411   SBSS_SECTION_FUNCTION                                                 \
412   INIT_SECTION_FUNCTION                                                 \
413   FINI_SECTION_FUNCTION
414
415 #define TOC_SECTION_FUNCTION                                            \
416 void                                                                    \
417 toc_section ()                                                          \
418 {                                                                       \
419   if (in_section != in_toc)                                             \
420     {                                                                   \
421       in_section = in_toc;                                              \
422       if (DEFAULT_ABI == ABI_AIX                                        \
423           && TARGET_MINIMAL_TOC                                         \
424           && !TARGET_RELOCATABLE)                                       \
425         {                                                               \
426           if (! toc_initialized)                                        \
427             {                                                           \
428               toc_initialized = 1;                                      \
429               fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP);       \
430               ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "LCTOC", 0);     \
431               fprintf (asm_out_file, "\t.tc ");                         \
432               ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1[TC],"); \
433               ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \
434               fprintf (asm_out_file, "\n");                             \
435                                                                         \
436               fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \
437               ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \
438               fprintf (asm_out_file, " = .+32768\n");                   \
439             }                                                           \
440           else                                                          \
441             fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \
442         }                                                               \
443       else if (DEFAULT_ABI == ABI_AIX && !TARGET_RELOCATABLE)           \
444         fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP);             \
445       else                                                              \
446         {                                                               \
447           fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);   \
448           if (! toc_initialized)                                        \
449             {                                                           \
450               ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \
451               fprintf (asm_out_file, " = .+32768\n");                   \
452               toc_initialized = 1;                                      \
453             }                                                           \
454         }                                                               \
455     }                                                                   \
456 }
457
458 #define SDATA_SECTION_FUNCTION                                          \
459 void                                                                    \
460 sdata_section ()                                                        \
461 {                                                                       \
462   if (in_section != in_sdata)                                           \
463     {                                                                   \
464       in_section = in_sdata;                                            \
465       fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP);             \
466     }                                                                   \
467 }
468
469 #define SDATA2_SECTION_FUNCTION                                         \
470 void                                                                    \
471 sdata2_section ()                                                       \
472 {                                                                       \
473   if (in_section != in_sdata2)                                          \
474     {                                                                   \
475       in_section = in_sdata2;                                           \
476       fprintf (asm_out_file, "%s\n", SDATA2_SECTION_ASM_OP);            \
477     }                                                                   \
478 }
479
480 #define SBSS_SECTION_FUNCTION                                           \
481 void                                                                    \
482 sbss_section ()                                                         \
483 {                                                                       \
484   if (in_section != in_sbss)                                            \
485     {                                                                   \
486       in_section = in_sbss;                                             \
487       fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP);              \
488     }                                                                   \
489 }
490
491 #define INIT_SECTION_FUNCTION                                           \
492 void                                                                    \
493 init_section ()                                                         \
494 {                                                                       \
495   if (in_section != in_init)                                            \
496     {                                                                   \
497       in_section = in_init;                                             \
498       fprintf (asm_out_file, "%s\n", INIT_SECTION_ASM_OP);              \
499     }                                                                   \
500 }
501
502 #define FINI_SECTION_FUNCTION                                           \
503 void                                                                    \
504 fini_section ()                                                         \
505 {                                                                       \
506   if (in_section != in_fini)                                            \
507     {                                                                   \
508       in_section = in_fini;                                             \
509       fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP);              \
510     }                                                                   \
511 }
512
513 /* A C statement or statements to switch to the appropriate section
514    for output of RTX in mode MODE.  You can assume that RTX is some
515    kind of constant in RTL.  The argument MODE is redundant except in
516    the case of a `const_int' rtx.  Select the section by calling
517    `text_section' or one of the alternatives for other sections.
518
519    Do not define this macro if you put all constants in the read-only
520    data section.  */
521
522 /* Override elfos.h definition.  */
523 #undef  SELECT_RTX_SECTION
524 #define SELECT_RTX_SECTION(MODE, X) rs6000_select_rtx_section (MODE, X)
525
526 /* A C statement or statements to switch to the appropriate
527    section for output of DECL.  DECL is either a `VAR_DECL' node
528    or a constant of some sort.  RELOC indicates whether forming
529    the initial value of DECL requires link-time relocations.  */
530
531 /* Override elfos.h definition.  */
532 #undef  SELECT_SECTION
533 #define SELECT_SECTION(DECL,RELOC) rs6000_select_section (DECL, RELOC)
534
535 /* Return non-zero if this entry is to be written into the constant pool
536    in a special way.  We do so if this is a SYMBOL_REF, LABEL_REF or a CONST
537    containing one of them.  If -mfp-in-toc (the default), we also do
538    this for floating-point constants.  We actually can only do this
539    if the FP formats of the target and host machines are the same, but
540    we can't check that since not every file that uses
541    GO_IF_LEGITIMATE_ADDRESS_P includes real.h.
542
543    Unlike AIX, we don't key off of -mminimal-toc, but instead do not
544    allow floating point constants in the TOC if -mrelocatable.  */
545
546 #undef  ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
547 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X)                              \
548   (TARGET_TOC                                                           \
549    && (GET_CODE (X) == SYMBOL_REF                                       \
550        || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS      \
551            && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF)           \
552        || GET_CODE (X) == LABEL_REF                                     \
553        || (!TARGET_NO_FP_IN_TOC                                         \
554            && !TARGET_RELOCATABLE                                       \
555            && GET_CODE (X) == CONST_DOUBLE                              \
556            && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT               \
557            && BITS_PER_WORD == HOST_BITS_PER_INT)))
558
559 /* These macros generate the special .type and .size directives which
560    are used to set the corresponding fields of the linker symbol table
561    entries in an ELF object file under SVR4.  These macros also output
562    the starting labels for the relevant functions/objects.  */
563
564 /* Write the extra assembler code needed to declare a function properly.
565    Some svr4 assemblers need to also have something extra said about the
566    function's return value.  We allow for that here.  */
567
568 extern int rs6000_pic_labelno;
569
570 /* Override elfos.h definition.  */
571 #undef  ASM_DECLARE_FUNCTION_NAME
572 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)                     \
573   do {                                                                  \
574     const char *init_ptr = (TARGET_64BIT) ? ".quad" : ".long";          \
575                                                                         \
576     if (TARGET_RELOCATABLE && (get_pool_size () != 0 || profile_flag)   \
577         && uses_TOC())                                                  \
578       {                                                                 \
579         char buf[256];                                                  \
580         const char *buf_ptr;                                            \
581                                                                         \
582         ASM_OUTPUT_INTERNAL_LABEL (FILE, "LCL", rs6000_pic_labelno);    \
583                                                                         \
584         ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1);                  \
585         fprintf (FILE, "\t%s ", init_ptr);                              \
586         assemble_name (FILE, buf);                                      \
587         putc ('-', FILE);                                               \
588         ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno);   \
589         assemble_name (FILE, buf);                                      \
590         putc ('\n', FILE);                                              \
591       }                                                                 \
592                                                                         \
593     fprintf (FILE, "\t%s\t ", TYPE_ASM_OP);                             \
594     assemble_name (FILE, NAME);                                         \
595     putc (',', FILE);                                                   \
596     fprintf (FILE, TYPE_OPERAND_FMT, "function");                       \
597     putc ('\n', FILE);                                                  \
598     ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL));                      \
599                                                                         \
600     if (DEFAULT_ABI == ABI_AIX)                                         \
601       {                                                                 \
602         const char *desc_name, *orig_name;                              \
603                                                                         \
604         STRIP_NAME_ENCODING (orig_name, NAME);                          \
605         desc_name = orig_name;                                          \
606         while (*desc_name == '.')                                       \
607           desc_name++;                                                  \
608                                                                         \
609         if (TREE_PUBLIC (DECL))                                         \
610           fprintf (FILE, "\t.globl %s\n", desc_name);                   \
611                                                                         \
612         fprintf (FILE, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);             \
613         fprintf (FILE, "%s:\n", desc_name);                             \
614         fprintf (FILE, "\t%s %s\n", init_ptr, orig_name);               \
615         fprintf (FILE, "\t%s _GLOBAL_OFFSET_TABLE_\n", init_ptr);       \
616         if (DEFAULT_ABI == ABI_AIX)                                     \
617           fprintf (FILE, "\t%s 0\n", init_ptr);                         \
618         fprintf (FILE, "\t.previous\n");                                \
619       }                                                                 \
620     ASM_OUTPUT_LABEL (FILE, NAME);                                      \
621   } while (0)
622
623 /* A C compound statement that outputs the assembler code for a thunk function,
624     used to implement C++ virtual function calls with multiple inheritance.  The
625     thunk acts as a wrapper around a virtual function, adjusting the implicit
626     object parameter before handing control off to the real function.
627
628     First, emit code to add the integer DELTA to the location that contains the
629     incoming first argument.  Assume that this argument contains a pointer, and
630     is the one used to pass the this' pointer in C++.  This is the incoming
631     argument *before* the function prologue, e.g. %o0' on a sparc.  The
632     addition must preserve the values of all other incoming arguments.
633
634     After the addition, emit code to jump to FUNCTION, which is a
635     FUNCTION_DECL'.  This is a direct pure jump, not a call, and does not touch
636     the return address.  Hence returning from FUNCTION will return to whoever
637     called the current thunk'.
638
639     The effect must be as if FUNCTION had been called directly with the adjusted
640     first argument.  This macro is responsible for emitting all of the code for
641     a thunk function; FUNCTION_PROLOGUE' and FUNCTION_EPILOGUE' are not
642     invoked.
643
644     The THUNK_FNDECL is redundant.  (DELTA and FUNCTION have already been
645     extracted from it.)  It might possibly be useful on some targets, but
646     probably not.
647
648     If you do not define this macro, the target-independent code in the C++
649     frontend will generate a less efficient heavyweight thunk that calls
650     FUNCTION instead of jumping to it.  The generic approach does not support
651     varargs.  */
652
653 #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
654   output_mi_thunk (FILE, THUNK_FNDECL, DELTA, FUNCTION)
655
656 /* How to renumber registers for dbx and gdb.  */
657
658 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
659
660 /* The USER_LABEL_PREFIX stuff is affected by the -fleading-underscore
661    flag.  The LOCAL_LABEL_PREFIX variable is used by dbxelf.h.  */
662
663 #define LOCAL_LABEL_PREFIX "."
664 #define USER_LABEL_PREFIX ""
665
666 /* svr4.h overrides ASM_OUTPUT_INTERNAL_LABEL.  */
667
668 #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX)   \
669   asm_fprintf (FILE, "%L%s", PREFIX)
670
671 #define ASM_OUTPUT_LABEL(FILE,NAME)     \
672   (assemble_name (FILE, NAME), fputs (":\n", FILE))
673
674 /* This is how to output a command to make the user-level label named NAME
675    defined for reference from other files.  */
676
677 #define ASM_GLOBALIZE_LABEL(FILE,NAME)  \
678   do { fputs ("\t.globl ", FILE);       \
679        assemble_name (FILE, NAME); putc ('\n', FILE);} while (0)
680
681 /* This is how to allocate empty space in some section.  Use .space
682    instead of .zero because the Solaris PowerPC assembler doesn't
683    like it, and gas accepts either syntax.  */
684
685 /* Override elfos.h definition.  */
686 #undef  SKIP_ASM_OP
687 #define SKIP_ASM_OP     ".space"
688
689 /* This says how to output assembler code to declare an
690    uninitialized internal linkage data object.  Under SVR4,
691    the linker seems to want the alignment of data objects
692    to depend on their types.  We do exactly that here.  */
693
694 #define LOCAL_ASM_OP    ".local"
695
696 #define LCOMM_ASM_OP    ".lcomm"
697
698 /* Override elfos.h definition.  */
699 #undef  ASM_OUTPUT_ALIGNED_LOCAL
700 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)               \
701 do {                                                                    \
702   if (rs6000_sdata != SDATA_NONE && (SIZE) > 0                          \
703       && (SIZE) <= g_switch_value)                                      \
704     {                                                                   \
705       sbss_section ();                                                  \
706       ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT));      \
707       ASM_OUTPUT_LABEL (FILE, NAME);                                    \
708       ASM_OUTPUT_SKIP (FILE, SIZE);                                     \
709       if (!flag_inhibit_size_directive && (SIZE) > 0)                   \
710         {                                                               \
711           fprintf (FILE, "\t%s\t ", SIZE_ASM_OP);                       \
712           assemble_name (FILE, NAME);                                   \
713           fprintf (FILE, ",%d\n",  SIZE);                               \
714         }                                                               \
715     }                                                                   \
716   else                                                                  \
717     {                                                                   \
718       fprintf (FILE, "\t%s\t", LCOMM_ASM_OP);                           \
719       assemble_name ((FILE), (NAME));                                   \
720       fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT);    \
721     }                                                                   \
722 } while (0)
723
724 /* Describe how to emit uninitialized external linkage items.  */
725 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN)           \
726 do {                                                                    \
727   ASM_GLOBALIZE_LABEL (FILE, NAME);                                     \
728   ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN);                   \
729 } while (0)
730
731 /* Switch  Recognition by gcc.c.  Add -G xx support.  */
732
733 /* Override svr4.h definition.  */
734 #undef  SWITCH_TAKES_ARG
735 #define SWITCH_TAKES_ARG(CHAR)                                          \
736   ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o'                      \
737    || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u'                   \
738    || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x'                   \
739    || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'V'                   \
740    || (CHAR) == 'B' || (CHAR) == 'b' || (CHAR) == 'G')
741
742 /* Output .file.  */
743 /* Override elfos.h definition.  */
744 #undef  ASM_FILE_START
745 #define ASM_FILE_START(FILE)                                            \
746 do {                                                                    \
747   output_file_directive ((FILE), main_input_filename);                  \
748   rs6000_file_start (FILE, TARGET_CPU_DEFAULT);                         \
749 } while (0)
750
751
752 extern int fixuplabelno;
753
754 /* This is how to output an assembler line defining an `int' constant.
755    For -mrelocatable, we mark all addresses that need to be fixed up
756    in the .fixup section.  */
757 /* Override rs6000.h definition.  */
758 #undef  ASM_OUTPUT_INT
759 #define ASM_OUTPUT_INT(FILE,VALUE)                                      \
760 do {                                                                    \
761   static int recurse = 0;                                               \
762   if (TARGET_RELOCATABLE                                                \
763       && in_section != in_toc                                           \
764       && in_section != in_text                                          \
765       && in_section != in_ctors                                         \
766       && in_section != in_dtors                                         \
767       && !recurse                                                       \
768       && GET_CODE (VALUE) != CONST_INT                                  \
769       && GET_CODE (VALUE) != CONST_DOUBLE                               \
770       && CONSTANT_P (VALUE))                                            \
771     {                                                                   \
772       char buf[256];                                                    \
773                                                                         \
774       recurse = 1;                                                      \
775       ASM_GENERATE_INTERNAL_LABEL (buf, "LCP", fixuplabelno);           \
776       fixuplabelno++;                                                   \
777       ASM_OUTPUT_LABEL (FILE, buf);                                     \
778       fprintf (FILE, "\t.long (");                                      \
779       output_addr_const (FILE, (VALUE));                                \
780       fprintf (FILE, ")@fixup\n");                                      \
781       fprintf (FILE, "\t.section\t\".fixup\",\"aw\"\n");                \
782       ASM_OUTPUT_ALIGN (FILE, 2);                                       \
783       fprintf (FILE, "\t.long\t");                                      \
784       assemble_name (FILE, buf);                                        \
785       fprintf (FILE, "\n\t.previous\n");                                \
786       recurse = 0;                                                      \
787     }                                                                   \
788   /* Remove initial .'s to turn a -mcall-aixdesc function               \
789      address into the address of the descriptor, not the function       \
790      itself.  */                                                        \
791   else if (GET_CODE (VALUE) == SYMBOL_REF                               \
792            && XSTR (VALUE, 0)[0] == '.'                                 \
793            && DEFAULT_ABI == ABI_AIX)                                   \
794     {                                                                   \
795       const char *name = XSTR (VALUE, 0);                               \
796       while (*name == '.')                                              \
797         name++;                                                         \
798                                                                         \
799       fprintf (FILE, "\t.long %s\n", name);                             \
800     }                                                                   \
801   else                                                                  \
802     {                                                                   \
803       fprintf (FILE, "\t.long ");                                       \
804       output_addr_const (FILE, (VALUE));                                \
805       fprintf (FILE, "\n");                                             \
806     }                                                                   \
807 } while (0)
808
809 /* This is how to output an assembler line defining an address 
810    constant for the dwarf call unwinding information.
811    For -mrelocatable, we mark all addresses that need to be fixed up
812    in the .fixup section.  */
813
814 #define ASM_OUTPUT_DWARF_ADDR(FILE,LABEL)                               \
815 do {                                                                    \
816   if (TARGET_RELOCATABLE)                                               \
817     {                                                                   \
818       char buf[256];                                                    \
819       const char *p;                                                    \
820                                                                         \
821       ASM_GENERATE_INTERNAL_LABEL (buf, "LCP", fixuplabelno);           \
822       fixuplabelno++;                                                   \
823       ASM_OUTPUT_LABEL (FILE, buf);                                     \
824       fprintf (FILE, "\t.%dbyte\t", POINTER_SIZE / BITS_PER_UNIT);      \
825       assemble_name (FILE, LABEL);                                      \
826       fprintf (FILE, "\n");                                             \
827       fprintf (FILE, "\t.section \".fixup\",\"aw\"\n");                 \
828       ASM_OUTPUT_ALIGN (FILE, 2);                                       \
829       fprintf (FILE, "\t.long\t");                                      \
830       assemble_name (FILE, buf);                                        \
831       fprintf (FILE, "\n\t.previous\n");                                \
832     }                                                                   \
833   else                                                                  \
834     {                                                                   \
835       fprintf (FILE, "\t.%dbyte\t", POINTER_SIZE / BITS_PER_UNIT);      \
836       assemble_name (FILE, LABEL);                                      \
837     }                                                                   \
838 } while (0)
839
840 /* This is the end of what might become sysv4.h.  */
841
842 /* Allow stabs and dwarf, for now, make stabs the default debugging type,
843    not dwarf since G++ doesn't support dwarf.  */
844 #undef  PREFERRED_DEBUGGING_TYPE
845 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
846
847 #define DBX_DEBUGGING_INFO
848
849 /* If we are referencing a function that is static or is known to be
850    in this file, make the SYMBOL_REF special.  We can use this to indicate
851    that we can branch to this function without emitting a no-op after the
852    call.  For real AIX calling sequences, we also replace the
853    function name with the real name (1 or 2 leading .'s), rather than
854    the function descriptor name.  This saves a lot of overriding code
855    to read the prefixes.  */
856
857 #undef  ENCODE_SECTION_INFO
858 #define ENCODE_SECTION_INFO(DECL) rs6000_encode_section_info (DECL)
859
860 /* The ELF version doesn't encode [DS] or whatever at the end of symbols.  */
861
862 #define RS6000_OUTPUT_BASENAME(FILE, NAME)      \
863     assemble_name (FILE, NAME)
864
865 /* This macro gets just the user-specified name
866    out of the string in a SYMBOL_REF.  Discard
867    a leading * or @.  */
868 #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME)                            \
869 do {                                                                    \
870   const char *_name = SYMBOL_NAME;                                      \
871   while (*_name == '*' || *_name == '@')                                \
872     _name++;                                                            \
873   (VAR) = _name;                                                        \
874 } while (0)
875
876 /* This is how to output a reference to a user-level label named NAME.
877    `assemble_name' uses this.  */
878
879 /* Override elfos.h definition.  */
880 #undef  ASM_OUTPUT_LABELREF
881 #define ASM_OUTPUT_LABELREF(FILE,NAME)          \
882 do {                                            \
883   const char *_name = NAME;                     \
884   if (*_name == '@')                            \
885     _name++;                                    \
886                                                 \
887   if (*_name == '*')                            \
888     fprintf (FILE, "%s", _name + 1);            \
889   else                                          \
890     asm_fprintf (FILE, "%U%s", _name);          \
891 } while (0)
892
893 /* Switch into a generic section.
894
895    We make the section read-only and executable for a function decl,
896    read-only for a const data decl, and writable for a non-const data decl.
897
898    If the section has already been defined, we must not
899    emit the attributes here. The SVR4 assembler does not
900    recognize section redefinitions.
901    If DECL is NULL, no attributes are emitted.
902
903    Note, Solaris as doesn't like @nobits, and gas can handle .sbss without
904    needing @nobits.  */
905
906 /* Override elfos.h definition.  */
907 #undef  ASM_OUTPUT_SECTION_NAME
908 #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC)                \
909 do {                                                                    \
910   static struct section_info                                            \
911     {                                                                   \
912       struct section_info *next;                                        \
913       char *name;                                                       \
914       enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type;                \
915     } *sections;                                                        \
916   struct section_info *s;                                               \
917   const char *mode;                                                     \
918   enum sect_enum type;                                                  \
919                                                                         \
920   for (s = sections; s; s = s->next)                                    \
921     if (!strcmp (NAME, s->name))                                        \
922       break;                                                            \
923                                                                         \
924   if (DECL && TREE_CODE (DECL) == FUNCTION_DECL)                        \
925     type = SECT_EXEC, mode = "ax";                                      \
926   else if (DECL && DECL_READONLY_SECTION (DECL, RELOC) && !TARGET_RELOCATABLE && !flag_pic) \
927     type = SECT_RO, mode = "a";                                         \
928   else                                                                  \
929     type = SECT_RW, mode = "aw";                                        \
930                                                                         \
931   if (s == 0)                                                           \
932     {                                                                   \
933       s = (struct section_info *) xmalloc (sizeof (struct section_info));  \
934       s->name = xmalloc ((strlen (NAME) + 1) * sizeof (*NAME));         \
935       strcpy (s->name, NAME);                                           \
936       s->type = type;                                                   \
937       s->next = sections;                                               \
938       sections = s;                                                     \
939       fprintf (FILE, "\t.section\t\"%s\",\"%s\"\n", NAME, mode);        \
940     }                                                                   \
941   else                                                                  \
942     {                                                                   \
943       if (DECL && s->type != type)                                      \
944         error_with_decl (DECL, "%s causes a section type conflict");    \
945                                                                         \
946       fprintf (FILE, "\t.section\t\"%s\"\n", NAME);                     \
947     }                                                                   \
948 } while (0)
949
950 /* Override elfos.h definition.  */
951 #undef  ASM_OUTPUT_CONSTRUCTOR
952 #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)                               \
953   do {                                                                  \
954     if (DEFAULT_ABI != ABI_SOLARIS)                                     \
955       {                                                                 \
956         ctors_section ();                                               \
957         fprintf (FILE, "\t%s\t ", INT_ASM_OP);                          \
958         assemble_name (FILE, NAME);                                     \
959       }                                                                 \
960     else                                                                \
961       {                                                                 \
962         init_section ();                                                \
963         fputs ("\tbl ", FILE);                                          \
964         assemble_name (FILE, NAME);                                     \
965       }                                                                 \
966     fputs ("\n", FILE);                                                 \
967   } while (0)
968
969 /* A C statement (sans semicolon) to output an element in the table of
970    global destructors.  */
971 /* Override elfos.h definition.  */
972 #undef  ASM_OUTPUT_DESTRUCTOR
973 #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)                                \
974   do {                                                                  \
975     if (DEFAULT_ABI != ABI_SOLARIS)                                     \
976       {                                                                 \
977         dtors_section ();                                               \
978         fprintf (FILE, "\t%s\t ", INT_ASM_OP);                          \
979         assemble_name (FILE, NAME);                                     \
980       }                                                                 \
981     else                                                                \
982       {                                                                 \
983         fini_section ();                                                \
984         fputs ("\tbl ", FILE);                                          \
985         assemble_name (FILE, NAME);                                     \
986       }                                                                 \
987     fputs ("\n", FILE);                                                 \
988   } while (0)
989
990 /* But, to make this work, we have to output the stabs for the function
991    name *first*...  */
992
993 #define DBX_FUNCTION_FIRST
994
995 /* This is the end of what might become sysv4dbx.h.  */
996
997 /* Override rs6000.h definition.  */
998 #undef  TARGET_VERSION
999 #define TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)");
1000 \f
1001 #define CPP_PREDEFINES \
1002   "-DPPC -Dunix -D__svr4__ -Asystem(unix) -Asystem(svr4) -Acpu(powerpc) -Amachine(powerpc)"
1003
1004 /* Pass various options to the assembler.  */
1005 /* Override svr4.h definition.  */
1006 #undef  ASM_SPEC
1007 #define ASM_SPEC "%(asm_cpu) \
1008 %{.s: %{mregnames} %{mno-regnames}} %{.S: %{mregnames} %{mno-regnames}} \
1009 %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
1010 %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \
1011 %{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} \
1012 %{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian} \
1013 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
1014     %{mcall-solaris: -mlittle -msolaris} \
1015     %{mcall-linux: -mbig} }}}}"
1016
1017 #define CC1_ENDIAN_BIG_SPEC ""
1018
1019 #define CC1_ENDIAN_LITTLE_SPEC "\
1020 %{!mstrict-align: %{!mno-strict-align: \
1021         -mstrict-align \
1022 }}"
1023
1024 #define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big_spec)"
1025
1026 /* Pass -G xxx to the compiler and set correct endian mode.  */
1027 #define CC1_SPEC "%{G*} \
1028 %{mlittle: %(cc1_endian_little)} %{!mlittle: %{mlittle-endian: %(cc1_endian_little)}} \
1029 %{mbig: %(cc1_endian_big)} %{!mbig: %{mbig-endian: %(cc1_endian_big)}} \
1030 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
1031     %{mcall-aixdesc: -mbig %(cc1_endian_big) } \
1032     %{mcall-solaris: -mlittle %(cc1_endian_little) } \
1033     %{mcall-linux: -mbig %(cc1_endian_big) } \
1034     %{!mcall-aixdesc: %{!mcall-solaris: %{!mcall-linux: \
1035             %(cc1_endian_default) \
1036     }}} \
1037 }}}} \
1038 %{mcall-solaris: -mregnames } \
1039 %{mno-sdata: -msdata=none } \
1040 %{meabi: %{!mcall-*: -mcall-sysv }} \
1041 %{!meabi: %{!mno-eabi: \
1042     %{mrelocatable: -meabi } \
1043     %{mcall-solaris: -mno-eabi } \
1044     %{mcall-linux: -mno-eabi }}} \
1045 %{msdata: -msdata=default} \
1046 %{mno-sdata: -msdata=none} \
1047 %{profile: -p}"
1048
1049 /* Don't put -Y P,<path> for cross compilers.  */
1050 #ifndef CROSS_COMPILE
1051 #define LINK_PATH_SPEC "\
1052 %{!R*:%{L*:-R %*}} \
1053 %{!nostdlib: %{!YP,*: \
1054     %{compat-bsd: \
1055         %{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
1056         %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
1057         %{!R*: %{!L*: -R /usr/ucblib}} \
1058     %{!compat-bsd: \
1059         %{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
1060         %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}}"
1061
1062 #else
1063 #define LINK_PATH_SPEC ""
1064 #endif
1065
1066 /* Default starting address if specified.  */
1067 #define LINK_START_SPEC "\
1068 %{mads: %(link_start_ads) } \
1069 %{myellowknife: %(link_start_yellowknife) } \
1070 %{mmvme: %(link_start_mvme) } \
1071 %{msim: %(link_start_sim) } \
1072 %{mcall-linux: %(link_start_linux) } \
1073 %{mcall-solaris: %(link_start_solaris) } \
1074 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_start_default) }}}}}}"
1075
1076 #define LINK_START_DEFAULT_SPEC ""
1077
1078 /* Override svr4.h definition.  */
1079 #undef  LINK_SPEC
1080 #define LINK_SPEC "\
1081 %{h*} %{v:-V} %{G*} \
1082 %{Wl,*:%*} %{YP,*} %{R*} \
1083 %{Qy:} %{!Qn:-Qy} \
1084 %(link_shlib) \
1085 %{!Ttext*: %(link_start) } \
1086 %(link_target) \
1087 %(link_os)"
1088
1089 /* For now, turn off shared libraries by default.  */
1090 #ifndef SHARED_LIB_SUPPORT
1091 #define NO_SHARED_LIB_SUPPORT
1092 #endif
1093
1094 #ifndef NO_SHARED_LIB_SUPPORT
1095 /* Shared libraries are default.  */
1096 #define LINK_SHLIB_SPEC "\
1097 %{!static: %(link_path) %{!R*:%{L*:-R %*}}} \
1098 %{mshlib: } \
1099 %{static:-dn -Bstatic} \
1100 %{shared:-G -dy -z text} \
1101 %{symbolic:-Bsymbolic -G -dy -z text}"
1102
1103 #else
1104 /* Shared libraries are not default.  */
1105 #define LINK_SHLIB_SPEC "\
1106 %{mshlib: %(link_path) } \
1107 %{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \
1108 %{static: } \
1109 %{shared:-G -dy -z text %(link_path) } \
1110 %{symbolic:-Bsymbolic -G -dy -z text %(link_path) }"
1111 #endif
1112
1113 /* Override the default target of the linker.  */
1114 #define LINK_TARGET_SPEC "\
1115 %{mlittle: -oformat elf32-powerpcle } %{mlittle-endian: -oformat elf32-powerpcle } \
1116 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
1117     %{mcall-solaris: -oformat elf32-powerpcle} \
1118   }}}}"
1119
1120 /* Any specific OS flags.  */
1121 #define LINK_OS_SPEC "\
1122 %{mads: %(link_os_ads) } \
1123 %{myellowknife: %(link_os_yellowknife) } \
1124 %{mmvme: %(link_os_mvme) } \
1125 %{msim: %(link_os_sim) } \
1126 %{mcall-linux: %(link_os_linux) } \
1127 %{mcall-solaris: %(link_os_solaris) } \
1128 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(link_os_default) }}}}}}"
1129
1130 #define LINK_OS_DEFAULT_SPEC ""
1131
1132 #define CPP_SYSV_SPEC \
1133 "%{mrelocatable*: -D_RELOCATABLE} \
1134 %{fpic: -D__PIC__=1 -D__pic__=1} \
1135 %{!fpic: %{fPIC: -D__PIC__=2 -D__pic__=2}} \
1136 %{mcall-sysv: -D_CALL_SYSV} \
1137 %{mcall-aix: -D_CALL_AIX} %{mcall-aixdesc: -D_CALL_AIX -D_CALL_AIXDESC} \
1138 %{!mcall-sysv: %{!mcall-aix: %{!mcall-aixdesc: %(cpp_sysv_default) }}} \
1139 %{msoft-float: -D_SOFT_FLOAT} \
1140 %{!msoft-float: %{!mhard-float: \
1141     %{mcpu=401: -D_SOFT_FLOAT} \
1142     %{mcpu=403: -D_SOFT_FLOAT} \
1143     %{mcpu=ec603e: -D_SOFT_FLOAT} \
1144     %{mcpu=801: -D_SOFT_FLOAT} \
1145     %{mcpu=821: -D_SOFT_FLOAT} \
1146     %{mcpu=823: -D_SOFT_FLOAT} \
1147     %{mcpu=860: -D_SOFT_FLOAT} \
1148     %{!mcpu*: %(cpp_float_default) }}}"
1149
1150 /* Whether floating point is disabled by default.  */
1151 #define CPP_FLOAT_DEFAULT_SPEC ""
1152
1153 #define CPP_SYSV_DEFAULT_SPEC "-D_CALL_SYSV"
1154
1155 #define CPP_ENDIAN_BIG_SPEC "-D_BIG_ENDIAN -D__BIG_ENDIAN__ -Amachine(bigendian)"
1156
1157 #define CPP_ENDIAN_LITTLE_SPEC "-D_LITTLE_ENDIAN -D__LITTLE_ENDIAN__ -Amachine(littleendian)"
1158
1159 #define CPP_ENDIAN_SOLARIS_SPEC "-D__LITTLE_ENDIAN__ -Amachine(littleendian)"
1160
1161 /* For solaris, don't define _LITTLE_ENDIAN, it conflicts with a header file.  */
1162 #define CPP_ENDIAN_SPEC \
1163 "%{mlittle: %(cpp_endian_little) } \
1164 %{mlittle-endian: %(cpp_endian_little) } \
1165 %{mbig: %(cpp_endian_big) } \
1166 %{mbig-endian: %(cpp_endian_big) } \
1167 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
1168     %{mcall-solaris: %(cpp_endian_solaris) } \
1169     %{mcall-linux: %(cpp_endian_big) } \
1170     %{mcall-aixdesc:  %(cpp_endian_big) } \
1171     %{!mcall-solaris: %{!mcall-linux: %{!mcall-aixdesc: %(cpp_endian_default) }}}}}}}"
1172
1173 #define CPP_ENDIAN_DEFAULT_SPEC "%(cpp_endian_big)"
1174
1175 /* Override rs6000.h definition.  */
1176 #undef  CPP_SPEC
1177 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} %(cpp_sysv) %(cpp_endian) %(cpp_cpu) \
1178 %{mads: %(cpp_os_ads) } \
1179 %{myellowknife: %(cpp_os_yellowknife) } \
1180 %{mmvme: %(cpp_os_mvme) } \
1181 %{msim: %(cpp_os_sim) } \
1182 %{mcall-linux: %(cpp_os_linux) } \
1183 %{mcall-solaris: %(cpp_os_solaris) } \
1184 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(cpp_os_default) }}}}}}"
1185
1186 #define CPP_OS_DEFAULT_SPEC ""
1187
1188 /* Override svr4.h definition.  */
1189 #undef  STARTFILE_SPEC
1190 #define STARTFILE_SPEC "\
1191 %{mads: %(startfile_ads) } \
1192 %{myellowknife: %(startfile_yellowknife) } \
1193 %{mmvme: %(startfile_mvme) } \
1194 %{msim: %(startfile_sim) } \
1195 %{mcall-linux: %(startfile_linux) } \
1196 %{mcall-solaris: %(startfile_solaris) } \
1197 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(startfile_default) }}}}}}"
1198
1199 #define STARTFILE_DEFAULT_SPEC ""
1200
1201 /* Override svr4.h definition.  */
1202 #undef  LIB_SPEC
1203 #define LIB_SPEC "\
1204 %{mads: %(lib_ads) } \
1205 %{myellowknife: %(lib_yellowknife) } \
1206 %{mmvme: %(lib_mvme) } \
1207 %{msim: %(lib_sim) } \
1208 %{mcall-linux: %(lib_linux) } \
1209 %{mcall-solaris: %(lib_solaris) } \
1210 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %(lib_default) }}}}}}"
1211
1212 /* Override rs6000.h definition.  */
1213 #undef  LIBGCC_SPEC
1214 #define LIBGCC_SPEC "libgcc.a%s"
1215
1216 #define LIB_DEFAULT_SPEC ""
1217
1218 /* Override svr4.h definition.  */
1219 #undef  ENDFILE_SPEC
1220 #define ENDFILE_SPEC "\
1221 %{mads: ecrtn.o%s} \
1222 %{myellowknife: ecrtn.o%s} \
1223 %{mmvme: ecrtn.o%s} \
1224 %{msim: ecrtn.o%s} \
1225 %{mcall-linux: %(endfile_linux) } \
1226 %{mcall-solaris: scrtn.o%s} \
1227 %{mvxworks: %(endfile_vxworks) } \
1228 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mcall-linux: %{!mcall-solaris: %{!mvxworks: %(endfile_default) }}}}}}}"
1229
1230 #define ENDFILE_DEFAULT_SPEC ""
1231
1232 /* Motorola ADS support.  */
1233 #define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
1234
1235 #define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s"
1236
1237 #define ENDFILE_ADS_SPEC "ecrtn.o%s"
1238
1239 #define LINK_START_ADS_SPEC "-T ads.ld%s"
1240
1241 #define LINK_OS_ADS_SPEC ""
1242
1243 #define CPP_OS_ADS_SPEC ""
1244
1245 /* Motorola Yellowknife support.  */
1246 #define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
1247
1248 #define STARTFILE_YELLOWKNIFE_SPEC "ecrti.o%s crt0.o%s"
1249
1250 #define ENDFILE_YELLOWKNIFE_SPEC "ecrtn.o%s"
1251
1252 #define LINK_START_YELLOWKNIFE_SPEC "-T yellowknife.ld%s"
1253
1254 #define LINK_OS_YELLOWKNIFE_SPEC ""
1255
1256 #define CPP_OS_YELLOWKNIFE_SPEC ""
1257
1258 /* Motorola MVME support.  */
1259 #define LIB_MVME_SPEC "--start-group -lmvme -lc --end-group"
1260
1261 #define STARTFILE_MVME_SPEC "ecrti.o%s crt0.o%s"
1262
1263 #define ENDFILE_MVME_SPEC "ecrtn.o%s"
1264
1265 #define LINK_START_MVME_SPEC "%{!Wl,-T*: %{!T*: -Ttext 0x40000}}"
1266
1267 #define LINK_OS_MVME_SPEC ""
1268
1269 #define CPP_OS_MVME_SPEC ""
1270
1271 /* PowerPC simulator based on netbsd system calls support.  */
1272 #define LIB_SIM_SPEC "--start-group -lsim -lc --end-group"
1273
1274 #define STARTFILE_SIM_SPEC "ecrti.o%s sim-crt0.o%s"
1275
1276 #define ENDFILE_SIM_SPEC "ecrtn.o%s"
1277
1278 #define LINK_START_SIM_SPEC "-Ttext 0x10000074"
1279
1280 #define LINK_OS_SIM_SPEC ""
1281
1282 #define CPP_OS_SIM_SPEC ""
1283
1284 /* GNU/Linux support.  */
1285 #ifdef USE_GNULIBC_1
1286 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
1287 %{!mnewlib: -lc }"
1288 #else
1289 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
1290 %{!mnewlib: %{shared:-lc} %{!shared: %{pthread:-lpthread } \
1291 %{profile:-lc_p} %{!profile:-lc}}}"
1292 #endif
1293
1294 #define STARTFILE_LINUX_SPEC "\
1295 %{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
1296 %{mnewlib: ecrti.o%s} \
1297 %{!mnewlib: crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
1298
1299 #define ENDFILE_LINUX_SPEC "\
1300 %{mnewlib: ecrtn.o%s} \
1301 %{!mnewlib: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}"
1302
1303 #define LINK_START_LINUX_SPEC "-Ttext 0x400074"
1304
1305 #define LINK_OS_LINUX_SPEC ""
1306
1307 #ifdef USE_GNULIBC_1
1308 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__linux__ \
1309 %{!undef:%{!ansi:%{!std=*:-Dunix -Dlinux}%{std=gnu*:-Dunix -Dlinux}}} \
1310 -Asystem(unix) -Asystem(posix)"
1311 #else
1312 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__linux__ \
1313 %{!undef:%{!ansi:%{!std=*:-Dunix -Dlinux}%{std=gnu*:-Dunix -Dlinux}}} \
1314 -Asystem(unix) -Asystem(posix) %{pthread:-D_REENTRANT}"
1315 #endif
1316
1317 /* Solaris support.  */
1318 /* For Solaris, Gcc automatically adds in one of the files
1319    /usr/ccs/lib/values-Xc.o, /usr/ccs/lib/values-Xa.o, or
1320    /usr/ccs/lib/values-Xt.o for each final link step (depending upon the other
1321    gcc options selected, such as -traditional and -ansi).  These files each
1322    contain one (initialized) copy of a special variable called `_lib_version'.
1323    Each one of these files has `_lib_version' initialized to a different (enum)
1324    value.  The SVR4 library routines query the value of `_lib_version' at run
1325    to decide how they should behave.  Specifically, they decide (based upon the
1326    value of `_lib_version') if they will act in a strictly ANSI conforming
1327    manner or not.  */
1328
1329 #define LIB_SOLARIS_SPEC "\
1330 %{mnewlib: --start-group -lsolaris -lc --end-group } \
1331 %{!mnewlib: \
1332     %{ansi:values-Xc.o%s} \
1333     %{!ansi: \
1334         %{traditional:values-Xt.o%s} \
1335         %{!traditional:values-Xa.o%s}} \
1336         %{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
1337     %{solaris-cclib: /opt/SUNWspro/SC4.0/lib/libabi.a} \
1338     %{!shared: %{!symbolic: -lc }}}"
1339
1340 #define STARTFILE_SOLARIS_SPEC "\
1341 %{!msolaris-cclib: scrti.o%s scrt0.o%s} \
1342 %{msolaris-cclib: /opt/SUNWspro/SC4.0/lib/crti.o%s /opt/SUNWspro/SC4.0/lib/crt1.o%s}"
1343
1344 #define ENDFILE_SOLARIS_SPEC "\
1345 %{!msolaris-cclib: scrtn.o%s} \
1346 %{msolaris-cclib: /opt/SUNWspro/SC4.0/lib/crtn.o%s}"
1347
1348 #ifdef CROSS_COMPILE
1349 #define LINK_START_SOLARIS_SPEC "-Ttext 0x2000074"
1350 #else
1351 #define LINK_START_SOLARIS_SPEC ""
1352 #endif
1353
1354 #define LINK_OS_SOLARIS_SPEC ""
1355
1356 #define CPP_OS_SOLARIS_SPEC "-D__ppc -D__sun__=1 -D__unix__ -D__svr4__  -D__SVR4__ \
1357 %{!undef:%{!ansi:%{!std=*:-Dsun=1 -Dunix -DSVR4 -D__EXTENSIONS__} \
1358                %{std=gnu*:-Dsun=1 -Dunix -DSVR4 -D__EXTENSIONS__}}} \
1359 -Amachine(prep)"
1360
1361 /* VxWorks support.  */
1362 /* VxWorks does all the library stuff itself.  */
1363 #define LIB_VXWORKS_SPEC ""
1364
1365 /* VxWorks provides the functionality of crt0.o and friends itself.  */
1366
1367 #define STARTFILE_VXWORKS_SPEC ""
1368
1369 #define ENDFILE_VXWORKS_SPEC ""
1370
1371 /* Because it uses ld -r, vxworks has no start/end files, nor starting
1372    address.  */
1373
1374 #define LINK_START_VXWORKS_SPEC ""
1375
1376 #define LINK_OS_VXWORKS_SPEC "-r"
1377
1378 #define CPP_OS_VXWORKS_SPEC "\
1379 -DCPU_FAMILY=PPC \
1380 %{!mcpu*: \
1381   %{mpowerpc*: -DCPU=PPC603} \
1382   %{!mno-powerpc: -DCPU=PPC603}} \
1383 %{mcpu=powerpc: -DCPU=PPC603} \
1384 %{mcpu=401: -DCPU=PPC403} \
1385 %{mcpu=403: -DCPU=PPC403} \
1386 %{mcpu=601: -DCPU=PPC601} \
1387 %{mcpu=602: -DCPU=PPC603} \
1388 %{mcpu=603: -DCPU=PPC603} \
1389 %{mcpu=603e: -DCPU=PPC603} \
1390 %{mcpu=ec603e: -DCPU=PPC603} \
1391 %{mcpu=604: -DCPU=PPC604} \
1392 %{mcpu=604e: -DCPU=PPC604} \
1393 %{mcpu=620: -DCPU=PPC604} \
1394 %{mcpu=740: -DCPU=PPC603} \
1395 %{mcpu=750: -DCPU=PPC603} \
1396 %{mcpu=801: -DCPU=PPC603} \
1397 %{mcpu=821: -DCPU=PPC603} \
1398 %{mcpu=823: -DCPU=PPC603} \
1399 %{mcpu=860: -DCPU=PPC603}"
1400
1401 /* Define any extra SPECS that the compiler needs to generate.  */
1402 /* Override rs6000.h definition.  */
1403 #undef  SUBTARGET_EXTRA_SPECS
1404 #define SUBTARGET_EXTRA_SPECS                                           \
1405   { "cpp_sysv",                 CPP_SYSV_SPEC },                        \
1406   { "cpp_sysv_default",         CPP_SYSV_DEFAULT_SPEC },                \
1407   { "cpp_endian_default",       CPP_ENDIAN_DEFAULT_SPEC },              \
1408   { "cpp_endian",               CPP_ENDIAN_SPEC },                      \
1409   { "lib_ads",                  LIB_ADS_SPEC },                         \
1410   { "lib_yellowknife",          LIB_YELLOWKNIFE_SPEC },                 \
1411   { "lib_mvme",                 LIB_MVME_SPEC },                        \
1412   { "lib_sim",                  LIB_SIM_SPEC },                         \
1413   { "lib_linux",                LIB_LINUX_SPEC },                       \
1414   { "lib_solaris",              LIB_SOLARIS_SPEC },                     \
1415   { "lib_vxworks",              LIB_VXWORKS_SPEC },                     \
1416   { "lib_default",              LIB_DEFAULT_SPEC },                     \
1417   { "startfile_ads",            STARTFILE_ADS_SPEC },                   \
1418   { "startfile_yellowknife",    STARTFILE_YELLOWKNIFE_SPEC },           \
1419   { "startfile_mvme",           STARTFILE_MVME_SPEC },                  \
1420   { "startfile_sim",            STARTFILE_SIM_SPEC },                   \
1421   { "startfile_linux",          STARTFILE_LINUX_SPEC },                 \
1422   { "startfile_solaris",        STARTFILE_SOLARIS_SPEC },               \
1423   { "startfile_vxworks",        STARTFILE_VXWORKS_SPEC },               \
1424   { "startfile_default",        STARTFILE_DEFAULT_SPEC },               \
1425   { "endfile_ads",              ENDFILE_ADS_SPEC },                     \
1426   { "endfile_yellowknife",      ENDFILE_YELLOWKNIFE_SPEC },             \
1427   { "endfile_mvme",             ENDFILE_MVME_SPEC },                    \
1428   { "endfile_sim",              ENDFILE_SIM_SPEC },                     \
1429   { "endfile_linux",            ENDFILE_LINUX_SPEC },                   \
1430   { "endfile_solaris",          ENDFILE_SOLARIS_SPEC },                 \
1431   { "endfile_vxworks",          ENDFILE_VXWORKS_SPEC },                 \
1432   { "endfile_default",          ENDFILE_DEFAULT_SPEC },                 \
1433   { "link_path",                LINK_PATH_SPEC },                       \
1434   { "link_shlib",               LINK_SHLIB_SPEC },                      \
1435   { "link_target",              LINK_TARGET_SPEC },                     \
1436   { "link_start",               LINK_START_SPEC },                      \
1437   { "link_start_ads",           LINK_START_ADS_SPEC },                  \
1438   { "link_start_yellowknife",   LINK_START_YELLOWKNIFE_SPEC },          \
1439   { "link_start_mvme",          LINK_START_MVME_SPEC },                 \
1440   { "link_start_sim",           LINK_START_SIM_SPEC },                  \
1441   { "link_start_linux",         LINK_START_LINUX_SPEC },                \
1442   { "link_start_solaris",       LINK_START_SOLARIS_SPEC },              \
1443   { "link_start_vxworks",       LINK_START_VXWORKS_SPEC },              \
1444   { "link_start_default",       LINK_START_DEFAULT_SPEC },              \
1445   { "link_os",                  LINK_OS_SPEC },                         \
1446   { "link_os_ads",              LINK_OS_ADS_SPEC },                     \
1447   { "link_os_yellowknife",      LINK_OS_YELLOWKNIFE_SPEC },             \
1448   { "link_os_mvme",             LINK_OS_MVME_SPEC },                    \
1449   { "link_os_sim",              LINK_OS_SIM_SPEC },                     \
1450   { "link_os_linux",            LINK_OS_LINUX_SPEC },                   \
1451   { "link_os_solaris",          LINK_OS_SOLARIS_SPEC },                 \
1452   { "link_os_vxworks",          LINK_OS_VXWORKS_SPEC },                 \
1453   { "link_os_default",          LINK_OS_DEFAULT_SPEC },                 \
1454   { "cc1_endian_big",           CC1_ENDIAN_BIG_SPEC },                  \
1455   { "cc1_endian_little",        CC1_ENDIAN_LITTLE_SPEC },               \
1456   { "cc1_endian_default",       CC1_ENDIAN_DEFAULT_SPEC },              \
1457   { "cpp_endian_big",           CPP_ENDIAN_BIG_SPEC },                  \
1458   { "cpp_endian_little",        CPP_ENDIAN_LITTLE_SPEC },               \
1459   { "cpp_endian_solaris",       CPP_ENDIAN_SOLARIS_SPEC },              \
1460   { "cpp_float_default",        CPP_FLOAT_DEFAULT_SPEC },               \
1461   { "cpp_os_ads",               CPP_OS_ADS_SPEC },                      \
1462   { "cpp_os_yellowknife",       CPP_OS_YELLOWKNIFE_SPEC },              \
1463   { "cpp_os_mvme",              CPP_OS_MVME_SPEC },                     \
1464   { "cpp_os_sim",               CPP_OS_SIM_SPEC },                      \
1465   { "cpp_os_linux",             CPP_OS_LINUX_SPEC },                    \
1466   { "cpp_os_solaris",           CPP_OS_SOLARIS_SPEC },                  \
1467   { "cpp_os_vxworks",           CPP_OS_VXWORKS_SPEC },                  \
1468   { "cpp_os_default",           CPP_OS_DEFAULT_SPEC },
1469
1470 /* Define this macro as a C expression for the initializer of an
1471    array of string to tell the driver program which options are
1472    defaults for this target and thus do not need to be handled
1473    specially when using `MULTILIB_OPTIONS'.
1474
1475    Do not define this macro if `MULTILIB_OPTIONS' is not defined in
1476    the target makefile fragment or if none of the options listed in
1477    `MULTILIB_OPTIONS' are set by default.  *Note Target Fragment::.  */
1478
1479 #define MULTILIB_DEFAULTS { "mbig", "mcall-sysv" }
1480
1481 /* Define this macro if the code for function profiling should come
1482    before the function prologue.  Normally, the profiling code comes
1483    after.  */
1484 #define PROFILE_BEFORE_PROLOGUE 1
1485
1486 /* Function name to call to do profiling.  */
1487 #define RS6000_MCOUNT "_mcount"