OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [rs6000/] [sysv4.h] - Blame information for rev 718

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 709 jeremybenn
/* 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, 2011
4
   Free Software Foundation, Inc.
5
   Contributed by Cygnus Support.
6
 
7
   This file is part of GCC.
8
 
9
   GCC is free software; you can redistribute it and/or modify it
10
   under the terms of the GNU General Public License as published
11
   by the Free Software Foundation; either version 3, or (at your
12
   option) any later version.
13
 
14
   GCC is distributed in the hope that it will be useful, but WITHOUT
15
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
17
   License for more details.
18
 
19
   Under Section 7 of GPL version 3, you are granted additional
20
   permissions described in the GCC Runtime Library Exception, version
21
   3.1, as published by the Free Software Foundation.
22
 
23
   You should have received a copy of the GNU General Public License and
24
   a copy of the GCC Runtime Library Exception along with this program;
25
   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
26
   <http://www.gnu.org/licenses/>.  */
27
 
28
/* Header files should be C++ aware in general.  */
29
#undef  NO_IMPLICIT_EXTERN_C
30
#define NO_IMPLICIT_EXTERN_C
31
 
32
/* Yes!  We are ELF.  */
33
#define TARGET_OBJECT_FORMAT OBJECT_ELF
34
 
35
/* Default ABI to compile code for.  */
36
#define DEFAULT_ABI rs6000_current_abi
37
 
38
/* Default ABI to use.  */
39
#define RS6000_ABI_NAME "sysv"
40
 
41
/* Override rs6000.h definition.  */
42
#undef  ASM_DEFAULT_SPEC
43
#define ASM_DEFAULT_SPEC "-mppc"
44
 
45
#define TARGET_TOC              ((target_flags & MASK_64BIT)            \
46
                                 || ((target_flags & (MASK_RELOCATABLE  \
47
                                                      | MASK_MINIMAL_TOC)) \
48
                                     && flag_pic > 1)                   \
49
                                 || DEFAULT_ABI == ABI_AIX)
50
 
51
#define TARGET_BITFIELD_TYPE    (! TARGET_NO_BITFIELD_TYPE)
52
#define TARGET_BIG_ENDIAN       (! TARGET_LITTLE_ENDIAN)
53
#define TARGET_PROTOTYPE        target_prototype
54
#define TARGET_NO_PROTOTYPE     (! TARGET_PROTOTYPE)
55
#define TARGET_NO_TOC           (! TARGET_TOC)
56
#define TARGET_NO_EABI          (! TARGET_EABI)
57
#define TARGET_REGNAMES         rs6000_regnames
58
 
59
#ifdef HAVE_AS_REL16
60
#undef TARGET_SECURE_PLT
61
#define TARGET_SECURE_PLT       secure_plt
62
#endif
63
 
64
#define SDATA_DEFAULT_SIZE 8
65
 
66
/* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to
67
   get control in TARGET_OPTION_OVERRIDE.  */
68
 
