1 /* Target definitions for GNU compiler for PowerPC running System V.4
2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3 2004, 2005, 2006 Free Software Foundation, Inc.
4 Contributed by Cygnus Support.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published
10 by the Free Software Foundation; either version 2, or (at your
11 option) any later version.
13 GCC is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to the
20 Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
21 MA 02110-1301, USA. */
23 /* Header files should be C++ aware in general. */
24 #undef NO_IMPLICIT_EXTERN_C
25 #define NO_IMPLICIT_EXTERN_C
27 /* Yes! We are ELF. */
28 #define TARGET_OBJECT_FORMAT OBJECT_ELF
30 /* Default ABI to compile code for. */
31 #define DEFAULT_ABI rs6000_current_abi
33 /* Default ABI to use. */
34 #define RS6000_ABI_NAME "sysv"
36 /* Override rs6000.h definition. */
37 #undef ASM_DEFAULT_SPEC
38 #define ASM_DEFAULT_SPEC "-mppc"
40 /* Small data support types. */
41 enum rs6000_sdata_type
{
42 SDATA_NONE
, /* No small data support. */
43 SDATA_DATA
, /* Just put data in .sbss/.sdata, don't use relocs. */
44 SDATA_SYSV
, /* Use r13 to point to .sdata/.sbss. */
45 SDATA_EABI
/* Use r13 like above, r2 points to .sdata2/.sbss2. */
48 extern enum rs6000_sdata_type rs6000_sdata
;
50 #define TARGET_TOC ((target_flags & MASK_64BIT) \
51 || ((target_flags & (MASK_RELOCATABLE \
52 | MASK_MINIMAL_TOC)) \
54 || DEFAULT_ABI == ABI_AIX)
56 #define TARGET_BITFIELD_TYPE (! TARGET_NO_BITFIELD_TYPE)
57 #define TARGET_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
58 #define TARGET_NO_PROTOTYPE (! TARGET_PROTOTYPE)
59 #define TARGET_NO_TOC (! TARGET_TOC)
60 #define TARGET_NO_EABI (! TARGET_EABI)
63 #undef TARGET_SECURE_PLT
64 #define TARGET_SECURE_PLT secure_plt
67 extern const char *rs6000_abi_name
;
68 extern const char *rs6000_sdata_name
;
69 extern const char *rs6000_tls_size_string
; /* For -mtls-size= */
71 #define SDATA_DEFAULT_SIZE 8
73 /* Sometimes certain combinations of command options do not make sense
74 on a particular target machine. You can define a macro
75 `OVERRIDE_OPTIONS' to take account of this. This macro, if
76 defined, is executed once just after all the command options have
79 The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
82 #define SUBTARGET_OVERRIDE_OPTIONS \
85 g_switch_value = SDATA_DEFAULT_SIZE; \
87 if (rs6000_abi_name == NULL) \
88 rs6000_abi_name = RS6000_ABI_NAME; \
90 if (!strcmp (rs6000_abi_name, "sysv")) \
91 rs6000_current_abi = ABI_V4; \
92 else if (!strcmp (rs6000_abi_name, "sysv-noeabi")) \
94 rs6000_current_abi = ABI_V4; \
95 target_flags &= ~ MASK_EABI; \
97 else if (!strcmp (rs6000_abi_name, "sysv-eabi") \
98 || !strcmp (rs6000_abi_name, "eabi")) \
100 rs6000_current_abi = ABI_V4; \
101 target_flags |= MASK_EABI; \
103 else if (!strcmp (rs6000_abi_name, "aixdesc")) \
104 rs6000_current_abi = ABI_AIX; \
105 else if (!strcmp (rs6000_abi_name, "freebsd")) \
106 rs6000_current_abi = ABI_V4; \
107 else if (!strcmp (rs6000_abi_name, "linux")) \
110 rs6000_current_abi = ABI_AIX; \
112 rs6000_current_abi = ABI_V4; \
114 else if (!strcmp (rs6000_abi_name, "gnu")) \
115 rs6000_current_abi = ABI_V4; \
116 else if (!strcmp (rs6000_abi_name, "netbsd")) \
119 rs6000_current_abi = ABI_AIX; \
121 rs6000_current_abi = ABI_V4; \
123 else if (!strcmp (rs6000_abi_name, "openbsd")) \
124 rs6000_current_abi = ABI_V4; \
125 else if (!strcmp (rs6000_abi_name, "i960-old")) \
127 rs6000_current_abi = ABI_V4; \
128 target_flags |= (MASK_LITTLE_ENDIAN | MASK_EABI \
129 | MASK_NO_BITFIELD_WORD); \
130 target_flags &= ~MASK_STRICT_ALIGN; \
134 rs6000_current_abi = ABI_V4; \
135 error ("bad value for -mcall-%s", rs6000_abi_name); \
138 if (rs6000_sdata_name) \
140 if (!strcmp (rs6000_sdata_name, "none")) \
141 rs6000_sdata = SDATA_NONE; \
142 else if (!strcmp (rs6000_sdata_name, "data")) \
143 rs6000_sdata = SDATA_DATA; \
144 else if (!strcmp (rs6000_sdata_name, "default")) \
145 rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV; \
146 else if (!strcmp (rs6000_sdata_name, "sysv")) \
147 rs6000_sdata = SDATA_SYSV; \
148 else if (!strcmp (rs6000_sdata_name, "eabi")) \
149 rs6000_sdata = SDATA_EABI; \
151 error ("bad value for -msdata=%s", rs6000_sdata_name); \
153 else if (DEFAULT_ABI == ABI_V4) \
155 rs6000_sdata = SDATA_DATA; \
156 rs6000_sdata_name = "data"; \
160 rs6000_sdata = SDATA_NONE; \
161 rs6000_sdata_name = "none"; \
164 if (TARGET_RELOCATABLE && \
165 (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV)) \
167 rs6000_sdata = SDATA_DATA; \
168 error ("-mrelocatable and -msdata=%s are incompatible", \
169 rs6000_sdata_name); \
172 else if (flag_pic && DEFAULT_ABI != ABI_AIX \
173 && (rs6000_sdata == SDATA_EABI \
174 || rs6000_sdata == SDATA_SYSV)) \
176 rs6000_sdata = SDATA_DATA; \
177 error ("-f%s and -msdata=%s are incompatible", \
178 (flag_pic > 1) ? "PIC" : "pic", \
179 rs6000_sdata_name); \
182 if ((rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4) \
183 || (rs6000_sdata == SDATA_EABI && !TARGET_EABI)) \
185 rs6000_sdata = SDATA_NONE; \
186 error ("-msdata=%s and -mcall-%s are incompatible", \
187 rs6000_sdata_name, rs6000_abi_name); \
190 targetm.have_srodata_section = rs6000_sdata == SDATA_EABI; \
192 if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC) \
194 target_flags |= MASK_MINIMAL_TOC; \
195 error ("-mrelocatable and -mno-minimal-toc are incompatible"); \
198 if (TARGET_RELOCATABLE && rs6000_current_abi == ABI_AIX) \
200 target_flags &= ~MASK_RELOCATABLE; \
201 error ("-mrelocatable and -mcall-%s are incompatible", \
205 if (!TARGET_64BIT && flag_pic > 1 && rs6000_current_abi == ABI_AIX) \
208 error ("-fPIC and -mcall-%s are incompatible", \
212 if (rs6000_current_abi == ABI_AIX && TARGET_LITTLE_ENDIAN) \
214 target_flags &= ~MASK_LITTLE_ENDIAN; \
215 error ("-mcall-aixdesc must be big endian"); \
218 if (TARGET_SECURE_PLT != secure_plt) \
220 error ("-msecure-plt not supported by your assembler"); \
223 if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128 \
224 && rs6000_explicit_options.long_double) \
225 warning (0, "-msoft-float and -mlong-double-128 not supported"); \
227 /* Treat -fPIC the same as -mrelocatable. */ \
228 if (flag_pic > 1 && DEFAULT_ABI != ABI_AIX) \
229 target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC; \
231 else if (TARGET_RELOCATABLE) \
235 #ifndef RS6000_BI_ARCH
236 # define SUBSUBTARGET_OVERRIDE_OPTIONS \
238 if ((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
239 error ("-m%s not supported in this configuration", \
240 (target_flags & MASK_64BIT) ? "64" : "32"); \
244 /* Override rs6000.h definition. */
245 #undef TARGET_DEFAULT
246 #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
248 /* Override rs6000.h definition. */
249 #undef PROCESSOR_DEFAULT
250 #define PROCESSOR_DEFAULT PROCESSOR_PPC750
252 /* SVR4 only defined for PowerPC, so short-circuit POWER patterns. */
254 #define TARGET_POWER 0
257 /* System V.4 uses register 13 as a pointer to the small data area,
258 so it is not available to the normal user. */
261 /* Override default big endianism definitions in rs6000.h. */
262 #undef BYTES_BIG_ENDIAN
263 #undef WORDS_BIG_ENDIAN
264 #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN)
265 #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN)
267 /* Define this to set the endianness to use in libgcc2.c, which can
268 not depend on target_flags. */
269 #if !defined(__LITTLE_ENDIAN__) && !defined(__sun__)
270 #define LIBGCC2_WORDS_BIG_ENDIAN 1
272 #define LIBGCC2_WORDS_BIG_ENDIAN 0
275 /* Define cutoff for using external functions to save floating point.
276 Currently on V.4, always use inline stores. */
277 #define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 64)
279 /* Put jump tables in read-only memory, rather than in .text. */
280 #define JUMP_TABLES_IN_TEXT_SECTION 0
282 /* Prefix and suffix to use to saving floating point. */
283 #define SAVE_FP_PREFIX "_savefpr_"
284 #define SAVE_FP_SUFFIX "_l"
286 /* Prefix and suffix to use to restoring floating point. */
287 #define RESTORE_FP_PREFIX "_restfpr_"
288 #define RESTORE_FP_SUFFIX "_l"
290 /* Type used for ptrdiff_t, as a string used in a declaration. */
291 #define PTRDIFF_TYPE "int"
293 /* Type used for wchar_t, as a string used in a declaration. */
294 /* Override svr4.h definition. */
296 #define WCHAR_TYPE "long int"
298 /* Width of wchar_t in bits. */
299 /* Override svr4.h definition. */
300 #undef WCHAR_TYPE_SIZE
301 #define WCHAR_TYPE_SIZE 32
303 /* Make int foo : 8 not cause structures to be aligned to an int boundary. */
304 /* Override elfos.h definition. */
305 #undef PCC_BITFIELD_TYPE_MATTERS
306 #define PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)
308 #undef BITFIELD_NBYTES_LIMITED
309 #define BITFIELD_NBYTES_LIMITED (TARGET_NO_BITFIELD_WORD)
311 /* Define this macro to be the value 1 if instructions will fail to
312 work if given data not on the nominal alignment. If instructions
313 will merely go slower in that case, define this macro as 0. */
314 #undef STRICT_ALIGNMENT
315 #define STRICT_ALIGNMENT (TARGET_STRICT_ALIGN)
317 /* Define this macro if you wish to preserve a certain alignment for
318 the stack pointer, greater than what the hardware enforces. The
319 definition is a C expression for the desired alignment (measured
320 in bits). This macro must evaluate to a value equal to or larger
322 For the SYSV ABI and variants the alignment of the stack pointer
323 is usually controlled manually in rs6000.c. However, to maintain
324 alignment across alloca () in all circumstances,
325 PREFERRED_STACK_BOUNDARY needs to be set as well.
326 This has the additional advantage of allowing a bigger maximum
327 alignment of user objects on the stack. */
329 #undef PREFERRED_STACK_BOUNDARY
330 #define PREFERRED_STACK_BOUNDARY 128
332 /* Real stack boundary as mandated by the appropriate ABI. */
333 #define ABI_STACK_BOUNDARY \
334 ((TARGET_EABI && !TARGET_ALTIVEC && !TARGET_ALTIVEC_ABI) ? 64 : 128)
336 /* An expression for the alignment of a structure field FIELD if the
337 alignment computed in the usual way is COMPUTED. */
338 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
339 ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
342 #undef BIGGEST_FIELD_ALIGNMENT
344 /* Use ELF style section commands. */
346 #define TEXT_SECTION_ASM_OP "\t.section\t\".text\""
348 #define DATA_SECTION_ASM_OP "\t.section\t\".data\""
350 #define BSS_SECTION_ASM_OP "\t.section\t\".bss\""
352 /* Override elfos.h definition. */
353 #undef INIT_SECTION_ASM_OP
354 #define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""
356 /* Override elfos.h definition. */
357 #undef FINI_SECTION_ASM_OP
358 #define FINI_SECTION_ASM_OP "\t.section\t\".fini\",\"ax\""
360 #define TOC_SECTION_ASM_OP "\t.section\t\".got\",\"aw\""
362 /* Put PC relative got entries in .got2. */
363 #define MINIMAL_TOC_SECTION_ASM_OP \
364 (TARGET_RELOCATABLE || (flag_pic && DEFAULT_ABI != ABI_AIX) \
365 ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")
367 #define SDATA_SECTION_ASM_OP "\t.section\t\".sdata\",\"aw\""
368 #define SDATA2_SECTION_ASM_OP "\t.section\t\".sdata2\",\"a\""
369 #define SBSS_SECTION_ASM_OP "\t.section\t\".sbss\",\"aw\",@nobits"
371 /* Besides the usual ELF sections, we need a toc section. */
372 /* Override elfos.h definition. */
373 #undef EXTRA_SECTIONS
374 #define EXTRA_SECTIONS in_toc, in_sdata, in_sdata2, in_sbss, in_init, in_fini
376 /* Override elfos.h definition. */
377 #undef EXTRA_SECTION_FUNCTIONS
378 #define EXTRA_SECTION_FUNCTIONS \
379 TOC_SECTION_FUNCTION \
380 SDATA_SECTION_FUNCTION \
381 SDATA2_SECTION_FUNCTION \
382 SBSS_SECTION_FUNCTION \
383 INIT_SECTION_FUNCTION \
384 FINI_SECTION_FUNCTION
386 #define TOC_SECTION_FUNCTION \
390 if (in_section != in_toc) \
392 in_section = in_toc; \
393 if (DEFAULT_ABI == ABI_AIX \
394 && TARGET_MINIMAL_TOC \
395 && !TARGET_RELOCATABLE) \
397 if (! toc_initialized) \
399 toc_initialized = 1; \
400 fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); \
401 (*targetm.asm_out.internal_label) (asm_out_file, "LCTOC", 0); \
402 fprintf (asm_out_file, "\t.tc "); \
403 ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1[TC],"); \
404 ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \
405 fprintf (asm_out_file, "\n"); \
407 fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \
408 ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \
409 fprintf (asm_out_file, " = .+32768\n"); \
412 fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \
414 else if (DEFAULT_ABI == ABI_AIX && !TARGET_RELOCATABLE) \
415 fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP); \
418 fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP); \
419 if (! toc_initialized) \
421 ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1"); \
422 fprintf (asm_out_file, " = .+32768\n"); \
423 toc_initialized = 1; \
429 extern int in_toc_section (void); \
430 int in_toc_section (void) \
432 return in_section == in_toc; \
435 #define SDATA_SECTION_FUNCTION \
437 sdata_section (void) \
439 if (in_section != in_sdata) \
441 in_section = in_sdata; \
442 fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \
446 #define SDATA2_SECTION_FUNCTION \
448 sdata2_section (void) \
450 if (in_section != in_sdata2) \
452 in_section = in_sdata2; \
453 fprintf (asm_out_file, "%s\n", SDATA2_SECTION_ASM_OP); \
457 #define SBSS_SECTION_FUNCTION \
459 sbss_section (void) \
461 if (in_section != in_sbss) \
463 in_section = in_sbss; \
464 fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP); \
468 #define INIT_SECTION_FUNCTION \
470 init_section (void) \
472 if (in_section != in_init) \
474 in_section = in_init; \
475 fprintf (asm_out_file, "%s\n", INIT_SECTION_ASM_OP); \
479 #define FINI_SECTION_FUNCTION \
481 fini_section (void) \
483 if (in_section != in_fini) \
485 in_section = in_fini; \
486 fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP); \
490 /* Override default elf definitions. */
491 #undef TARGET_ASM_SELECT_RTX_SECTION
492 #define TARGET_ASM_SELECT_RTX_SECTION rs6000_elf_select_rtx_section
493 #undef TARGET_ASM_SELECT_SECTION
494 #define TARGET_ASM_SELECT_SECTION rs6000_elf_select_section
495 #define TARGET_ASM_UNIQUE_SECTION rs6000_elf_unique_section
497 /* Return nonzero if this entry is to be written into the constant pool
498 in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST
499 containing one of them. If -mfp-in-toc (the default), we also do
500 this for floating-point constants. We actually can only do this
501 if the FP formats of the target and host machines are the same, but
502 we can't check that since not every file that uses
503 GO_IF_LEGITIMATE_ADDRESS_P includes real.h.
505 Unlike AIX, we don't key off of -mminimal-toc, but instead do not
506 allow floating point constants in the TOC if -mrelocatable. */
508 #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
509 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \
511 && (GET_CODE (X) == SYMBOL_REF \
512 || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \
513 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \
514 || GET_CODE (X) == LABEL_REF \
515 || (GET_CODE (X) == CONST_INT \
516 && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \
517 || (!TARGET_NO_FP_IN_TOC \
518 && !TARGET_RELOCATABLE \
519 && GET_CODE (X) == CONST_DOUBLE \
520 && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
521 && BITS_PER_WORD == HOST_BITS_PER_INT)))
523 /* These macros generate the special .type and .size directives which
524 are used to set the corresponding fields of the linker symbol table
525 entries in an ELF object file under SVR4. These macros also output
526 the starting labels for the relevant functions/objects. */
528 /* Write the extra assembler code needed to declare a function properly.
529 Some svr4 assemblers need to also have something extra said about the
530 function's return value. We allow for that here. */
532 extern int rs6000_pic_labelno
;
534 /* Override elfos.h definition. */
535 #undef ASM_DECLARE_FUNCTION_NAME
536 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
537 rs6000_elf_declare_function_name ((FILE), (NAME), (DECL))
539 /* The USER_LABEL_PREFIX stuff is affected by the -fleading-underscore
540 flag. The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */
542 #define LOCAL_LABEL_PREFIX "."
543 #define USER_LABEL_PREFIX ""
545 /* svr4.h overrides (*targetm.asm_out.internal_label). */
547 #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
548 asm_fprintf (FILE, "%L%s", PREFIX)
550 /* Globalizing directive for a label. */
551 #define GLOBAL_ASM_OP "\t.globl "
553 /* This says how to output assembler code to declare an
554 uninitialized internal linkage data object. Under SVR4,
555 the linker seems to want the alignment of data objects
556 to depend on their types. We do exactly that here. */
558 #define LOCAL_ASM_OP "\t.local\t"
560 #define LCOMM_ASM_OP "\t.lcomm\t"
562 /* Override elfos.h definition. */
563 #undef ASM_OUTPUT_ALIGNED_LOCAL
564 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
566 if (rs6000_sdata != SDATA_NONE && (SIZE) > 0 \
567 && (SIZE) <= g_switch_value) \
570 ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \
571 ASM_OUTPUT_LABEL (FILE, NAME); \
572 ASM_OUTPUT_SKIP (FILE, SIZE); \
573 if (!flag_inhibit_size_directive && (SIZE) > 0) \
574 ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
578 fprintf (FILE, "%s", LCOMM_ASM_OP); \
579 assemble_name ((FILE), (NAME)); \
580 fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
581 (SIZE), (ALIGN) / BITS_PER_UNIT); \
583 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
586 /* Describe how to emit uninitialized external linkage items. */
587 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
589 ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \
592 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
593 /* To support -falign-* switches we need to use .p2align so
594 that alignment directives in code sections will be padded
595 with no-op instructions, rather than zeroes. */
596 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
599 if ((MAX_SKIP) == 0) \
600 fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
602 fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
606 /* This is how to output code to push a register on the stack.
607 It need not be very fast code.
609 On the rs6000, we must keep the backchain up to date. In order
610 to simplify things, always allocate 16 bytes for a push (System V
611 wants to keep stack aligned to a 16 byte boundary). */
613 #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) \
615 if (DEFAULT_ABI == ABI_V4) \
617 "\t{stu|stwu} %s,-16(%s)\n\t{st|stw} %s,12(%s)\n", \
618 reg_names[1], reg_names[1], reg_names[REGNO], \
622 /* This is how to output an insn to pop a register from the stack.
623 It need not be very fast code. */
625 #define ASM_OUTPUT_REG_POP(FILE, REGNO) \
627 if (DEFAULT_ABI == ABI_V4) \
629 "\t{l|lwz} %s,12(%s)\n\t{ai|addic} %s,%s,16\n", \
630 reg_names[REGNO], reg_names[1], reg_names[1], \
634 /* Switch Recognition by gcc.c. Add -G xx support. */
636 /* Override svr4.h definition. */
637 #undef SWITCH_TAKES_ARG
638 #define SWITCH_TAKES_ARG(CHAR) \
639 ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \
640 || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \
641 || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x' \
642 || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'V' \
643 || (CHAR) == 'B' || (CHAR) == 'b' || (CHAR) == 'G')
645 extern int fixuplabelno
;
647 /* Handle constructors specially for -mrelocatable. */
648 #define TARGET_ASM_CONSTRUCTOR rs6000_elf_asm_out_constructor
649 #define TARGET_ASM_DESTRUCTOR rs6000_elf_asm_out_destructor
651 /* This is the end of what might become sysv4.h. */
653 /* Use DWARF 2 debugging information by default. */
654 #undef PREFERRED_DEBUGGING_TYPE
655 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
657 /* Historically we have also supported stabs debugging. */
658 #define DBX_DEBUGGING_INFO 1
660 #define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO)
662 /* Map register numbers held in the call frame info that gcc has
663 collected using DWARF_FRAME_REGNUM to those that should be output in
664 .debug_frame and .eh_frame. We continue to use gcc hard reg numbers
665 for .eh_frame, but use the numbers mandated by the various ABIs for
666 .debug_frame. rs6000_emit_prologue has translated any combination of
667 CR2, CR3, CR4 saves to a save of CR2. The actual code emitted saves
668 the whole of CR, so we map CR2_REGNO to the DWARF reg for CR. */
669 #define DWARF2_FRAME_REG_OUT(REGNO, FOR_EH) \
670 ((FOR_EH) ? (REGNO) \
671 : (REGNO) == CR2_REGNO ? 64 \
672 : DBX_REGISTER_NUMBER (REGNO))
674 #define TARGET_ENCODE_SECTION_INFO rs6000_elf_encode_section_info
675 #define TARGET_IN_SMALL_DATA_P rs6000_elf_in_small_data_p
676 #define TARGET_SECTION_TYPE_FLAGS rs6000_elf_section_type_flags
678 /* The ELF version doesn't encode [DS] or whatever at the end of symbols. */
680 #define RS6000_OUTPUT_BASENAME(FILE, NAME) \
681 assemble_name (FILE, NAME)
683 /* We have to output the stabs for the function name *first*, before
684 outputting its label. */
686 #define DBX_FUNCTION_FIRST
688 /* This is the end of what might become sysv4dbx.h. */
690 #ifndef TARGET_VERSION
691 #define TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)");
694 #define TARGET_OS_SYSV_CPP_BUILTINS() \
699 builtin_define ("__pic__=1"); \
700 builtin_define ("__PIC__=1"); \
702 else if (flag_pic == 2) \
704 builtin_define ("__pic__=2"); \
705 builtin_define ("__PIC__=2"); \
707 if (target_flags_explicit \
708 & MASK_RELOCATABLE) \
709 builtin_define ("_RELOCATABLE"); \
713 #ifndef TARGET_OS_CPP_BUILTINS
714 #define TARGET_OS_CPP_BUILTINS() \
717 builtin_define_std ("PPC"); \
718 builtin_define_std ("unix"); \
719 builtin_define ("__svr4__"); \
720 builtin_assert ("system=unix"); \
721 builtin_assert ("system=svr4"); \
722 builtin_assert ("cpu=powerpc"); \
723 builtin_assert ("machine=powerpc"); \
724 TARGET_OS_SYSV_CPP_BUILTINS (); \
729 /* Pass various options to the assembler. */
730 /* Override svr4.h definition. */
732 #define ASM_SPEC "%(asm_cpu) \
733 %{.s: %{mregnames} %{mno-regnames}} %{.S: %{mregnames} %{mno-regnames}} \
734 %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
735 %{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \
736 %{memb|msdata|msdata=eabi: -memb} \
737 %{mlittle|mlittle-endian:-mlittle; \
738 mbig|mbig-endian :-mbig; \
745 mcall-i960-old :-mlittle}"
747 #define CC1_ENDIAN_BIG_SPEC ""
749 #define CC1_ENDIAN_LITTLE_SPEC "\
750 %{!mstrict-align: %{!mno-strict-align: \
756 #define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big)"
758 #ifndef CC1_SECURE_PLT_DEFAULT_SPEC
759 #define CC1_SECURE_PLT_DEFAULT_SPEC ""
762 /* Pass -G xxx to the compiler and set correct endian mode. */
764 #define CC1_SPEC "%{G*} \
765 %{mlittle|mlittle-endian: %(cc1_endian_little); \
766 mbig |mbig-endian : %(cc1_endian_big); \
772 mcall-gnu : -mbig %(cc1_endian_big); \
773 mcall-i960-old : -mlittle %(cc1_endian_little); \
774 : %(cc1_endian_default)} \
775 %{meabi: %{!mcall-*: -mcall-sysv }} \
776 %{!meabi: %{!mno-eabi: \
777 %{mrelocatable: -meabi } \
778 %{mcall-freebsd: -mno-eabi } \
779 %{mcall-i960-old: -meabi } \
780 %{mcall-linux: -mno-eabi } \
781 %{mcall-gnu: -mno-eabi } \
782 %{mcall-netbsd: -mno-eabi } \
783 %{mcall-openbsd: -mno-eabi }}} \
784 %{msdata: -msdata=default} \
785 %{mno-sdata: -msdata=none} \
786 %{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \
790 /* Don't put -Y P,<path> for cross compilers. */
791 #ifndef CROSS_COMPILE
792 #define LINK_PATH_SPEC "\
794 %{!nostdlib: %{!YP,*: \
796 %{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
797 %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
798 %{!R*: %{!L*: -R /usr/ucblib}} \
800 %{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
801 %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}}"
804 #define LINK_PATH_SPEC ""
807 /* Default starting address if specified. */
808 #define LINK_START_SPEC "\
809 %{mads : %(link_start_ads) ; \
810 myellowknife : %(link_start_yellowknife) ; \
811 mmvme : %(link_start_mvme) ; \
812 msim : %(link_start_sim) ; \
813 mwindiss : %(link_start_windiss) ; \
814 mcall-freebsd: %(link_start_freebsd) ; \
815 mcall-linux : %(link_start_linux) ; \
816 mcall-gnu : %(link_start_gnu) ; \
817 mcall-netbsd : %(link_start_netbsd) ; \
818 mcall-openbsd: %(link_start_openbsd) ; \
819 : %(link_start_default) }"
821 #define LINK_START_DEFAULT_SPEC ""
823 /* Override svr4.h definition. */
826 %{h*} %{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} \
830 %{!Wl,-T*: %{!T*: %(link_start) }} \
834 /* For now, turn off shared libraries by default. */
835 #ifndef SHARED_LIB_SUPPORT
836 #define NO_SHARED_LIB_SUPPORT
839 #ifndef NO_SHARED_LIB_SUPPORT
840 /* Shared libraries are default. */
841 #define LINK_SHLIB_SPEC "\
842 %{!static: %(link_path) %{!R*:%{L*:-R %*}}} \
844 %{static:-dn -Bstatic} \
845 %{shared:-G -dy -z text} \
846 %{symbolic:-Bsymbolic -G -dy -z text}"
849 /* Shared libraries are not default. */
850 #define LINK_SHLIB_SPEC "\
851 %{mshlib: %(link_path) } \
852 %{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \
854 %{shared:-G -dy -z text %(link_path) } \
855 %{symbolic:-Bsymbolic -G -dy -z text %(link_path) }"
858 /* Override the default target of the linker. */
859 #define LINK_TARGET_SPEC "\
860 %{mlittle: --oformat elf32-powerpcle } %{mlittle-endian: --oformat elf32-powerpcle } \
861 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
862 %{mcall-i960-old: --oformat elf32-powerpcle} \
865 /* Any specific OS flags. */
866 #define LINK_OS_SPEC "\
867 %{mads : %(link_os_ads) ; \
868 myellowknife : %(link_os_yellowknife) ; \
869 mmvme : %(link_os_mvme) ; \
870 msim : %(link_os_sim) ; \
871 mwindiss : %(link_os_windiss) ; \
872 mcall-freebsd: %(link_os_freebsd) ; \
873 mcall-linux : %(link_os_linux) ; \
874 mcall-gnu : %(link_os_gnu) ; \
875 mcall-netbsd : %(link_os_netbsd) ; \
876 mcall-openbsd: %(link_os_openbsd) ; \
877 : %(link_os_default) }"
879 #define LINK_OS_DEFAULT_SPEC ""
881 /* Override rs6000.h definition. */
883 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
884 %{mads : %(cpp_os_ads) ; \
885 myellowknife : %(cpp_os_yellowknife) ; \
886 mmvme : %(cpp_os_mvme) ; \
887 msim : %(cpp_os_sim) ; \
888 mwindiss : %(cpp_os_windiss) ; \
889 mcall-freebsd: %(cpp_os_freebsd) ; \
890 mcall-linux : %(cpp_os_linux) ; \
891 mcall-gnu : %(cpp_os_gnu) ; \
892 mcall-netbsd : %(cpp_os_netbsd) ; \
893 mcall-openbsd: %(cpp_os_openbsd) ; \
894 : %(cpp_os_default) }"
896 #define CPP_OS_DEFAULT_SPEC ""
898 /* Override svr4.h definition. */
899 #undef STARTFILE_SPEC
900 #define STARTFILE_SPEC "\
901 %{mads : %(startfile_ads) ; \
902 myellowknife : %(startfile_yellowknife) ; \
903 mmvme : %(startfile_mvme) ; \
904 msim : %(startfile_sim) ; \
905 mwindiss : %(startfile_windiss) ; \
906 mcall-freebsd: %(startfile_freebsd) ; \
907 mcall-linux : %(startfile_linux) ; \
908 mcall-gnu : %(startfile_gnu) ; \
909 mcall-netbsd : %(startfile_netbsd) ; \
910 mcall-openbsd: %(startfile_openbsd) ; \
911 : %(startfile_default) }"
913 #define STARTFILE_DEFAULT_SPEC ""
915 /* Override svr4.h definition. */
918 %{mads : %(lib_ads) ; \
919 myellowknife : %(lib_yellowknife) ; \
920 mmvme : %(lib_mvme) ; \
921 msim : %(lib_sim) ; \
922 mwindiss : %(lib_windiss) ; \
923 mcall-freebsd: %(lib_freebsd) ; \
924 mcall-linux : %(lib_linux) ; \
925 mcall-gnu : %(lib_gnu) ; \
926 mcall-netbsd : %(lib_netbsd) ; \
927 mcall-openbsd: %(lib_openbsd) ; \
930 #define LIB_DEFAULT_SPEC ""
932 /* Override svr4.h definition. */
934 #define ENDFILE_SPEC "\
935 %{mads : crtsavres.o%s %(endfile_ads) ; \
936 myellowknife : crtsavres.o%s %(endfile_yellowknife) ; \
937 mmvme : crtsavres.o%s %(endfile_mvme) ; \
938 msim : crtsavres.o%s %(endfile_sim) ; \
939 mwindiss : %(endfile_windiss) ; \
940 mcall-freebsd: crtsavres.o%s %(endfile_freebsd) ; \
941 mcall-linux : crtsavres.o%s %(endfile_linux) ; \
942 mcall-gnu : crtsavres.o%s %(endfile_gnu) ; \
943 mcall-netbsd : crtsavres.o%s %(endfile_netbsd) ; \
944 mcall-openbsd: crtsavres.o%s %(endfile_openbsd) ; \
945 : %(crtsavres_default) %(endfile_default) }"
947 #define CRTSAVRES_DEFAULT_SPEC "crtsavres.o%s"
949 #define ENDFILE_DEFAULT_SPEC ""
951 /* Motorola ADS support. */
952 #define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
954 #define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
956 #define ENDFILE_ADS_SPEC "crtend.o%s ecrtn.o%s"
958 #define LINK_START_ADS_SPEC "-T ads.ld%s"
960 #define LINK_OS_ADS_SPEC ""
962 #define CPP_OS_ADS_SPEC ""
964 /* Motorola Yellowknife support. */
965 #define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
967 #define STARTFILE_YELLOWKNIFE_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
969 #define ENDFILE_YELLOWKNIFE_SPEC "crtend.o%s ecrtn.o%s"
971 #define LINK_START_YELLOWKNIFE_SPEC "-T yellowknife.ld%s"
973 #define LINK_OS_YELLOWKNIFE_SPEC ""
975 #define CPP_OS_YELLOWKNIFE_SPEC ""
977 /* Motorola MVME support. */
978 #define LIB_MVME_SPEC "--start-group -lmvme -lc --end-group"
980 #define STARTFILE_MVME_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
982 #define ENDFILE_MVME_SPEC "crtend.o%s ecrtn.o%s"
984 #define LINK_START_MVME_SPEC "-Ttext 0x40000"
986 #define LINK_OS_MVME_SPEC ""
988 #define CPP_OS_MVME_SPEC ""
990 /* PowerPC simulator based on netbsd system calls support. */
991 #define LIB_SIM_SPEC "--start-group -lsim -lc --end-group"
993 #define STARTFILE_SIM_SPEC "ecrti.o%s sim-crt0.o%s crtbegin.o%s"
995 #define ENDFILE_SIM_SPEC "crtend.o%s ecrtn.o%s"
997 #define LINK_START_SIM_SPEC ""
999 #define LINK_OS_SIM_SPEC "-m elf32ppcsim"
1001 #define CPP_OS_SIM_SPEC ""
1003 /* FreeBSD support. */
1005 #define CPP_OS_FREEBSD_SPEC "\
1006 -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ \
1007 -Acpu=powerpc -Amachine=powerpc"
1009 #define STARTFILE_FREEBSD_SPEC FBSD_STARTFILE_SPEC
1010 #define ENDFILE_FREEBSD_SPEC FBSD_ENDFILE_SPEC
1011 #define LIB_FREEBSD_SPEC FBSD_LIB_SPEC
1012 #define LINK_START_FREEBSD_SPEC ""
1014 #define LINK_OS_FREEBSD_SPEC "\
1015 %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
1017 %{assert*} %{R*} %{rpath*} %{defsym*} \
1018 %{shared:-Bshareable %{h*} %{soname*}} \
1021 %{rdynamic: -export-dynamic} \
1022 %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
1023 %{static:-Bstatic}} \
1024 %{symbolic:-Bsymbolic}"
1026 /* GNU/Linux support. */
1027 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
1028 %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \
1029 %{!shared: %{profile:-lc_p} %{!profile:-lc}}}"
1032 #define STARTFILE_LINUX_SPEC "\
1033 %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
1034 %{mnewlib:ecrti.o%s;:crti.o%s} \
1035 %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
1037 #define STARTFILE_LINUX_SPEC "\
1038 %{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
1039 %{mnewlib:ecrti.o%s;:crti.o%s} \
1040 %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
1043 #define ENDFILE_LINUX_SPEC "\
1044 %{shared|pie:crtendS.o%s;:crtend.o%s} \
1045 %{mnewlib:ecrtn.o%s;:crtn.o%s}"
1047 #define LINK_START_LINUX_SPEC ""
1049 #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
1050 %{rdynamic:-export-dynamic} \
1051 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
1053 #if defined(HAVE_LD_EH_FRAME_HDR)
1054 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
1057 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
1060 %{!std=*:-Dunix -D__unix -Dlinux -D__linux} \
1061 %{std=gnu*:-Dunix -D__unix -Dlinux -D__linux}}} \
1062 -Asystem=linux -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
1064 /* GNU/Hurd support. */
1065 #define LIB_GNU_SPEC "%{mnewlib: --start-group -lgnu -lc --end-group } \
1066 %{!mnewlib: %{shared:-lc} %{!shared: %{pthread:-lpthread } \
1067 %{profile:-lc_p} %{!profile:-lc}}}"
1069 #define STARTFILE_GNU_SPEC "\
1070 %{!shared: %{!static: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}} \
1071 %{static: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
1072 %{mnewlib: ecrti.o%s} %{!mnewlib: crti.o%s} \
1073 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
1075 #define ENDFILE_GNU_SPEC "%{!shared:crtend.o%s} %{shared:crtendS.o%s} \
1076 %{mnewlib: ecrtn.o%s} %{!mnewlib: crtn.o%s}"
1078 #define LINK_START_GNU_SPEC ""
1080 #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
1081 %{rdynamic:-export-dynamic} \
1082 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
1084 #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__ \
1086 %{!ansi: -Dunix -D__unix}} \
1087 -Asystem=gnu -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
1089 /* NetBSD support. */
1090 #define LIB_NETBSD_SPEC NETBSD_LIB_SPEC
1092 #define STARTFILE_NETBSD_SPEC NETBSD_STARTFILE_SPEC
1094 #define ENDFILE_NETBSD_SPEC NETBSD_ENDFILE_SPEC
1096 #define LINK_START_NETBSD_SPEC "\
1099 #define LINK_OS_NETBSD_SPEC NETBSD_LINK_SPEC_ELF
1101 #define CPP_OS_NETBSD_SPEC "\
1102 -D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
1104 #define CC1_OS_NETBSD_SPEC "\
1107 /* OpenBSD support. */
1108 #ifndef LIB_OPENBSD_SPEC
1109 #define LIB_OPENBSD_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
1112 #ifndef STARTFILE_OPENBSD_SPEC
1113 #define STARTFILE_OPENBSD_SPEC "\
1114 %{!shared: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
1115 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
1118 #ifndef ENDFILE_OPENBSD_SPEC
1119 #define ENDFILE_OPENBSD_SPEC "\
1120 %{!shared:crtend.o%s} %{shared:crtendS.o%s}"
1123 #ifndef LINK_START_OPENBSD_SPEC
1124 #define LINK_START_OPENBSD_SPEC "-Ttext 0x400074"
1127 #ifndef LINK_OS_OPENBSD_SPEC
1128 #define LINK_OS_OPENBSD_SPEC ""
1131 #ifndef CPP_OS_OPENBSD_SPEC
1132 #define CPP_OS_OPENBSD_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
1135 /* WindISS support. */
1137 #define LIB_WINDISS_SPEC "--start-group -li -lcfp -lwindiss -lram -limpl -limpfp --end-group"
1139 #define CPP_OS_WINDISS_SPEC "\
1143 %{!msoft-float: -D__hardfp} \
1146 #define STARTFILE_WINDISS_SPEC "crt0.o%s crtbegin.o%s"
1148 #define ENDFILE_WINDISS_SPEC "crtend.o%s"
1150 #define LINK_START_WINDISS_SPEC ""
1152 #define LINK_OS_WINDISS_SPEC ""
1154 /* Define any extra SPECS that the compiler needs to generate. */
1155 /* Override rs6000.h definition. */
1156 #undef SUBTARGET_EXTRA_SPECS
1157 #define SUBTARGET_EXTRA_SPECS \
1158 { "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \
1159 { "lib_ads", LIB_ADS_SPEC }, \
1160 { "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \
1161 { "lib_mvme", LIB_MVME_SPEC }, \
1162 { "lib_sim", LIB_SIM_SPEC }, \
1163 { "lib_freebsd", LIB_FREEBSD_SPEC }, \
1164 { "lib_gnu", LIB_GNU_SPEC }, \
1165 { "lib_linux", LIB_LINUX_SPEC }, \
1166 { "lib_netbsd", LIB_NETBSD_SPEC }, \
1167 { "lib_openbsd", LIB_OPENBSD_SPEC }, \
1168 { "lib_windiss", LIB_WINDISS_SPEC }, \
1169 { "lib_default", LIB_DEFAULT_SPEC }, \
1170 { "startfile_ads", STARTFILE_ADS_SPEC }, \
1171 { "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \
1172 { "startfile_mvme", STARTFILE_MVME_SPEC }, \
1173 { "startfile_sim", STARTFILE_SIM_SPEC }, \
1174 { "startfile_freebsd", STARTFILE_FREEBSD_SPEC }, \
1175 { "startfile_gnu", STARTFILE_GNU_SPEC }, \
1176 { "startfile_linux", STARTFILE_LINUX_SPEC }, \
1177 { "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \
1178 { "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
1179 { "startfile_windiss", STARTFILE_WINDISS_SPEC }, \
1180 { "startfile_default", STARTFILE_DEFAULT_SPEC }, \
1181 { "endfile_ads", ENDFILE_ADS_SPEC }, \
1182 { "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \
1183 { "endfile_mvme", ENDFILE_MVME_SPEC }, \
1184 { "endfile_sim", ENDFILE_SIM_SPEC }, \
1185 { "endfile_freebsd", ENDFILE_FREEBSD_SPEC }, \
1186 { "endfile_gnu", ENDFILE_GNU_SPEC }, \
1187 { "endfile_linux", ENDFILE_LINUX_SPEC }, \
1188 { "endfile_netbsd", ENDFILE_NETBSD_SPEC }, \
1189 { "endfile_openbsd", ENDFILE_OPENBSD_SPEC }, \
1190 { "endfile_windiss", ENDFILE_WINDISS_SPEC }, \
1191 { "endfile_default", ENDFILE_DEFAULT_SPEC }, \
1192 { "link_path", LINK_PATH_SPEC }, \
1193 { "link_shlib", LINK_SHLIB_SPEC }, \
1194 { "link_target", LINK_TARGET_SPEC }, \
1195 { "link_start", LINK_START_SPEC }, \
1196 { "link_start_ads", LINK_START_ADS_SPEC }, \
1197 { "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \
1198 { "link_start_mvme", LINK_START_MVME_SPEC }, \
1199 { "link_start_sim", LINK_START_SIM_SPEC }, \
1200 { "link_start_freebsd", LINK_START_FREEBSD_SPEC }, \
1201 { "link_start_gnu", LINK_START_GNU_SPEC }, \
1202 { "link_start_linux", LINK_START_LINUX_SPEC }, \
1203 { "link_start_netbsd", LINK_START_NETBSD_SPEC }, \
1204 { "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
1205 { "link_start_windiss", LINK_START_WINDISS_SPEC }, \
1206 { "link_start_default", LINK_START_DEFAULT_SPEC }, \
1207 { "link_os", LINK_OS_SPEC }, \
1208 { "link_os_ads", LINK_OS_ADS_SPEC }, \
1209 { "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \
1210 { "link_os_mvme", LINK_OS_MVME_SPEC }, \
1211 { "link_os_sim", LINK_OS_SIM_SPEC }, \
1212 { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
1213 { "link_os_linux", LINK_OS_LINUX_SPEC }, \
1214 { "link_os_gnu", LINK_OS_GNU_SPEC }, \
1215 { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
1216 { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
1217 { "link_os_windiss", LINK_OS_WINDISS_SPEC }, \
1218 { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
1219 { "cc1_endian_big", CC1_ENDIAN_BIG_SPEC }, \
1220 { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \
1221 { "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \
1222 { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
1223 { "cc1_os_netbsd", CC1_OS_NETBSD_SPEC }, \
1224 { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
1225 { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
1226 { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
1227 { "cpp_os_sim", CPP_OS_SIM_SPEC }, \
1228 { "cpp_os_freebsd", CPP_OS_FREEBSD_SPEC }, \
1229 { "cpp_os_gnu", CPP_OS_GNU_SPEC }, \
1230 { "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
1231 { "cpp_os_netbsd", CPP_OS_NETBSD_SPEC }, \
1232 { "cpp_os_openbsd", CPP_OS_OPENBSD_SPEC }, \
1233 { "cpp_os_windiss", CPP_OS_WINDISS_SPEC }, \
1234 { "cpp_os_default", CPP_OS_DEFAULT_SPEC }, \
1235 { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }, \
1236 SUBSUBTARGET_EXTRA_SPECS
1238 #define SUBSUBTARGET_EXTRA_SPECS
1240 /* Define this macro as a C expression for the initializer of an
1241 array of string to tell the driver program which options are
1242 defaults for this target and thus do not need to be handled
1243 specially when using `MULTILIB_OPTIONS'.
1245 Do not define this macro if `MULTILIB_OPTIONS' is not defined in
1246 the target makefile fragment or if none of the options listed in
1247 `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
1249 #define MULTILIB_DEFAULTS { "mbig", "mcall-sysv" }
1251 /* Define this macro if the code for function profiling should come
1252 before the function prologue. Normally, the profiling code comes
1254 #define PROFILE_BEFORE_PROLOGUE 1
1256 /* Function name to call to do profiling. */
1257 #define RS6000_MCOUNT "_mcount"
1259 /* Define this macro (to a value of 1) if you want to support the
1260 Win32 style pragmas #pragma pack(push,<n>)' and #pragma
1261 pack(pop)'. The pack(push,<n>) pragma specifies the maximum
1262 alignment (in bytes) of fields within a structure, in much the
1263 same way as the __aligned__' and __packed__' __attribute__'s
1264 do. A pack value of zero resets the behavior to the default.
1265 Successive invocations of this pragma cause the previous values to
1266 be stacked, so that invocations of #pragma pack(pop)' will return
1267 to the previous value. */
1269 #define HANDLE_PRAGMA_PACK_PUSH_POP 1
1271 /* Select a format to encode pointers in exception handling data. CODE
1272 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
1273 true if the symbol may be affected by dynamic relocations. */
1274 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
1275 ((flag_pic || TARGET_RELOCATABLE) \
1276 ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
1279 #define DOUBLE_INT_ASM_OP "\t.quad\t"
1281 /* Generate entries in .fixup for relocatable addresses. */
1282 #define RELOCATABLE_NEEDS_FIXUP 1
1284 /* This target uses the sysv4.opt file. */
1285 #define TARGET_USES_SYSV4_OPT 1