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, 2007, 2008, 2009, 2010 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 3, 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 Under Section 7 of GPL version 3, you are granted additional
19 permissions described in the GCC Runtime Library Exception, version
20 3.1, as published by the Free Software Foundation.
22 You should have received a copy of the GNU General Public License and
23 a copy of the GCC Runtime Library Exception along with this program;
24 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25 <http://www.gnu.org/licenses/>. */
27 /* Header files should be C++ aware in general. */
28 #undef NO_IMPLICIT_EXTERN_C
29 #define NO_IMPLICIT_EXTERN_C
31 /* Yes! We are ELF. */
32 #define TARGET_OBJECT_FORMAT OBJECT_ELF
34 /* Default ABI to compile code for. */
35 #define DEFAULT_ABI rs6000_current_abi
37 /* Default ABI to use. */
38 #define RS6000_ABI_NAME "sysv"
40 /* Override rs6000.h definition. */
41 #undef ASM_DEFAULT_SPEC
42 #define ASM_DEFAULT_SPEC "-mppc"
44 /* Small data support types. */
45 enum rs6000_sdata_type {
46 SDATA_NONE, /* No small data support. */
47 SDATA_DATA, /* Just put data in .sbss/.sdata, don't use relocs. */
48 SDATA_SYSV, /* Use r13 to point to .sdata/.sbss. */
49 SDATA_EABI /* Use r13 like above, r2 points to .sdata2/.sbss2. */
52 extern enum rs6000_sdata_type rs6000_sdata;
54 #define TARGET_TOC ((target_flags & MASK_64BIT) \
55 || ((target_flags & (MASK_RELOCATABLE \
56 | MASK_MINIMAL_TOC)) \
58 || DEFAULT_ABI == ABI_AIX)
60 #define TARGET_BITFIELD_TYPE (! TARGET_NO_BITFIELD_TYPE)
61 #define TARGET_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
62 #define TARGET_PROTOTYPE target_prototype
63 #define TARGET_NO_PROTOTYPE (! TARGET_PROTOTYPE)
64 #define TARGET_NO_TOC (! TARGET_TOC)
65 #define TARGET_NO_EABI (! TARGET_EABI)
66 #define TARGET_REGNAMES rs6000_regnames
69 #undef TARGET_SECURE_PLT
70 #define TARGET_SECURE_PLT secure_plt
73 extern const char *rs6000_abi_name;
74 extern const char *rs6000_sdata_name;
75 extern const char *rs6000_tls_size_string; /* For -mtls-size= */
77 #define SDATA_DEFAULT_SIZE 8
79 /* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
80 get control in TARGET_OPTION_OVERRIDE. */
82 #define SUBTARGET_OVERRIDE_OPTIONS \
84 if (!global_options_set.x_g_switch_value) \
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")) \
117 rs6000_current_abi = ABI_V4; \
118 else if (!strcmp (rs6000_abi_name, "openbsd")) \
119 rs6000_current_abi = ABI_V4; \
120 else if (!strcmp (rs6000_abi_name, "i960-old")) \
122 rs6000_current_abi = ABI_V4; \
123 target_flags |= (MASK_LITTLE_ENDIAN | MASK_EABI); \
124 target_flags &= ~MASK_STRICT_ALIGN; \
125 TARGET_NO_BITFIELD_WORD = 1; \
129 rs6000_current_abi = ABI_V4; \
130 error ("bad value for -mcall-%s", rs6000_abi_name); \
133 if (rs6000_sdata_name) \
135 if (!strcmp (rs6000_sdata_name, "none")) \
136 rs6000_sdata = SDATA_NONE; \
137 else if (!strcmp (rs6000_sdata_name, "data")) \
138 rs6000_sdata = SDATA_DATA; \
139 else if (!strcmp (rs6000_sdata_name, "default")) \
140 rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV; \
141 else if (!strcmp (rs6000_sdata_name, "sysv")) \
142 rs6000_sdata = SDATA_SYSV; \
143 else if (!strcmp (rs6000_sdata_name, "eabi")) \
144 rs6000_sdata = SDATA_EABI; \
146 error ("bad value for -msdata=%s", rs6000_sdata_name); \
148 else if (DEFAULT_ABI == ABI_V4) \
150 rs6000_sdata = SDATA_DATA; \
151 rs6000_sdata_name = "data"; \
155 rs6000_sdata = SDATA_NONE; \
156 rs6000_sdata_name = "none"; \
159 if (TARGET_RELOCATABLE && \
160 (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV)) \
162 rs6000_sdata = SDATA_DATA; \
163 error ("-mrelocatable and -msdata=%s are incompatible", \
164 rs6000_sdata_name); \
167 else if (flag_pic && DEFAULT_ABI != ABI_AIX \
168 && (rs6000_sdata == SDATA_EABI \
169 || rs6000_sdata == SDATA_SYSV)) \
171 rs6000_sdata = SDATA_DATA; \
172 error ("-f%s and -msdata=%s are incompatible", \
173 (flag_pic > 1) ? "PIC" : "pic", \
174 rs6000_sdata_name); \
177 if ((rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4) \
178 || (rs6000_sdata == SDATA_EABI && !TARGET_EABI)) \
180 rs6000_sdata = SDATA_NONE; \
181 error ("-msdata=%s and -mcall-%s are incompatible", \
182 rs6000_sdata_name, rs6000_abi_name); \
185 targetm.have_srodata_section = rs6000_sdata == SDATA_EABI; \
187 if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC) \
189 target_flags |= MASK_MINIMAL_TOC; \
190 error ("-mrelocatable and -mno-minimal-toc are incompatible"); \
193 if (TARGET_RELOCATABLE && rs6000_current_abi == ABI_AIX) \
195 target_flags &= ~MASK_RELOCATABLE; \
196 error ("-mrelocatable and -mcall-%s are incompatible", \
200 if (!TARGET_64BIT && flag_pic > 1 && rs6000_current_abi == ABI_AIX) \
203 error ("-fPIC and -mcall-%s are incompatible", \
207 if (rs6000_current_abi == ABI_AIX && TARGET_LITTLE_ENDIAN) \
209 target_flags &= ~MASK_LITTLE_ENDIAN; \
210 error ("-mcall-aixdesc must be big endian"); \
213 if (TARGET_SECURE_PLT != secure_plt) \
215 error ("-msecure-plt not supported by your assembler"); \
218 /* Treat -fPIC the same as -mrelocatable. */ \
219 if (flag_pic > 1 && DEFAULT_ABI != ABI_AIX) \
221 target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC; \
222 TARGET_NO_FP_IN_TOC = 1; \
225 else if (TARGET_RELOCATABLE) \
229 #ifndef RS6000_BI_ARCH
230 # define SUBSUBTARGET_OVERRIDE_OPTIONS \
232 if ((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
233 error ("-m%s not supported in this configuration", \
234 (target_flags & MASK_64BIT) ? "64" : "32"); \
238 /* Override rs6000.h definition. */
239 #undef TARGET_DEFAULT
240 #define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
242 /* Override rs6000.h definition. */
243 #undef PROCESSOR_DEFAULT
244 #define PROCESSOR_DEFAULT PROCESSOR_PPC750
246 /* SVR4 only defined for PowerPC, so short-circuit POWER patterns. */
248 #define TARGET_POWER 0
251 /* System V.4 uses register 13 as a pointer to the small data area,
252 so it is not available to the normal user. */
255 /* Override default big endianism definitions in rs6000.h. */
256 #undef BYTES_BIG_ENDIAN
257 #undef WORDS_BIG_ENDIAN
258 #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN)
259 #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN)
261 /* Define cutoff for using external functions to save floating point.
262 When optimizing for size, use external functions when profitable. */
263 #define FP_SAVE_INLINE(FIRST_REG) (optimize_size \
264 ? ((FIRST_REG) == 62 \
265 || (FIRST_REG) == 63) \
267 /* And similarly for general purpose registers. */
268 #define GP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 32 \
271 /* Put jump tables in read-only memory, rather than in .text. */
272 #define JUMP_TABLES_IN_TEXT_SECTION 0
274 /* Prefix and suffix to use to saving floating point. */
275 #define SAVE_FP_PREFIX "_savefpr_"
276 #define SAVE_FP_SUFFIX ""
278 /* Prefix and suffix to use to restoring floating point. */
279 #define RESTORE_FP_PREFIX "_restfpr_"
280 #define RESTORE_FP_SUFFIX ""
282 /* Type used for ptrdiff_t, as a string used in a declaration. */
283 #define PTRDIFF_TYPE "int"
285 /* Type used for wchar_t, as a string used in a declaration. */
286 /* Override svr4.h definition. */
288 #define WCHAR_TYPE "long int"
290 /* Width of wchar_t in bits. */
291 /* Override svr4.h definition. */
292 #undef WCHAR_TYPE_SIZE
293 #define WCHAR_TYPE_SIZE 32
295 /* Make int foo : 8 not cause structures to be aligned to an int boundary. */
296 /* Override elfos.h definition. */
297 #undef PCC_BITFIELD_TYPE_MATTERS
298 #define PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)
300 #undef BITFIELD_NBYTES_LIMITED
301 #define BITFIELD_NBYTES_LIMITED (TARGET_NO_BITFIELD_WORD)
303 /* Define this macro to be the value 1 if instructions will fail to
304 work if given data not on the nominal alignment. If instructions
305 will merely go slower in that case, define this macro as 0. */
306 #undef STRICT_ALIGNMENT
307 #define STRICT_ALIGNMENT (TARGET_STRICT_ALIGN)
309 /* Define this macro if you wish to preserve a certain alignment for
310 the stack pointer, greater than what the hardware enforces. The
311 definition is a C expression for the desired alignment (measured
312 in bits). This macro must evaluate to a value equal to or larger
314 For the SYSV ABI and variants the alignment of the stack pointer
315 is usually controlled manually in rs6000.c. However, to maintain
316 alignment across alloca () in all circumstances,
317 PREFERRED_STACK_BOUNDARY needs to be set as well.
318 This has the additional advantage of allowing a bigger maximum
319 alignment of user objects on the stack. */
321 #undef PREFERRED_STACK_BOUNDARY
322 #define PREFERRED_STACK_BOUNDARY 128
324 /* Real stack boundary as mandated by the appropriate ABI. */
325 #define ABI_STACK_BOUNDARY \
326 ((TARGET_EABI && !TARGET_ALTIVEC && !TARGET_ALTIVEC_ABI) ? 64 : 128)
328 /* An expression for the alignment of a structure field FIELD if the
329 alignment computed in the usual way is COMPUTED. */
330 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
331 ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
334 #undef BIGGEST_FIELD_ALIGNMENT
336 /* Use ELF style section commands. */
338 #define TEXT_SECTION_ASM_OP "\t.section\t\".text\""
340 #define DATA_SECTION_ASM_OP "\t.section\t\".data\""
342 #define BSS_SECTION_ASM_OP "\t.section\t\".bss\""
344 /* Override elfos.h definition. */
345 #undef INIT_SECTION_ASM_OP
346 #define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""
348 /* Override elfos.h definition. */
349 #undef FINI_SECTION_ASM_OP
350 #define FINI_SECTION_ASM_OP "\t.section\t\".fini\",\"ax\""
352 #define TOC_SECTION_ASM_OP "\t.section\t\".got\",\"aw\""
354 /* Put PC relative got entries in .got2. */
355 #define MINIMAL_TOC_SECTION_ASM_OP \
356 (TARGET_RELOCATABLE || (flag_pic && DEFAULT_ABI != ABI_AIX) \
357 ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")
359 #define SDATA_SECTION_ASM_OP "\t.section\t\".sdata\",\"aw\""
360 #define SDATA2_SECTION_ASM_OP "\t.section\t\".sdata2\",\"a\""
361 #define SBSS_SECTION_ASM_OP "\t.section\t\".sbss\",\"aw\",@nobits"
363 /* Override default elf definitions. */
364 #define TARGET_ASM_INIT_SECTIONS rs6000_elf_asm_init_sections
365 #undef TARGET_ASM_RELOC_RW_MASK
366 #define TARGET_ASM_RELOC_RW_MASK rs6000_elf_reloc_rw_mask
367 #undef TARGET_ASM_SELECT_RTX_SECTION
368 #define TARGET_ASM_SELECT_RTX_SECTION rs6000_elf_select_rtx_section
370 /* Return nonzero if this entry is to be written into the constant pool
371 in a special way. We do so if this is a SYMBOL_REF, LABEL_REF or a CONST
372 containing one of them. If -mfp-in-toc (the default), we also do
373 this for floating-point constants. We actually can only do this
374 if the FP formats of the target and host machines are the same, but
375 we can't check that since not every file that uses these target macros
378 Unlike AIX, we don't key off of -mminimal-toc, but instead do not
379 allow floating point constants in the TOC if -mrelocatable. */
381 #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
382 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \
384 && (GET_CODE (X) == SYMBOL_REF \
385 || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \
386 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \
387 || GET_CODE (X) == LABEL_REF \
388 || (GET_CODE (X) == CONST_INT \
389 && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \
390 || (!TARGET_NO_FP_IN_TOC \
391 && !TARGET_RELOCATABLE \
392 && GET_CODE (X) == CONST_DOUBLE \
393 && SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
394 && BITS_PER_WORD == HOST_BITS_PER_INT)))
396 /* These macros generate the special .type and .size directives which
397 are used to set the corresponding fields of the linker symbol table
398 entries in an ELF object file under SVR4. These macros also output
399 the starting labels for the relevant functions/objects. */
401 /* Write the extra assembler code needed to declare a function properly.
402 Some svr4 assemblers need to also have something extra said about the
403 function's return value. We allow for that here. */
405 extern int rs6000_pic_labelno;
407 /* Override elfos.h definition. */
408 #undef ASM_DECLARE_FUNCTION_NAME
409 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
410 rs6000_elf_declare_function_name ((FILE), (NAME), (DECL))
412 /* The USER_LABEL_PREFIX stuff is affected by the -fleading-underscore
413 flag. The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */
415 #define LOCAL_LABEL_PREFIX "."
416 #define USER_LABEL_PREFIX ""
418 /* svr4.h overrides (*targetm.asm_out.internal_label). */
420 #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
421 asm_fprintf (FILE, "%L%s", PREFIX)
423 /* Globalizing directive for a label. */
424 #define GLOBAL_ASM_OP "\t.globl "
426 /* This says how to output assembler code to declare an
427 uninitialized internal linkage data object. Under SVR4,
428 the linker seems to want the alignment of data objects
429 to depend on their types. We do exactly that here. */
431 #define LOCAL_ASM_OP "\t.local\t"
433 #define LCOMM_ASM_OP "\t.lcomm\t"
435 /* Describe how to emit uninitialized local items. */
436 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
438 if ((DECL) && rs6000_elf_in_small_data_p (DECL)) \
440 switch_to_section (sbss_section); \
441 ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \
442 ASM_OUTPUT_LABEL (FILE, NAME); \
443 ASM_OUTPUT_SKIP (FILE, SIZE); \
444 if (!flag_inhibit_size_directive && (SIZE) > 0) \
445 ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
449 fprintf (FILE, "%s", LCOMM_ASM_OP); \
450 assemble_name ((FILE), (NAME)); \
451 fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
452 (SIZE), (ALIGN) / BITS_PER_UNIT); \
454 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
457 /* Describe how to emit uninitialized external linkage items. */
458 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
460 ASM_OUTPUT_ALIGNED_DECL_LOCAL (FILE, DECL, NAME, SIZE, ALIGN); \
463 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
464 /* To support -falign-* switches we need to use .p2align so
465 that alignment directives in code sections will be padded
466 with no-op instructions, rather than zeroes. */
467 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
470 if ((MAX_SKIP) == 0) \
471 fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
473 fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
477 /* This is how to output code to push a register on the stack.
478 It need not be very fast code.
480 On the rs6000, we must keep the backchain up to date. In order
481 to simplify things, always allocate 16 bytes for a push (System V
482 wants to keep stack aligned to a 16 byte boundary). */
484 #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) \
486 if (DEFAULT_ABI == ABI_V4) \
488 "\t{stu|stwu} %s,-16(%s)\n\t{st|stw} %s,12(%s)\n", \
489 reg_names[1], reg_names[1], reg_names[REGNO], \
493 /* This is how to output an insn to pop a register from the stack.
494 It need not be very fast code. */
496 #define ASM_OUTPUT_REG_POP(FILE, REGNO) \
498 if (DEFAULT_ABI == ABI_V4) \
500 "\t{l|lwz} %s,12(%s)\n\t{ai|addic} %s,%s,16\n", \
501 reg_names[REGNO], reg_names[1], reg_names[1], \
505 /* Switch Recognition by gcc.c. Add -G xx support. */
507 /* Override svr4.h definition. */
508 #undef SWITCH_TAKES_ARG
509 #define SWITCH_TAKES_ARG(CHAR) \
510 (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
512 extern int fixuplabelno;
514 /* Handle constructors specially for -mrelocatable. */
515 #define TARGET_ASM_CONSTRUCTOR rs6000_elf_asm_out_constructor
516 #define TARGET_ASM_DESTRUCTOR rs6000_elf_asm_out_destructor
518 /* This is the end of what might become sysv4.h. */
520 /* Use DWARF 2 debugging information by default. */
521 #undef PREFERRED_DEBUGGING_TYPE
522 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
524 /* Historically we have also supported stabs debugging. */
525 #define DBX_DEBUGGING_INFO 1
527 #define TARGET_ENCODE_SECTION_INFO rs6000_elf_encode_section_info
528 #define TARGET_IN_SMALL_DATA_P rs6000_elf_in_small_data_p
530 /* The ELF version doesn't encode [DS] or whatever at the end of symbols. */
532 #define RS6000_OUTPUT_BASENAME(FILE, NAME) \
533 assemble_name (FILE, NAME)
535 /* We have to output the stabs for the function name *first*, before
536 outputting its label. */
538 #define DBX_FUNCTION_FIRST
540 /* This is the end of what might become sysv4dbx.h. */
542 #ifndef TARGET_VERSION
543 #define TARGET_VERSION fprintf (stderr, " (PowerPC System V.4)");
546 #define TARGET_OS_SYSV_CPP_BUILTINS() \
549 if (target_flags_explicit \
550 & MASK_RELOCATABLE) \
551 builtin_define ("_RELOCATABLE"); \
555 #ifndef TARGET_OS_CPP_BUILTINS
556 #define TARGET_OS_CPP_BUILTINS() \
559 builtin_define_std ("PPC"); \
560 builtin_define_std ("unix"); \
561 builtin_define ("__svr4__"); \
562 builtin_assert ("system=unix"); \
563 builtin_assert ("system=svr4"); \
564 builtin_assert ("cpu=powerpc"); \
565 builtin_assert ("machine=powerpc"); \
566 TARGET_OS_SYSV_CPP_BUILTINS (); \
571 /* Pass various options to the assembler. */
572 /* Override svr4.h definition. */
574 #define ASM_SPEC "%(asm_cpu) \
575 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \
577 "%{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \
578 %{memb|msdata=eabi: -memb} \
579 %{mlittle|mlittle-endian:-mlittle; \
580 mbig|mbig-endian :-mbig; \
587 mcall-i960-old :-mlittle}"
589 #define CC1_ENDIAN_BIG_SPEC ""
591 #define CC1_ENDIAN_LITTLE_SPEC "\
592 %{!mstrict-align: %{!mno-strict-align: \
598 #define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big)"
600 #ifndef CC1_SECURE_PLT_DEFAULT_SPEC
601 #define CC1_SECURE_PLT_DEFAULT_SPEC ""
604 /* Pass -G xxx to the compiler and set correct endian mode. */
605 #define CC1_SPEC "%{G*} %(cc1_cpu) \
606 %{mlittle|mlittle-endian: %(cc1_endian_little); \
607 mbig |mbig-endian : %(cc1_endian_big); \
613 mcall-gnu : -mbig %(cc1_endian_big); \
614 mcall-i960-old : -mlittle %(cc1_endian_little); \
615 : %(cc1_endian_default)} \
616 %{meabi: %{!mcall-*: -mcall-sysv }} \
617 %{!meabi: %{!mno-eabi: \
618 %{mrelocatable: -meabi } \
619 %{mcall-freebsd: -mno-eabi } \
620 %{mcall-i960-old: -meabi } \
621 %{mcall-linux: -mno-eabi } \
622 %{mcall-gnu: -mno-eabi } \
623 %{mcall-netbsd: -mno-eabi } \
624 %{mcall-openbsd: -mno-eabi }}} \
625 %{msdata: -msdata=default} \
626 %{mno-sdata: -msdata=none} \
627 %{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \
630 /* Don't put -Y P,<path> for cross compilers. */
631 #ifndef CROSS_DIRECTORY_STRUCTURE
632 #define LINK_PATH_SPEC "\
634 %{!nostdlib: %{!YP,*: \
636 %{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
637 %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
638 %{!R*: %{!L*: -R /usr/ucblib}} \
640 %{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
641 %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}}"
644 #define LINK_PATH_SPEC ""
647 /* Default starting address if specified. */
648 #define LINK_START_SPEC "\
649 %{mads : %(link_start_ads) ; \
650 myellowknife : %(link_start_yellowknife) ; \
651 mmvme : %(link_start_mvme) ; \
652 msim : %(link_start_sim) ; \
653 mcall-freebsd: %(link_start_freebsd) ; \
654 mcall-linux : %(link_start_linux) ; \
655 mcall-gnu : %(link_start_gnu) ; \
656 mcall-netbsd : %(link_start_netbsd) ; \
657 mcall-openbsd: %(link_start_openbsd) ; \
658 : %(link_start_default) }"
660 #define LINK_START_DEFAULT_SPEC ""
662 /* Override svr4.h definition. */
665 %{h*} %{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} \
669 %{!Wl,-T*: %{!T*: %(link_start) }} \
673 /* For now, turn off shared libraries by default. */
674 #ifndef SHARED_LIB_SUPPORT
675 #define NO_SHARED_LIB_SUPPORT
678 #ifndef NO_SHARED_LIB_SUPPORT
679 /* Shared libraries are default. */
680 #define LINK_SHLIB_SPEC "\
681 %{!static: %(link_path) %{!R*:%{L*:-R %*}}} \
683 %{static:-dn -Bstatic} \
684 %{shared:-G -dy -z text} \
685 %{symbolic:-Bsymbolic -G -dy -z text}"
688 /* Shared libraries are not default. */
689 #define LINK_SHLIB_SPEC "\
690 %{mshlib: %(link_path) } \
691 %{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \
693 %{shared:-G -dy -z text %(link_path) } \
694 %{symbolic:-Bsymbolic -G -dy -z text %(link_path) }"
697 /* Override the default target of the linker. */
698 #define LINK_TARGET_SPEC "\
699 %{mlittle: --oformat elf32-powerpcle } %{mlittle-endian: --oformat elf32-powerpcle } \
700 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
701 %{mcall-i960-old: --oformat elf32-powerpcle} \
704 /* Any specific OS flags. */
705 #define LINK_OS_SPEC "\
706 %{mads : %(link_os_ads) ; \
707 myellowknife : %(link_os_yellowknife) ; \
708 mmvme : %(link_os_mvme) ; \
709 msim : %(link_os_sim) ; \
710 mcall-freebsd: %(link_os_freebsd) ; \
711 mcall-linux : %(link_os_linux) ; \
712 mcall-gnu : %(link_os_gnu) ; \
713 mcall-netbsd : %(link_os_netbsd) ; \
714 mcall-openbsd: %(link_os_openbsd) ; \
715 : %(link_os_default) }"
717 #define LINK_OS_DEFAULT_SPEC ""
719 #define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \
720 %<msingle-float %<mdouble-float}"
722 /* Override rs6000.h definition. */
724 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
725 %{mads : %(cpp_os_ads) ; \
726 myellowknife : %(cpp_os_yellowknife) ; \
727 mmvme : %(cpp_os_mvme) ; \
728 msim : %(cpp_os_sim) ; \
729 mcall-freebsd: %(cpp_os_freebsd) ; \
730 mcall-linux : %(cpp_os_linux) ; \
731 mcall-gnu : %(cpp_os_gnu) ; \
732 mcall-netbsd : %(cpp_os_netbsd) ; \
733 mcall-openbsd: %(cpp_os_openbsd) ; \
734 : %(cpp_os_default) }"
736 #define CPP_OS_DEFAULT_SPEC ""
738 /* Override svr4.h definition. */
739 #undef STARTFILE_SPEC
740 #define STARTFILE_SPEC "\
741 %{mads : %(startfile_ads) ; \
742 myellowknife : %(startfile_yellowknife) ; \
743 mmvme : %(startfile_mvme) ; \
744 msim : %(startfile_sim) ; \
745 mcall-freebsd: %(startfile_freebsd) ; \
746 mcall-linux : %(startfile_linux) ; \
747 mcall-gnu : %(startfile_gnu) ; \
748 mcall-netbsd : %(startfile_netbsd) ; \
749 mcall-openbsd: %(startfile_openbsd) ; \
750 : %(startfile_default) }"
752 #define STARTFILE_DEFAULT_SPEC "ecrti.o%s crtbegin.o%s"
754 /* Override svr4.h definition. */
757 %{mads : %(lib_ads) ; \
758 myellowknife : %(lib_yellowknife) ; \
759 mmvme : %(lib_mvme) ; \
760 msim : %(lib_sim) ; \
761 mcall-freebsd: %(lib_freebsd) ; \
762 mcall-linux : %(lib_linux) ; \
763 mcall-gnu : %(lib_gnu) ; \
764 mcall-netbsd : %(lib_netbsd) ; \
765 mcall-openbsd: %(lib_openbsd) ; \
768 #define LIB_DEFAULT_SPEC "-lc"
770 /* Override svr4.h definition. */
772 #define ENDFILE_SPEC "\
773 %{mads : %(endfile_ads) ; \
774 myellowknife : %(endfile_yellowknife) ; \
775 mmvme : %(endfile_mvme) ; \
776 msim : %(endfile_sim) ; \
777 mcall-freebsd: %(endfile_freebsd) ; \
778 mcall-linux : %(endfile_linux) ; \
779 mcall-gnu : %(endfile_gnu) ; \
780 mcall-netbsd : %(endfile_netbsd) ; \
781 mcall-openbsd: %(endfile_openbsd) ; \
782 : %(crtsavres_default) %(endfile_default) }"
784 #define CRTSAVRES_DEFAULT_SPEC ""
786 #define ENDFILE_DEFAULT_SPEC "crtend.o%s ecrtn.o%s"
788 /* Motorola ADS support. */
789 #define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
791 #define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
793 #define ENDFILE_ADS_SPEC "crtend.o%s ecrtn.o%s"
795 #define LINK_START_ADS_SPEC "-T ads.ld%s"
797 #define LINK_OS_ADS_SPEC ""
799 #define CPP_OS_ADS_SPEC ""
801 /* Motorola Yellowknife support. */
802 #define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
804 #define STARTFILE_YELLOWKNIFE_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
806 #define ENDFILE_YELLOWKNIFE_SPEC "crtend.o%s ecrtn.o%s"
808 #define LINK_START_YELLOWKNIFE_SPEC "-T yellowknife.ld%s"
810 #define LINK_OS_YELLOWKNIFE_SPEC ""
812 #define CPP_OS_YELLOWKNIFE_SPEC ""
814 /* Motorola MVME support. */
815 #define LIB_MVME_SPEC "--start-group -lmvme -lc --end-group"
817 #define STARTFILE_MVME_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
819 #define ENDFILE_MVME_SPEC "crtend.o%s ecrtn.o%s"
821 #define LINK_START_MVME_SPEC "-Ttext 0x40000"
823 #define LINK_OS_MVME_SPEC ""
825 #define CPP_OS_MVME_SPEC ""
827 /* PowerPC simulator based on netbsd system calls support. */
828 #define LIB_SIM_SPEC "--start-group -lsim -lc --end-group"
830 #define STARTFILE_SIM_SPEC "ecrti.o%s sim-crt0.o%s crtbegin.o%s"
832 #define ENDFILE_SIM_SPEC "crtend.o%s ecrtn.o%s"
834 #define LINK_START_SIM_SPEC ""
836 #define LINK_OS_SIM_SPEC "-m elf32ppcsim"
838 #define CPP_OS_SIM_SPEC ""
840 /* FreeBSD support. */
842 #define CPP_OS_FREEBSD_SPEC "\
843 -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ \
844 -Acpu=powerpc -Amachine=powerpc"
846 #define STARTFILE_FREEBSD_SPEC FBSD_STARTFILE_SPEC
847 #define ENDFILE_FREEBSD_SPEC FBSD_ENDFILE_SPEC
848 #define LIB_FREEBSD_SPEC FBSD_LIB_SPEC
849 #define LINK_START_FREEBSD_SPEC ""
851 #define LINK_OS_FREEBSD_SPEC "\
852 %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \
854 %{assert*} %{R*} %{rpath*} %{defsym*} \
855 %{shared:-Bshareable %{h*} %{soname*}} \
858 %{rdynamic: -export-dynamic} \
859 %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \
860 %{static:-Bstatic}} \
861 %{symbolic:-Bsymbolic}"
863 /* GNU/Linux support. */
864 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
865 %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \
866 %{!shared: %{profile:-lc_p} %{!profile:-lc}}}"
869 #define STARTFILE_LINUX_SPEC "\
870 %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
871 %{mnewlib:ecrti.o%s;:crti.o%s} \
872 %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
874 #define STARTFILE_LINUX_SPEC "\
875 %{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
876 %{mnewlib:ecrti.o%s;:crti.o%s} \
877 %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
880 #define ENDFILE_LINUX_SPEC "\
881 %{shared|pie:crtendS.o%s;:crtend.o%s} \
882 %{mnewlib:ecrtn.o%s;:crtn.o%s}"
884 #define LINK_START_LINUX_SPEC ""
886 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
887 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
888 #if DEFAULT_LIBC == LIBC_UCLIBC
889 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
890 #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
891 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
893 #error "Unsupported DEFAULT_LIBC"
895 #define LINUX_DYNAMIC_LINKER \
896 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
898 #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
899 %{rdynamic:-export-dynamic} \
900 %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}"
902 #if defined(HAVE_LD_EH_FRAME_HDR)
903 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
906 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
909 %{!std=*:-Dunix -D__unix -Dlinux -D__linux} \
910 %{std=gnu*:-Dunix -D__unix -Dlinux -D__linux}}} \
911 -Asystem=linux -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
913 /* GNU/Hurd support. */
914 #define LIB_GNU_SPEC "%{mnewlib: --start-group -lgnu -lc --end-group } \
915 %{!mnewlib: %{shared:-lc} %{!shared: %{pthread:-lpthread } \
916 %{profile:-lc_p} %{!profile:-lc}}}"
918 #define STARTFILE_GNU_SPEC "\
919 %{!shared: %{!static: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}} \
920 %{static: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
921 %{mnewlib: ecrti.o%s} %{!mnewlib: crti.o%s} \
922 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
924 #define ENDFILE_GNU_SPEC "%{!shared:crtend.o%s} %{shared:crtendS.o%s} \
925 %{mnewlib: ecrtn.o%s} %{!mnewlib: crtn.o%s}"
927 #define LINK_START_GNU_SPEC ""
929 #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
930 %{rdynamic:-export-dynamic} \
931 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
933 #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__ \
935 %{!ansi: -Dunix -D__unix}} \
936 -Asystem=gnu -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
938 /* NetBSD support. */
939 #define LIB_NETBSD_SPEC "\
940 %{profile:-lgmon -lc_p} %{!profile:-lc}"
942 #define STARTFILE_NETBSD_SPEC "\
944 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
946 #define ENDFILE_NETBSD_SPEC "\
947 %{!shared:crtend.o%s} %{shared:crtendS.o%s} \
950 #define LINK_START_NETBSD_SPEC "\
953 #define LINK_OS_NETBSD_SPEC "\
954 %{!shared: %{!static: \
955 %{rdynamic:-export-dynamic} \
956 %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}}}"
958 #define CPP_OS_NETBSD_SPEC "\
959 -D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
961 /* OpenBSD support. */
962 #ifndef LIB_OPENBSD_SPEC
963 #define LIB_OPENBSD_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
966 #ifndef STARTFILE_OPENBSD_SPEC
967 #define STARTFILE_OPENBSD_SPEC "\
968 %{!shared: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
969 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
972 #ifndef ENDFILE_OPENBSD_SPEC
973 #define ENDFILE_OPENBSD_SPEC "\
974 %{!shared:crtend.o%s} %{shared:crtendS.o%s}"
977 #ifndef LINK_START_OPENBSD_SPEC
978 #define LINK_START_OPENBSD_SPEC "-Ttext 0x400074"
981 #ifndef LINK_OS_OPENBSD_SPEC
982 #define LINK_OS_OPENBSD_SPEC ""
985 #ifndef CPP_OS_OPENBSD_SPEC
986 #define CPP_OS_OPENBSD_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
989 /* Define any extra SPECS that the compiler needs to generate. */
990 /* Override rs6000.h definition. */
991 #undef SUBTARGET_EXTRA_SPECS
992 #define SUBTARGET_EXTRA_SPECS \
993 { "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \
994 { "lib_ads", LIB_ADS_SPEC }, \
995 { "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \
996 { "lib_mvme", LIB_MVME_SPEC }, \
997 { "lib_sim", LIB_SIM_SPEC }, \
998 { "lib_freebsd", LIB_FREEBSD_SPEC }, \
999 { "lib_gnu", LIB_GNU_SPEC }, \
1000 { "lib_linux", LIB_LINUX_SPEC }, \
1001 { "lib_netbsd", LIB_NETBSD_SPEC }, \
1002 { "lib_openbsd", LIB_OPENBSD_SPEC }, \
1003 { "lib_default", LIB_DEFAULT_SPEC }, \
1004 { "startfile_ads", STARTFILE_ADS_SPEC }, \
1005 { "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \
1006 { "startfile_mvme", STARTFILE_MVME_SPEC }, \
1007 { "startfile_sim", STARTFILE_SIM_SPEC }, \
1008 { "startfile_freebsd", STARTFILE_FREEBSD_SPEC }, \
1009 { "startfile_gnu", STARTFILE_GNU_SPEC }, \
1010 { "startfile_linux", STARTFILE_LINUX_SPEC }, \
1011 { "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \
1012 { "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
1013 { "startfile_default", STARTFILE_DEFAULT_SPEC }, \
1014 { "endfile_ads", ENDFILE_ADS_SPEC }, \
1015 { "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \
1016 { "endfile_mvme", ENDFILE_MVME_SPEC }, \
1017 { "endfile_sim", ENDFILE_SIM_SPEC }, \
1018 { "endfile_freebsd", ENDFILE_FREEBSD_SPEC }, \
1019 { "endfile_gnu", ENDFILE_GNU_SPEC }, \
1020 { "endfile_linux", ENDFILE_LINUX_SPEC }, \
1021 { "endfile_netbsd", ENDFILE_NETBSD_SPEC }, \
1022 { "endfile_openbsd", ENDFILE_OPENBSD_SPEC }, \
1023 { "endfile_default", ENDFILE_DEFAULT_SPEC }, \
1024 { "link_path", LINK_PATH_SPEC }, \
1025 { "link_shlib", LINK_SHLIB_SPEC }, \
1026 { "link_target", LINK_TARGET_SPEC }, \
1027 { "link_start", LINK_START_SPEC }, \
1028 { "link_start_ads", LINK_START_ADS_SPEC }, \
1029 { "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \
1030 { "link_start_mvme", LINK_START_MVME_SPEC }, \
1031 { "link_start_sim", LINK_START_SIM_SPEC }, \
1032 { "link_start_freebsd", LINK_START_FREEBSD_SPEC }, \
1033 { "link_start_gnu", LINK_START_GNU_SPEC }, \
1034 { "link_start_linux", LINK_START_LINUX_SPEC }, \
1035 { "link_start_netbsd", LINK_START_NETBSD_SPEC }, \
1036 { "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
1037 { "link_start_default", LINK_START_DEFAULT_SPEC }, \
1038 { "link_os", LINK_OS_SPEC }, \
1039 { "link_os_ads", LINK_OS_ADS_SPEC }, \
1040 { "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \
1041 { "link_os_mvme", LINK_OS_MVME_SPEC }, \
1042 { "link_os_sim", LINK_OS_SIM_SPEC }, \
1043 { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
1044 { "link_os_linux", LINK_OS_LINUX_SPEC }, \
1045 { "link_os_gnu", LINK_OS_GNU_SPEC }, \
1046 { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
1047 { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
1048 { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
1049 { "cc1_endian_big", CC1_ENDIAN_BIG_SPEC }, \
1050 { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \
1051 { "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \
1052 { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
1053 { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
1054 { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
1055 { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
1056 { "cpp_os_sim", CPP_OS_SIM_SPEC }, \
1057 { "cpp_os_freebsd", CPP_OS_FREEBSD_SPEC }, \
1058 { "cpp_os_gnu", CPP_OS_GNU_SPEC }, \
1059 { "cpp_os_linux", CPP_OS_LINUX_SPEC }, \
1060 { "cpp_os_netbsd", CPP_OS_NETBSD_SPEC }, \
1061 { "cpp_os_openbsd", CPP_OS_OPENBSD_SPEC }, \
1062 { "cpp_os_default", CPP_OS_DEFAULT_SPEC }, \
1063 { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }, \
1064 SUBSUBTARGET_EXTRA_SPECS
1066 #define SUBSUBTARGET_EXTRA_SPECS
1068 /* Define this macro as a C expression for the initializer of an
1069 array of string to tell the driver program which options are
1070 defaults for this target and thus do not need to be handled
1071 specially when using `MULTILIB_OPTIONS'.
1073 Do not define this macro if `MULTILIB_OPTIONS' is not defined in
1074 the target makefile fragment or if none of the options listed in
1075 `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
1077 #define MULTILIB_DEFAULTS { "mbig", "mcall-sysv" }
1079 /* Define this macro if the code for function profiling should come
1080 before the function prologue. Normally, the profiling code comes
1082 #define PROFILE_BEFORE_PROLOGUE 1
1084 /* Function name to call to do profiling. */
1085 #define RS6000_MCOUNT "_mcount"
1087 /* Define this macro (to a value of 1) if you want to support the
1088 Win32 style pragmas #pragma pack(push,<n>)' and #pragma
1089 pack(pop)'. The pack(push,<n>) pragma specifies the maximum
1090 alignment (in bytes) of fields within a structure, in much the
1091 same way as the __aligned__' and __packed__' __attribute__'s
1092 do. A pack value of zero resets the behavior to the default.
1093 Successive invocations of this pragma cause the previous values to
1094 be stacked, so that invocations of #pragma pack(pop)' will return
1095 to the previous value. */
1097 #define HANDLE_PRAGMA_PACK_PUSH_POP 1
1099 /* Select a format to encode pointers in exception handling data. CODE
1100 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
1101 true if the symbol may be affected by dynamic relocations. */
1102 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
1103 ((flag_pic || TARGET_RELOCATABLE) \
1104 ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
1107 #define DOUBLE_INT_ASM_OP "\t.quad\t"
1109 /* Generate entries in .fixup for relocatable addresses. */
1110 #define RELOCATABLE_NEEDS_FIXUP 1
1112 /* This target uses the sysv4.opt file. */
1113 #define TARGET_USES_SYSV4_OPT 1