69
#define SUBTARGET_OVERRIDE_OPTIONS                                      \
70
do {                                                                    \
71
  if (!global_options_set.x_g_switch_value)                             \
72
    g_switch_value = SDATA_DEFAULT_SIZE;                                \
73
                                                                        \
74
  if (rs6000_abi_name == NULL)                                          \
75
    rs6000_abi_name = RS6000_ABI_NAME;                                  \
76
                                                                        \
77
  if (!strcmp (rs6000_abi_name, "sysv"))                                \
78
    rs6000_current_abi = ABI_V4;                                        \
79
  else if (!strcmp (rs6000_abi_name, "sysv-noeabi"))                    \
80
    {                                                                   \
81
      rs6000_current_abi = ABI_V4;                                      \
82
      target_flags &= ~ MASK_EABI;                                      \
83
    }                                                                   \
84
  else if (!strcmp (rs6000_abi_name, "sysv-eabi")                       \
85
           || !strcmp (rs6000_abi_name, "eabi"))                        \
86
    {                                                                   \
87
      rs6000_current_abi = ABI_V4;                                      \
88
      target_flags |= MASK_EABI;                                        \
89
    }                                                                   \
90
  else if (!strcmp (rs6000_abi_name, "aixdesc"))                        \
91
    rs6000_current_abi = ABI_AIX;                                       \
92
  else if (!strcmp (rs6000_abi_name, "freebsd"))                        \
93
    rs6000_current_abi = ABI_V4;                                        \
94
  else if (!strcmp (rs6000_abi_name, "linux"))                          \
95
    {                                                                   \
96
      if (TARGET_64BIT)                                                 \
97
        rs6000_current_abi = ABI_AIX;                                   \
98
      else                                                              \
99
        rs6000_current_abi = ABI_V4;                                    \
100
    }                                                                   \
101
  else if (!strcmp (rs6000_abi_name, "netbsd"))                         \
102
    rs6000_current_abi = ABI_V4;                                        \
103
  else if (!strcmp (rs6000_abi_name, "openbsd"))                        \
104
    rs6000_current_abi = ABI_V4;                                        \
105
  else if (!strcmp (rs6000_abi_name, "i960-old"))                       \
106
    {                                                                   \
107
      rs6000_current_abi = ABI_V4;                                      \
108
      target_flags |= (MASK_LITTLE_ENDIAN | MASK_EABI);                 \
109
      target_flags &= ~MASK_STRICT_ALIGN;                               \
110
      TARGET_NO_BITFIELD_WORD = 1;                                      \
111
    }                                                                   \
112
  else                                                                  \
113
    {                                                                   \
114
      rs6000_current_abi = ABI_V4;                                      \
115
      error ("bad value for -mcall-%s", rs6000_abi_name);               \
116
    }                                                                   \
117
                                                                        \
118
  if (rs6000_sdata_name)                                                \
119
    {                                                                   \
120
      if (!strcmp (rs6000_sdata_name, "none"))                          \
121
        rs6000_sdata = SDATA_NONE;                                      \
122
      else if (!strcmp (rs6000_sdata_name, "data"))                     \
123
        rs6000_sdata = SDATA_DATA;                                      \
124
      else if (!strcmp (rs6000_sdata_name, "default"))                  \
125
        rs6000_sdata = (TARGET_EABI) ? SDATA_EABI : SDATA_SYSV;         \
126
      else if (!strcmp (rs6000_sdata_name, "sysv"))                     \
127
        rs6000_sdata = SDATA_SYSV;                                      \
128
      else if (!strcmp (rs6000_sdata_name, "eabi"))                     \
129
        rs6000_sdata = SDATA_EABI;                                      \
130
      else                                                              \
131
        error ("bad value for -msdata=%s", rs6000_sdata_name);          \
132
    }                                                                   \
133
  else if (DEFAULT_ABI == ABI_V4)                                       \
134
    {                                                                   \
135
      rs6000_sdata = SDATA_DATA;                                        \
136
      rs6000_sdata_name = "data";                                       \
137
    }                                                                   \
138
  else                                                                  \
139
    {                                                                   \
140
      rs6000_sdata = SDATA_NONE;                                        \
141
      rs6000_sdata_name = "none";                                       \
142
    }                                                                   \
143
                                                                        \
144
  if (TARGET_RELOCATABLE &&                                             \
145
      (rs6000_sdata == SDATA_EABI || rs6000_sdata == SDATA_SYSV))       \
146
    {                                                                   \
147
      rs6000_sdata = SDATA_DATA;                                        \
148
      error ("-mrelocatable and -msdata=%s are incompatible",           \
149
             rs6000_sdata_name);                                        \
150
    }                                                                   \
151
                                                                        \
152
  else if (flag_pic && DEFAULT_ABI != ABI_AIX                           \
153
           && (rs6000_sdata == SDATA_EABI                               \
154
               || rs6000_sdata == SDATA_SYSV))                          \
155
    {                                                                   \
156
      rs6000_sdata = SDATA_DATA;                                        \
157
      error ("-f%s and -msdata=%s are incompatible",                    \
158
             (flag_pic > 1) ? "PIC" : "pic",                            \
159
             rs6000_sdata_name);                                        \
160
    }                                                                   \
161
                                                                        \
162
  if ((rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4)             \
163
      || (rs6000_sdata == SDATA_EABI && !TARGET_EABI))                  \
164
    {                                                                   \
165
      rs6000_sdata = SDATA_NONE;                                        \
166
      error ("-msdata=%s and -mcall-%s are incompatible",               \
167
             rs6000_sdata_name, rs6000_abi_name);                       \
168
    }                                                                   \
169
                                                                        \
170
  targetm.have_srodata_section = rs6000_sdata == SDATA_EABI;            \
171
                                                                        \
172
  if (TARGET_RELOCATABLE && !TARGET_MINIMAL_TOC)                        \
173
    {                                                                   \
174
      target_flags |= MASK_MINIMAL_TOC;                                 \
175
      error ("-mrelocatable and -mno-minimal-toc are incompatible");    \
176
    }                                                                   \
177
                                                                        \
178
  if (TARGET_RELOCATABLE && rs6000_current_abi == ABI_AIX)              \
179
    {                                                                   \
180
      target_flags &= ~MASK_RELOCATABLE;                                \
181
      error ("-mrelocatable and -mcall-%s are incompatible",            \
182
             rs6000_abi_name);                                          \
183
    }                                                                   \
184
                                                                        \
185
  if (!TARGET_64BIT && flag_pic > 1 && rs6000_current_abi == ABI_AIX)   \
186
    {                                                                   \
187
      flag_pic = 0;                                                      \
188
      error ("-fPIC and -mcall-%s are incompatible",                    \
189
             rs6000_abi_name);                                          \
190
    }                                                                   \
191
                                                                        \
192
  if (rs6000_current_abi == ABI_AIX && TARGET_LITTLE_ENDIAN)            \
193
    {                                                                   \
194
      target_flags &= ~MASK_LITTLE_ENDIAN;                              \
195
      error ("-mcall-aixdesc must be big endian");                      \
196
    }                                                                   \
197
                                                                        \
198
  if (TARGET_SECURE_PLT != secure_plt)                                  \
199
    {                                                                   \
200
      error ("-msecure-plt not supported by your assembler");           \
201
    }                                                                   \
202
                                                                        \
203
  /* Treat -fPIC the same as -mrelocatable.  */                         \
204
  if (flag_pic > 1 && DEFAULT_ABI != ABI_AIX)                           \
205
    {                                                                   \
206
      target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC;              \
207
      TARGET_NO_FP_IN_TOC = 1;                                          \
208
    }                                                                   \
209
                                                                        \
210
  else if (TARGET_RELOCATABLE)                                          \
211
    if (!flag_pic)                                                      \
212
      flag_pic = 2;                                                     \
213
} while (0)
214
 
215
#ifndef RS6000_BI_ARCH
216
# define SUBSUBTARGET_OVERRIDE_OPTIONS                                  \
217
do {                                                                    \
218
  if ((TARGET_DEFAULT ^ target_flags) & MASK_64BIT)                     \
219
    error ("-m%s not supported in this configuration",                  \
220
           (target_flags & MASK_64BIT) ? "64" : "32");                  \
221
} while (0)
222
#endif
223
 
224
/* Override rs6000.h definition.  */
225
#undef  TARGET_DEFAULT
226
#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS)
227
 
228
/* Override rs6000.h definition.  */
229
#undef  PROCESSOR_DEFAULT
230
#define PROCESSOR_DEFAULT PROCESSOR_PPC750
231
 
232
/* SVR4 only defined for PowerPC, so short-circuit POWER patterns.  */
233
#undef  TARGET_POWER
234
#define TARGET_POWER 0
235
 
236
#define FIXED_R2 1
237
/* System V.4 uses register 13 as a pointer to the small data area,
238
   so it is not available to the normal user.  */
239
#define FIXED_R13 1
240
 
241
/* Override default big endianism definitions in rs6000.h.  */
242
#undef  BYTES_BIG_ENDIAN
243
#undef  WORDS_BIG_ENDIAN
244
#define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN)
245
#define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN)
246
 
