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