247
/* Define cutoff for using external functions to save floating point.
248
   When optimizing for size, use external functions when profitable.  */
249
#define FP_SAVE_INLINE(FIRST_REG) (optimize_size                        \
250
                                   ? ((FIRST_REG) == 62                 \
251
                                      || (FIRST_REG) == 63)             \
252
                                   : (FIRST_REG) < 64)
253
/* And similarly for general purpose registers.  */
254
#define GP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 32     \
255
                                   && !optimize_size)
256
 
257
/* Put jump tables in read-only memory, rather than in .text.  */
258
#define JUMP_TABLES_IN_TEXT_SECTION 0
259
 
260
/* Prefix and suffix to use to saving floating point.  */
261
#define SAVE_FP_PREFIX "_savefpr_"
262
#define SAVE_FP_SUFFIX ""
263
 
264
/* Prefix and suffix to use to restoring floating point.  */
265
#define RESTORE_FP_PREFIX "_restfpr_"
266
#define RESTORE_FP_SUFFIX ""
267
 
268
/* Type used for size_t, as a string used in a declaration.  */
269
#undef  SIZE_TYPE
270
#define SIZE_TYPE "unsigned int"
271
 
272
/* Type used for ptrdiff_t, as a string used in a declaration.  */
273
#define PTRDIFF_TYPE "int"
274
 
275
#undef  WCHAR_TYPE
276
#define WCHAR_TYPE "long int"
277
 
278
#undef  WCHAR_TYPE_SIZE
279
#define WCHAR_TYPE_SIZE 32
280
 
281
/* Make int foo : 8 not cause structures to be aligned to an int boundary.  */
282
/* Override elfos.h definition.  */
283
#undef  PCC_BITFIELD_TYPE_MATTERS
284
#define PCC_BITFIELD_TYPE_MATTERS (TARGET_BITFIELD_TYPE)
285
 
286
#undef  BITFIELD_NBYTES_LIMITED
287
#define BITFIELD_NBYTES_LIMITED (TARGET_NO_BITFIELD_WORD)
288
 
289
/* Define this macro to be the value 1 if instructions will fail to
290
   work if given data not on the nominal alignment.  If instructions
291
   will merely go slower in that case, define this macro as 0.  */
292
#undef  STRICT_ALIGNMENT
293
#define STRICT_ALIGNMENT (TARGET_STRICT_ALIGN)
294
 
295
/* Define this macro if you wish to preserve a certain alignment for
296
   the stack pointer, greater than what the hardware enforces.  The
297
   definition is a C expression for the desired alignment (measured
298
   in bits).  This macro must evaluate to a value equal to or larger
299
   than STACK_BOUNDARY.
300
   For the SYSV ABI and variants the alignment of the stack pointer
301
   is usually controlled manually in rs6000.c. However, to maintain
302
   alignment across alloca () in all circumstances,
303
   PREFERRED_STACK_BOUNDARY needs to be set as well.
304
   This has the additional advantage of allowing a bigger maximum
305
   alignment of user objects on the stack.  */
306
 
307
#undef PREFERRED_STACK_BOUNDARY
308
#define PREFERRED_STACK_BOUNDARY 128
309
 
310
/* Real stack boundary as mandated by the appropriate ABI.  */
311
#define ABI_STACK_BOUNDARY \
312
  ((TARGET_EABI && !TARGET_ALTIVEC && !TARGET_ALTIVEC_ABI) ? 64 : 128)
313
 
314
/* An expression for the alignment of a structure field FIELD if the
315
   alignment computed in the usual way is COMPUTED.  */
316
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED)                                   \
317
        ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
318
         ? 128 : COMPUTED)
319
 
320
#undef  BIGGEST_FIELD_ALIGNMENT
321
 
322
/* Use ELF style section commands.  */
323
 
324
#define TEXT_SECTION_ASM_OP     "\t.section\t\".text\""
325
 
326
#define DATA_SECTION_ASM_OP     "\t.section\t\".data\""
327
 
328
#define BSS_SECTION_ASM_OP      "\t.section\t\".bss\""
329
 
330
/* Override elfos.h definition.  */
331
#undef  INIT_SECTION_ASM_OP
332
#define INIT_SECTION_ASM_OP "\t.section\t\".init\",\"ax\""
333
 
334
/* Override elfos.h definition.  */
335
#undef  FINI_SECTION_ASM_OP
336
#define FINI_SECTION_ASM_OP "\t.section\t\".fini\",\"ax\""
337
 
338
#define TOC_SECTION_ASM_OP "\t.section\t\".got\",\"aw\""
339
 
340
/* Put PC relative got entries in .got2.  */
341
#define MINIMAL_TOC_SECTION_ASM_OP \
342
  (TARGET_RELOCATABLE || (flag_pic && DEFAULT_ABI != ABI_AIX)           \
343
   ? "\t.section\t\".got2\",\"aw\"" : "\t.section\t\".got1\",\"aw\"")
344
 
345
#define SDATA_SECTION_ASM_OP "\t.section\t\".sdata\",\"aw\""
346
#define SDATA2_SECTION_ASM_OP "\t.section\t\".sdata2\",\"a\""
347
#define SBSS_SECTION_ASM_OP "\t.section\t\".sbss\",\"aw\",@nobits"
348
 
349
/* Override default elf definitions.  */
350
#define TARGET_ASM_INIT_SECTIONS rs6000_elf_asm_init_sections
351
#undef  TARGET_ASM_RELOC_RW_MASK
352
#define TARGET_ASM_RELOC_RW_MASK rs6000_elf_reloc_rw_mask
353
#undef  TARGET_ASM_SELECT_RTX_SECTION
354
#define TARGET_ASM_SELECT_RTX_SECTION rs6000_elf_select_rtx_section
355
 
356
/* Return nonzero if this entry is to be written into the constant pool
357
   in a special way.  We do so if this is a SYMBOL_REF, LABEL_REF or a CONST
358
   containing one of them.  If -mfp-in-toc (the default), we also do
359
   this for floating-point constants.  We actually can only do this
360
   if the FP formats of the target and host machines are the same, but
361
   we can't check that since not every file that uses these target macros
362
   includes real.h.
363
 
364
   Unlike AIX, we don't key off of -mminimal-toc, but instead do not
365
   allow floating point constants in the TOC if -mrelocatable.  */
366
 
367
#undef  ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
368
#define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE)                        \
369
  (TARGET_TOC                                                           \
370
   && (GET_CODE (X) == SYMBOL_REF                                       \
371
       || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS       \
372
           && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF)             \
373
       || GET_CODE (X) == LABEL_REF                                     \
374
       || (GET_CODE (X) == CONST_INT                                    \
375
           && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode))      \
376
       || (!TARGET_NO_FP_IN_TOC                                         \
377
           && !TARGET_RELOCATABLE                                       \
378
           && GET_CODE (X) == CONST_DOUBLE                              \
379
           && SCALAR_FLOAT_MODE_P (GET_MODE (X))                        \
380
           && BITS_PER_WORD == HOST_BITS_PER_INT)))
381
 
382
/* These macros generate the special .type and .size directives which
383
   are used to set the corresponding fields of the linker symbol table
384
   entries in an ELF object file under SVR4.  These macros also output
385
   the starting labels for the relevant functions/objects.  */
386
 
387
/* Write the extra assembler code needed to declare a function properly.
388
   Some svr4 assemblers need to also have something extra said about the
389
   function's return value.  We allow for that here.  */
390
 
391
/* Override elfos.h definition.  */
392
#undef  ASM_DECLARE_FUNCTION_NAME
393
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)                     \
394
  rs6000_elf_declare_function_name ((FILE), (NAME), (DECL))
395
 
396
/* The USER_LABEL_PREFIX stuff is affected by the -fleading-underscore
397
   flag.  The LOCAL_LABEL_PREFIX variable is used by dbxelf.h.  */
398
 
399
#define LOCAL_LABEL_PREFIX "."
400
#define USER_LABEL_PREFIX ""
401
 
402
#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX)   \
403
  asm_fprintf (FILE, "%L%s", PREFIX)
404
 
405
/* Globalizing directive for a label.  */
406
#define GLOBAL_ASM_OP "\t.globl "
407
 
408
/* This says how to output assembler code to declare an
409
   uninitialized internal linkage data object.  Under SVR4,
410
   the linker seems to want the alignment of data objects
411
   to depend on their types.  We do exactly that here.  */
412
 
413
#define LOCAL_ASM_OP    "\t.local\t"
414
 
415
#define LCOMM_ASM_OP    "\t.lcomm\t"
416
 
417
/* Describe how to emit uninitialized local items.  */
418
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN)    \
419
do {                                                                    \
420
  if ((DECL) && rs6000_elf_in_small_data_p (DECL))                      \
421
    {                                                                   \
422
      switch_to_section (sbss_section);                                 \
423
      ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT));      \
424
      ASM_OUTPUT_LABEL (FILE, NAME);                                    \
425
      ASM_OUTPUT_SKIP (FILE, SIZE);                                     \
426
      if (!flag_inhibit_size_directive && (SIZE) > 0)                    \
427
        ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE);                   \
428
    }                                                                   \
429
  else                                                                  \
430
    {                                                                   \
431
      fprintf (FILE, "%s", LCOMM_ASM_OP);                               \
432
      assemble_name ((FILE), (NAME));                                   \
433
      fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",          \
434
               (SIZE), (ALIGN) / BITS_PER_UNIT);                        \
435
    }                                                                   \
436
  ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");                     \
437
} while (0)
438
 
439
/* Describe how to emit uninitialized external linkage items.  */
440
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN)           \
441
do {                                                                    \
442
  ASM_OUTPUT_ALIGNED_DECL_LOCAL (FILE, DECL, NAME, SIZE, ALIGN);        \
443
} while (0)
444
 
445
#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
446
/* To support -falign-* switches we need to use .p2align so
447
   that alignment directives in code sections will be padded
448
   with no-op instructions, rather than zeroes.  */
449
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP)                    \
450
  if ((LOG) != 0)                                                        \
451
    {                                                                   \
452
      if ((MAX_SKIP) == 0)                                               \
453
        fprintf ((FILE), "\t.p2align %d\n", (LOG));                     \
454
      else                                                              \
455
        fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP));     \
456
    }
457
#endif
458
 
459
/* This is how to output code to push a register on the stack.
460
   It need not be very fast code.
461
 
462
   On the rs6000, we must keep the backchain up to date.  In order
463
   to simplify things, always allocate 16 bytes for a push (System V
464
   wants to keep stack aligned to a 16 byte boundary).  */
465
 
466
#define ASM_OUTPUT_REG_PUSH(FILE, REGNO)                                \
467
do {                                                                    \
468
  if (DEFAULT_ABI == ABI_V4)                                            \
469
    asm_fprintf (FILE,                                                  \
470
                 "\t{stu|stwu} %s,-16(%s)\n\t{st|stw} %s,12(%s)\n",     \
471
                 reg_names[1], reg_names[1], reg_names[REGNO],          \
472
                 reg_names[1]);                                         \
473
} while (0)
474
 
475
/* This is how to output an insn to pop a register from the stack.
476
   It need not be very fast code.  */
477
 
478
#define ASM_OUTPUT_REG_POP(FILE, REGNO)                                 \
479
do {                                                                    \
480
  if (DEFAULT_ABI == ABI_V4)                                            \
481
    asm_fprintf (FILE,                                                  \
482
                 "\t{l|lwz} %s,12(%s)\n\t{ai|addic} %s,%s,16\n",        \
483
                 reg_names[REGNO], reg_names[1], reg_names[1],          \
484
                 reg_names[1]);                                         \
485
} while (0)
486
 
487
extern int fixuplabelno;
488
 
489
/* Handle constructors specially for -mrelocatable.  */
490
#define TARGET_ASM_CONSTRUCTOR  rs6000_elf_asm_out_constructor
491
#define TARGET_ASM_DESTRUCTOR   rs6000_elf_asm_out_destructor
492
 
493
/* This is the end of what might become sysv4.h.  */
494
 
495
/* Use DWARF 2 debugging information by default.  */
496
#undef  PREFERRED_DEBUGGING_TYPE
497
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
498
 
499
/* Historically we have also supported stabs debugging.  */
500
#define DBX_DEBUGGING_INFO 1
501
 
502
#define TARGET_ENCODE_SECTION_INFO  rs6000_elf_encode_section_info
503
#define TARGET_IN_SMALL_DATA_P  rs6000_elf_in_small_data_p
504
 
505
/* The ELF version doesn't encode [DS] or whatever at the end of symbols.  */
506
 
507
#define RS6000_OUTPUT_BASENAME(FILE, NAME)      \
508
    assemble_name (FILE, NAME)
509
 
510
/* We have to output the stabs for the function name *first*, before
511
   outputting its label.  */
512
 
513
#define DBX_FUNCTION_FIRST
514
 
515
/* This is the end of what might become sysv4dbx.h.  */
516
 
517
#define TARGET_OS_SYSV_CPP_BUILTINS()           \
518
  do                                            \
519
    {                                           \
520
      if (target_flags_explicit                 \
521
          & MASK_RELOCATABLE)                   \
522
        builtin_define ("_RELOCATABLE");        \
523
    }                                           \
524
  while (0)
525
 
526
#ifndef TARGET_OS_CPP_BUILTINS
527
#define TARGET_OS_CPP_BUILTINS()                \
528
  do                                            \
529
    {                                           \
530
      builtin_define_std ("PPC");               \
531
      builtin_define_std ("unix");              \
532
      builtin_define ("__svr4__");              \
533
      builtin_assert ("system=unix");           \
534
      builtin_assert ("system=svr4");           \
535
      builtin_assert ("cpu=powerpc");           \
536
      builtin_assert ("machine=powerpc");       \
537
      TARGET_OS_SYSV_CPP_BUILTINS ();           \
538
    }                                           \
539
  while (0)
540
#endif
541
 
542
#undef  ASM_SPEC
543
#define ASM_SPEC "%(asm_cpu) \
544
%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
545
%{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \
546
%{memb|msdata=eabi: -memb} \
547
%{mlittle|mlittle-endian:-mlittle; \
548
  mbig|mbig-endian      :-mbig;    \
549
  mcall-aixdesc |                  \
550
  mcall-freebsd |                  \
551
  mcall-netbsd  |                  \
552
  mcall-openbsd |                  \
553
  mcall-linux           :-mbig;    \
554
  mcall-i960-old        :-mlittle}"
555
 
556
#define CC1_ENDIAN_BIG_SPEC ""
557
 
558
#define CC1_ENDIAN_LITTLE_SPEC "\
559
%{!mstrict-align: %{!mno-strict-align: \
560
    %{!mcall-i960-old: \
561
        -mstrict-align \
562
    } \
563
}}"
564
 
565
#define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big)"
566
 
567
#ifndef CC1_SECURE_PLT_DEFAULT_SPEC
568
#define CC1_SECURE_PLT_DEFAULT_SPEC ""
569
#endif
570
 
571
/* Pass -G xxx to the compiler and set correct endian mode.  */
572
#define CC1_SPEC "%{G*} %(cc1_cpu) \
573
%{mlittle|mlittle-endian: %(cc1_endian_little);           \
574
  mbig   |mbig-endian   : %(cc1_endian_big);              \
575
  mcall-aixdesc |                                         \
576
  mcall-freebsd |                                         \
577
  mcall-netbsd  |                                         \
578
  mcall-openbsd |                                         \
579
  mcall-linux           : -mbig %(cc1_endian_big);        \
580
  mcall-i960-old        : -mlittle %(cc1_endian_little);  \
581
                        : %(cc1_endian_default)}          \
582
%{meabi: %{!mcall-*: -mcall-sysv }} \
583
%{!meabi: %{!mno-eabi: \
584
    %{mrelocatable: -meabi } \
585
    %{mcall-freebsd: -mno-eabi } \
586
    %{mcall-i960-old: -meabi } \
587
    %{mcall-linux: -mno-eabi } \
588
    %{mcall-netbsd: -mno-eabi } \
589
    %{mcall-openbsd: -mno-eabi }}} \
590
%{msdata: -msdata=default} \
591
%{mno-sdata: -msdata=none} \
592
%{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \
593
%{profile: -p}"
594
 
595
/* Default starting address if specified.  */
596
#define LINK_START_SPEC "\
597
%{mads         : %(link_start_ads)         ; \
598
  myellowknife : %(link_start_yellowknife) ; \
599
  mmvme        : %(link_start_mvme)        ; \
600
  msim         : %(link_start_sim)         ; \
601
  mcall-freebsd: %(link_start_freebsd)     ; \
602
  mcall-linux  : %(link_start_linux)       ; \
603
  mcall-netbsd : %(link_start_netbsd)      ; \
604
  mcall-openbsd: %(link_start_openbsd)     ; \
605
               : %(link_start_default)     }"
606
 
607
#define LINK_START_DEFAULT_SPEC ""
608
 
609
#undef  LINK_SPEC
610
#define LINK_SPEC "\
611
%{h*} %{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} \
612
%{R*} \
613
%(link_shlib) \
614
%{!T*: %(link_start) } \
615
%(link_target) \
616
%(link_os)"
617
 
618
/* Shared libraries are not default.  */
619
#define LINK_SHLIB_SPEC "\
620
%{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \
621
%{static: } \
622
%{shared:-G -dy -z text } \
623
%{symbolic:-Bsymbolic -G -dy -z text }"
624
 
625
/* Override the default target of the linker.  */
626
#define LINK_TARGET_SPEC "\
627
%{mlittle: --oformat elf32-powerpcle } %{mlittle-endian: --oformat elf32-powerpcle } \
628
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
629
    %{mcall-i960-old: --oformat elf32-powerpcle} \
630
  }}}}"
631
 
632
/* Any specific OS flags.  */
633
#define LINK_OS_SPEC "\
634
%{mads         : %(link_os_ads)         ; \
635
  myellowknife : %(link_os_yellowknife) ; \
636
  mmvme        : %(link_os_mvme)        ; \
637
  msim         : %(link_os_sim)         ; \
638
  mcall-freebsd: %(link_os_freebsd)     ; \
639
  mcall-linux  : %(link_os_linux)       ; \
640
  mcall-netbsd : %(link_os_netbsd)      ; \
641
  mcall-openbsd: %(link_os_openbsd)     ; \
642
               : %(link_os_default)     }"
643
 
644
#define LINK_OS_DEFAULT_SPEC ""
645
 
646
#define DRIVER_SELF_SPECS "%{mfpu=none: %<mfpu=* \
647
        %<msingle-float %<mdouble-float}"
648
 
649
/* Override rs6000.h definition.  */
650
#undef  CPP_SPEC
651
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
652
%{mads         : %(cpp_os_ads)         ; \
653
  myellowknife : %(cpp_os_yellowknife) ; \
654
  mmvme        : %(cpp_os_mvme)        ; \
655
  msim         : %(cpp_os_sim)         ; \
656
  mcall-freebsd: %(cpp_os_freebsd)     ; \
657
  mcall-linux  : %(cpp_os_linux)       ; \
658
  mcall-netbsd : %(cpp_os_netbsd)      ; \
659
  mcall-openbsd: %(cpp_os_openbsd)     ; \
660
               : %(cpp_os_default)     }"
661
 
662
#define CPP_OS_DEFAULT_SPEC ""
663
 
664
#undef  STARTFILE_SPEC
665
#define STARTFILE_SPEC "\
666
%{mads         : %(startfile_ads)         ; \
667
  myellowknife : %(startfile_yellowknife) ; \
668
  mmvme        : %(startfile_mvme)        ; \
669
  msim         : %(startfile_sim)         ; \
670
  mcall-freebsd: %(startfile_freebsd)     ; \
671
  mcall-linux  : %(startfile_linux)       ; \
672
  mcall-netbsd : %(startfile_netbsd)      ; \
673
  mcall-openbsd: %(startfile_openbsd)     ; \
674
               : %(startfile_default)     }"
675
 
676
#define STARTFILE_DEFAULT_SPEC "ecrti.o%s crtbegin.o%s"
677
 
678
#undef  LIB_SPEC
679
#define LIB_SPEC "\
680
%{mads         : %(lib_ads)         ; \
681
  myellowknife : %(lib_yellowknife) ; \
682
  mmvme        : %(lib_mvme)        ; \
683
  msim         : %(lib_sim)         ; \
684
  mcall-freebsd: %(lib_freebsd)     ; \
685
  mcall-linux  : %(lib_linux)       ; \
686
  mcall-netbsd : %(lib_netbsd)      ; \
687
  mcall-openbsd: %(lib_openbsd)     ; \
688
               : %(lib_default)     }"
689
 
690
#define LIB_DEFAULT_SPEC "-lc"
691
 
692
#undef  ENDFILE_SPEC
693
#define ENDFILE_SPEC "\
694
%{mads         : %(endfile_ads)         ; \
695
  myellowknife : %(endfile_yellowknife) ; \
696
  mmvme        : %(endfile_mvme)        ; \
697
  msim         : %(endfile_sim)         ; \
698
  mcall-freebsd: %(endfile_freebsd)     ; \
699
  mcall-linux  : %(endfile_linux)       ; \
700
  mcall-netbsd : %(endfile_netbsd)      ; \
701
  mcall-openbsd: %(endfile_openbsd)     ; \
702
               : %(crtsavres_default) %(endfile_default)     }"
703
 
704
#define CRTSAVRES_DEFAULT_SPEC ""
705
 
706
#define ENDFILE_DEFAULT_SPEC "crtend.o%s ecrtn.o%s"
707
 
708
/* Motorola ADS support.  */
709
#define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
710
 
711
#define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
712
 
713
#define ENDFILE_ADS_SPEC "crtend.o%s ecrtn.o%s"
714
 
715
#define LINK_START_ADS_SPEC "-T ads.ld%s"
716
 
717
#define LINK_OS_ADS_SPEC ""
718
 
719
#define CPP_OS_ADS_SPEC ""
720
 
721
/* Motorola Yellowknife support.  */
722
#define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
723
 
724
#define STARTFILE_YELLOWKNIFE_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
725
 
726
#define ENDFILE_YELLOWKNIFE_SPEC "crtend.o%s ecrtn.o%s"
727
 
728
#define LINK_START_YELLOWKNIFE_SPEC "-T yellowknife.ld%s"
729
 
730
#define LINK_OS_YELLOWKNIFE_SPEC ""
731
 
732
#define CPP_OS_YELLOWKNIFE_SPEC ""
733
 
734
/* Motorola MVME support.  */
735
#define LIB_MVME_SPEC "--start-group -lmvme -lc --end-group"
736
 
737
#define STARTFILE_MVME_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
738
 
739
#define ENDFILE_MVME_SPEC "crtend.o%s ecrtn.o%s"
740
 
741
#define LINK_START_MVME_SPEC "-Ttext 0x40000"
742
 
743
#define LINK_OS_MVME_SPEC ""
744
 
745
#define CPP_OS_MVME_SPEC ""
746
 
747
/* PowerPC simulator based on netbsd system calls support.  */
748
#define LIB_SIM_SPEC "--start-group -lsim -lc --end-group"
749
 
750
#define STARTFILE_SIM_SPEC "ecrti.o%s sim-crt0.o%s crtbegin.o%s"
751
 
752
#define ENDFILE_SIM_SPEC "crtend.o%s ecrtn.o%s"
753
 
754
#define LINK_START_SIM_SPEC ""
755
 
756
#define LINK_OS_SIM_SPEC "-m elf32ppcsim"
757
 
758
#define CPP_OS_SIM_SPEC ""
759
 
760
/* FreeBSD support.  */
761
 
762
#define CPP_OS_FREEBSD_SPEC     "\
763
  -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ \
764
  -Acpu=powerpc -Amachine=powerpc"
765
 
766
#define STARTFILE_FREEBSD_SPEC  FBSD_STARTFILE_SPEC
767
#define ENDFILE_FREEBSD_SPEC    FBSD_ENDFILE_SPEC
768
#define LIB_FREEBSD_SPEC        FBSD_LIB_SPEC
769
#define LINK_START_FREEBSD_SPEC ""
770
 
771
#define LINK_OS_FREEBSD_SPEC "\
772
  %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
773
  %{v:-V} \
774
  %{assert*} %{R*} %{rpath*} %{defsym*} \
775
  %{shared:-Bshareable %{h*} %{soname*}} \
776
  %{!shared: \
777
    %{!static: \
778
      %{rdynamic: -export-dynamic} \
779
      -dynamic-linker %(fbsd_dynamic_linker) } \
780
    %{static:-Bstatic}} \
781
  %{symbolic:-Bsymbolic}"
782
 
783
/* GNU/Linux support.  */
784
#define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
785
%{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \
786
%{!shared: %{profile:-lc_p} %{!profile:-lc}}}"
787
 
788
#ifdef HAVE_LD_PIE
789
#define STARTFILE_LINUX_SPEC "\
790
%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
791
%{mnewlib:ecrti.o%s;:crti.o%s} \
792
%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
793
#else
794
#define STARTFILE_LINUX_SPEC "\
795
%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
796
%{mnewlib:ecrti.o%s;:crti.o%s} \
797
%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
798
#endif
799
 
800
#define ENDFILE_LINUX_SPEC "\
801
%{shared|pie:crtendS.o%s;:crtend.o%s} \
802
%{mnewlib:ecrtn.o%s;:crtn.o%s}"
803
 
804
#define LINK_START_LINUX_SPEC ""
805
 
806
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
807
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
808
#if DEFAULT_LIBC == LIBC_UCLIBC
809
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
810
#elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
811
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
812
#else
813
#error "Unsupported DEFAULT_LIBC"
814
#endif
815
#define GNU_USER_DYNAMIC_LINKER \
816
  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
817
 
818
#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
819
  %{rdynamic:-export-dynamic} \
820
  -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
821
 
822
#if defined(HAVE_LD_EH_FRAME_HDR)
823
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
824
#endif
825
 
826
#define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
827
%{!undef:                                                         \
828
  %{!ansi:                                                        \
829
    %{!std=*:-Dunix -D__unix -Dlinux -D__linux}                   \
830
    %{std=gnu*:-Dunix -D__unix -Dlinux -D__linux}}}               \
831
-Asystem=linux -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
832
 
833
/* NetBSD support.  */
834
#define LIB_NETBSD_SPEC "\
835
-lc"
836
 
837
#define STARTFILE_NETBSD_SPEC "\
838
ncrti.o%s crt0.o%s \
839
%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
840
 
841
#define ENDFILE_NETBSD_SPEC "\
842
%{!shared:crtend.o%s} %{shared:crtendS.o%s} \
843
ncrtn.o%s"
844
 
845
#define LINK_START_NETBSD_SPEC "\
846
"
847
 
848
#define LINK_OS_NETBSD_SPEC "\
849
%{!shared: %{!static: \
850
  %{rdynamic:-export-dynamic} \
851
  -dynamic-linker /usr/libexec/ld.elf_so}}"
852
 
853
#define CPP_OS_NETBSD_SPEC "\
854
-D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__"
855
 
856
/* OpenBSD support.  */
857
#ifndef LIB_OPENBSD_SPEC
858
#define LIB_OPENBSD_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
859
#endif
860
 
861
#ifndef STARTFILE_OPENBSD_SPEC
862
#define STARTFILE_OPENBSD_SPEC "\
863
%{!shared: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
864
%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
865
#endif
866
 
867
#ifndef ENDFILE_OPENBSD_SPEC
868
#define ENDFILE_OPENBSD_SPEC "\
869
%{!shared:crtend.o%s} %{shared:crtendS.o%s}"
870
#endif
871
 
872
#ifndef LINK_START_OPENBSD_SPEC
873
#define LINK_START_OPENBSD_SPEC "-Ttext 0x400074"
874
#endif
875
 
876
#ifndef LINK_OS_OPENBSD_SPEC
877
#define LINK_OS_OPENBSD_SPEC ""
878
#endif
879
 
880
#ifndef CPP_OS_OPENBSD_SPEC
881
#define CPP_OS_OPENBSD_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
882
#endif
883
 
884
/* Define any extra SPECS that the compiler needs to generate.  */
885
/* Override rs6000.h definition.  */
886
#undef  SUBTARGET_EXTRA_SPECS
887
#define SUBTARGET_EXTRA_SPECS                                           \
888
  { "crtsavres_default",        CRTSAVRES_DEFAULT_SPEC },               \
889
  { "lib_ads",                  LIB_ADS_SPEC },                         \
890
  { "lib_yellowknife",          LIB_YELLOWKNIFE_SPEC },                 \
891
  { "lib_mvme",                 LIB_MVME_SPEC },                        \
892
  { "lib_sim",                  LIB_SIM_SPEC },                         \
893
  { "lib_freebsd",              LIB_FREEBSD_SPEC },                     \
894
  { "lib_linux",                LIB_LINUX_SPEC },                       \
895
  { "lib_netbsd",               LIB_NETBSD_SPEC },                      \
896
  { "lib_openbsd",              LIB_OPENBSD_SPEC },                     \
897
  { "lib_default",              LIB_DEFAULT_SPEC },                     \
898
  { "startfile_ads",            STARTFILE_ADS_SPEC },                   \
899
  { "startfile_yellowknife",    STARTFILE_YELLOWKNIFE_SPEC },           \
900
  { "startfile_mvme",           STARTFILE_MVME_SPEC },                  \
901
  { "startfile_sim",            STARTFILE_SIM_SPEC },                   \
902
  { "startfile_freebsd",        STARTFILE_FREEBSD_SPEC },               \
903
  { "startfile_linux",          STARTFILE_LINUX_SPEC },                 \
904
  { "startfile_netbsd",         STARTFILE_NETBSD_SPEC },                \
905
  { "startfile_openbsd",        STARTFILE_OPENBSD_SPEC },               \
906
  { "startfile_default",        STARTFILE_DEFAULT_SPEC },               \
907
  { "endfile_ads",              ENDFILE_ADS_SPEC },                     \
908
  { "endfile_yellowknife",      ENDFILE_YELLOWKNIFE_SPEC },             \
909
  { "endfile_mvme",             ENDFILE_MVME_SPEC },                    \
910
  { "endfile_sim",              ENDFILE_SIM_SPEC },                     \
911
  { "endfile_freebsd",          ENDFILE_FREEBSD_SPEC },                 \
912
  { "endfile_linux",            ENDFILE_LINUX_SPEC },                   \
913
  { "endfile_netbsd",           ENDFILE_NETBSD_SPEC },                  \
914
  { "endfile_openbsd",          ENDFILE_OPENBSD_SPEC },                 \
915
  { "endfile_default",          ENDFILE_DEFAULT_SPEC },                 \
916
  { "link_shlib",               LINK_SHLIB_SPEC },                      \
917
  { "link_target",              LINK_TARGET_SPEC },                     \
918
  { "link_start",               LINK_START_SPEC },                      \
919
  { "link_start_ads",           LINK_START_ADS_SPEC },                  \
920
  { "link_start_yellowknife",   LINK_START_YELLOWKNIFE_SPEC },          \
921
  { "link_start_mvme",          LINK_START_MVME_SPEC },                 \
922
  { "link_start_sim",           LINK_START_SIM_SPEC },                  \
923
  { "link_start_freebsd",       LINK_START_FREEBSD_SPEC },              \
924
  { "link_start_linux",         LINK_START_LINUX_SPEC },                \
925
  { "link_start_netbsd",        LINK_START_NETBSD_SPEC },               \
926
  { "link_start_openbsd",       LINK_START_OPENBSD_SPEC },              \
927
  { "link_start_default",       LINK_START_DEFAULT_SPEC },              \
928
  { "link_os",                  LINK_OS_SPEC },                         \
929
  { "link_os_ads",              LINK_OS_ADS_SPEC },                     \
930
  { "link_os_yellowknife",      LINK_OS_YELLOWKNIFE_SPEC },             \
931
  { "link_os_mvme",             LINK_OS_MVME_SPEC },                    \
932
  { "link_os_sim",              LINK_OS_SIM_SPEC },                     \
933
  { "link_os_freebsd",          LINK_OS_FREEBSD_SPEC },                 \
934
  { "link_os_linux",            LINK_OS_LINUX_SPEC },                   \
935
  { "link_os_netbsd",           LINK_OS_NETBSD_SPEC },                  \
936
  { "link_os_openbsd",          LINK_OS_OPENBSD_SPEC },                 \
937
  { "link_os_default",          LINK_OS_DEFAULT_SPEC },                 \
938
  { "cc1_endian_big",           CC1_ENDIAN_BIG_SPEC },                  \
939
  { "cc1_endian_little",        CC1_ENDIAN_LITTLE_SPEC },               \
940
  { "cc1_endian_default",       CC1_ENDIAN_DEFAULT_SPEC },              \
941
  { "cc1_secure_plt_default",   CC1_SECURE_PLT_DEFAULT_SPEC },          \
942
  { "cpp_os_ads",               CPP_OS_ADS_SPEC },                      \
943
  { "cpp_os_yellowknife",       CPP_OS_YELLOWKNIFE_SPEC },              \
944
  { "cpp_os_mvme",              CPP_OS_MVME_SPEC },                     \
945
  { "cpp_os_sim",               CPP_OS_SIM_SPEC },                      \
946
  { "cpp_os_freebsd",           CPP_OS_FREEBSD_SPEC },                  \
947
  { "cpp_os_linux",             CPP_OS_LINUX_SPEC },                    \
948
  { "cpp_os_netbsd",            CPP_OS_NETBSD_SPEC },                   \
949
  { "cpp_os_openbsd",           CPP_OS_OPENBSD_SPEC },                  \
950
  { "cpp_os_default",           CPP_OS_DEFAULT_SPEC },                  \
951
  { "fbsd_dynamic_linker",      FBSD_DYNAMIC_LINKER },                  \
952
  SUBSUBTARGET_EXTRA_SPECS
953
 
954
#define SUBSUBTARGET_EXTRA_SPECS
955
 
956
/* Define this macro as a C expression for the initializer of an
957
   array of string to tell the driver program which options are
958
   defaults for this target and thus do not need to be handled
959
   specially when using `MULTILIB_OPTIONS'.
960
 
961
   Do not define this macro if `MULTILIB_OPTIONS' is not defined in
962
   the target makefile fragment or if none of the options listed in
963
   `MULTILIB_OPTIONS' are set by default.  *Note Target Fragment::.  */
964
 
965
#define MULTILIB_DEFAULTS { "mbig", "mcall-sysv" }
966
 
967
/* Define this macro if the code for function profiling should come
968
   before the function prologue.  Normally, the profiling code comes
969
   after.  */
970
#define PROFILE_BEFORE_PROLOGUE 1
971
 
972
/* Function name to call to do profiling.  */
973
#define RS6000_MCOUNT "_mcount"
974
 
975
/* Select a format to encode pointers in exception handling data.  CODE
976
   is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
977
   true if the symbol may be affected by dynamic relocations.  */
978
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)                            \
979
  ((flag_pic || TARGET_RELOCATABLE)                                          \
980
   ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
981
   : DW_EH_PE_absptr)
982
 
983
#define DOUBLE_INT_ASM_OP "\t.quad\t"
984
 
985
/* Generate entries in .fixup for relocatable addresses.  */
986
#define RELOCATABLE_NEEDS_FIXUP 1
987
 
988
#define TARGET_ASM_FILE_END rs6000_elf_file_end
989
 
990
/* This target uses the sysv4.opt file.  */
991
#define TARGET_USES_SYSV4_OPT 1
992
 
993
#undef DBX_REGISTER_NUMBER

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.