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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [rs6000/] [linux64.h] - Blame information for rev 832

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

Line No. Rev Author Line
1 38 julius
/* Definitions of target machine for GNU compiler,
2
   for 64 bit PowerPC linux.
3
   Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4
   Free Software Foundation, Inc.
5
 
6
   This file is part of GCC.
7
 
8
   GCC is free software; you can redistribute it and/or modify it
9
   under the terms of the GNU General Public License as published
10
   by the Free Software Foundation; either version 3, or (at your
11
   option) any later version.
12
 
13
   GCC is distributed in the hope that it will be useful, but WITHOUT
14
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16
   License for more details.
17
 
18
   You should have received a copy of the GNU General Public License
19
   along with GCC; see the file COPYING3.  If not see
20
   <http://www.gnu.org/licenses/>.  */
21
 
22
#ifndef RS6000_BI_ARCH
23
 
24
#undef  DEFAULT_ABI
25
#define DEFAULT_ABI ABI_AIX
26
 
27
#undef  TARGET_64BIT
28
#define TARGET_64BIT 1
29
 
30
#define DEFAULT_ARCH64_P 1
31
#define RS6000_BI_ARCH_P 0
32
 
33
#else
34
 
35
#define DEFAULT_ARCH64_P (TARGET_DEFAULT & MASK_64BIT)
36
#define RS6000_BI_ARCH_P 1
37
 
38
#endif
39
 
40
#ifdef IN_LIBGCC2
41
#undef TARGET_64BIT
42
#ifdef __powerpc64__
43
#define TARGET_64BIT 1
44
#else
45
#define TARGET_64BIT 0
46
#endif
47
#endif
48
 
49
#undef  TARGET_AIX
50
#define TARGET_AIX TARGET_64BIT
51
 
52
#ifdef HAVE_LD_NO_DOT_SYMS
53
/* New ABI uses a local sym for the function entry point.  */
54
extern int dot_symbols;
55
#undef DOT_SYMBOLS
56
#define DOT_SYMBOLS dot_symbols
57
#endif
58
 
59
#undef  PROCESSOR_DEFAULT
60
#define PROCESSOR_DEFAULT PROCESSOR_POWER4
61
#undef  PROCESSOR_DEFAULT64
62
#define PROCESSOR_DEFAULT64 PROCESSOR_POWER4
63
 
64
/* We don't need to generate entries in .fixup, except when
65
   -mrelocatable or -mrelocatable-lib is given.  */
66
#undef RELOCATABLE_NEEDS_FIXUP
67
#define RELOCATABLE_NEEDS_FIXUP \
68
  (target_flags & target_flags_explicit & MASK_RELOCATABLE)
69
 
70
#undef  RS6000_ABI_NAME
71
#define RS6000_ABI_NAME "linux"
72
 
73
#define INVALID_64BIT "-m%s not supported in this configuration"
74
#define INVALID_32BIT INVALID_64BIT
75
 
76
#undef  SUBSUBTARGET_OVERRIDE_OPTIONS
77
#define SUBSUBTARGET_OVERRIDE_OPTIONS                           \
78
  do                                                            \
79
    {                                                           \
80
      if (!rs6000_explicit_options.alignment)                   \
81
        rs6000_alignment_flags = MASK_ALIGN_NATURAL;            \
82
      if (TARGET_64BIT)                                         \
83
        {                                                       \
84
          if (DEFAULT_ABI != ABI_AIX)                           \
85
            {                                                   \
86
              rs6000_current_abi = ABI_AIX;                     \
87
              error (INVALID_64BIT, "call");                    \
88
            }                                                   \
89
          dot_symbols = !strcmp (rs6000_abi_name, "aixdesc");   \
90
          if (target_flags & MASK_RELOCATABLE)                  \
91
            {                                                   \
92
              target_flags &= ~MASK_RELOCATABLE;                \
93
              error (INVALID_64BIT, "relocatable");             \
94
            }                                                   \
95
          if (target_flags & MASK_EABI)                         \
96
            {                                                   \
97
              target_flags &= ~MASK_EABI;                       \
98
              error (INVALID_64BIT, "eabi");                    \
99
            }                                                   \
100
          if (target_flags & MASK_PROTOTYPE)                    \
101
            {                                                   \
102
              target_flags &= ~MASK_PROTOTYPE;                  \
103
              error (INVALID_64BIT, "prototype");               \
104
            }                                                   \
105
          if ((target_flags & MASK_POWERPC64) == 0)              \
106
            {                                                   \
107
              target_flags |= MASK_POWERPC64;                   \
108
              error ("-m64 requires a PowerPC64 cpu");          \
109
            }                                                   \
110
        }                                                       \
111
      else                                                      \
112
        {                                                       \
113
          if (!RS6000_BI_ARCH_P)                                \
114
            error (INVALID_32BIT, "32");                        \
115
          if (TARGET_PROFILE_KERNEL)                            \
116
            {                                                   \
117
              target_flags &= ~MASK_PROFILE_KERNEL;             \
118
              error (INVALID_32BIT, "profile-kernel");          \
119
            }                                                   \
120
        }                                                       \
121
    }                                                           \
122
  while (0)
123
 
124
#ifdef  RS6000_BI_ARCH
125
 
126
#undef  OVERRIDE_OPTIONS
127
#define OVERRIDE_OPTIONS \
128
  rs6000_override_options (((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
129
                           ? (char *) 0 : TARGET_CPU_DEFAULT)
130
 
131
#endif
132
 
133
#undef  ASM_DEFAULT_SPEC
134
#undef  ASM_SPEC
135
#undef  LINK_OS_LINUX_SPEC
136
 
137
#ifndef RS6000_BI_ARCH
138
#define ASM_DEFAULT_SPEC "-mppc64"
139
#define ASM_SPEC         "%(asm_spec64) %(asm_spec_common)"
140
#define LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)"
141
#else
142
#if DEFAULT_ARCH64_P
143
#define ASM_DEFAULT_SPEC "-mppc%{!m32:64}"
144
#define ASM_SPEC         "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)"
145
#define LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}"
146
#else
147
#define ASM_DEFAULT_SPEC "-mppc%{m64:64}"
148
#define ASM_SPEC         "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)"
149
#define LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}"
150
#endif
151
#endif
152
 
153
#define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \
154
%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \
155
%{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} \
156
%{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
157
    %{mcall-freebsd: -mbig} \
158
    %{mcall-i960-old: -mlittle} \
159
    %{mcall-linux: -mbig} \
160
    %{mcall-gnu: -mbig} \
161
    %{mcall-netbsd: -mbig} \
162
}}}}"
163
 
164
#define ASM_SPEC64 "-a64"
165
 
166
#define ASM_SPEC_COMMON "%(asm_cpu) \
167
%{.s: %{mregnames} %{mno-regnames}} %{.S: %{mregnames} %{mno-regnames}} \
168
%{v:-V} %{Qy:} %{!Qn:-Qy} %{Wa,*:%*} \
169
%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
170
 
171
#undef  SUBSUBTARGET_EXTRA_SPECS
172
#define SUBSUBTARGET_EXTRA_SPECS \
173
  { "asm_spec_common",          ASM_SPEC_COMMON },                      \
174
  { "asm_spec32",               ASM_SPEC32 },                           \
175
  { "asm_spec64",               ASM_SPEC64 },                           \
176
  { "link_os_linux_spec32",     LINK_OS_LINUX_SPEC32 },                 \
177
  { "link_os_linux_spec64",     LINK_OS_LINUX_SPEC64 },
178
 
179
#undef  MULTILIB_DEFAULTS
180
#if DEFAULT_ARCH64_P
181
#define MULTILIB_DEFAULTS { "m64" }
182
#else
183
#define MULTILIB_DEFAULTS { "m32" }
184
#endif
185
 
186
#ifndef RS6000_BI_ARCH
187
 
188
/* 64-bit PowerPC Linux is always big-endian.  */
189
#undef  TARGET_LITTLE_ENDIAN
190
#define TARGET_LITTLE_ENDIAN    0
191
 
192
/* 64-bit PowerPC Linux always has a TOC.  */
193
#undef  TARGET_TOC
194
#define TARGET_TOC              1
195
 
196
/* Some things from sysv4.h we don't do when 64 bit.  */
197
#undef  TARGET_RELOCATABLE
198
#define TARGET_RELOCATABLE      0
199
#undef  TARGET_EABI
200
#define TARGET_EABI             0
201
#undef  TARGET_PROTOTYPE
202
#define TARGET_PROTOTYPE        0
203
#undef RELOCATABLE_NEEDS_FIXUP
204
#define RELOCATABLE_NEEDS_FIXUP 0
205
 
206
#endif
207
 
208
/* We use glibc _mcount for profiling.  */
209
#define NO_PROFILE_COUNTERS 1
210
#define PROFILE_HOOK(LABEL) \
211
  do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0)
212
 
213
/* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
214
#undef  ADJUST_FIELD_ALIGN
215
#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
216
  ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)     \
217
   ? 128                                                                \
218
   : (TARGET_64BIT                                                      \
219
      && TARGET_ALIGN_NATURAL == 0                                      \
220
      && TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE         \
221
                    ? get_inner_array_type (FIELD)                      \
222
                    : TREE_TYPE (FIELD)) == DFmode)                     \
223
   ? MIN ((COMPUTED), 32)                                               \
224
   : (COMPUTED))
225
 
226
/* PowerPC64 Linux increases natural record alignment to doubleword if
227
   the first field is an FP double, only if in power alignment mode.  */
228
#undef  ROUND_TYPE_ALIGN
229
#define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED)                   \
230
  ((TARGET_64BIT                                                        \
231
    && (TREE_CODE (STRUCT) == RECORD_TYPE                               \
232
        || TREE_CODE (STRUCT) == UNION_TYPE                             \
233
        || TREE_CODE (STRUCT) == QUAL_UNION_TYPE)                       \
234
    && TARGET_ALIGN_NATURAL == 0)                                       \
235
   ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED)      \
236
   : MAX ((COMPUTED), (SPECIFIED)))
237
 
238
/* Use the default for compiling target libs.  */
239
#ifdef IN_TARGET_LIBS
240
#undef TARGET_ALIGN_NATURAL
241
#define TARGET_ALIGN_NATURAL 1
242
#endif
243
 
244
/* Indicate that jump tables go in the text section.  */
245
#undef  JUMP_TABLES_IN_TEXT_SECTION
246
#define JUMP_TABLES_IN_TEXT_SECTION TARGET_64BIT
247
 
248
/* The linux ppc64 ABI isn't explicit on whether aggregates smaller
249
   than a doubleword should be padded upward or downward.  You could
250
   reasonably assume that they follow the normal rules for structure
251
   layout treating the parameter area as any other block of memory,
252
   then map the reg param area to registers.  i.e. pad upward.
253
   Setting both of the following defines results in this behavior.
254
   Setting just the first one will result in aggregates that fit in a
255
   doubleword being padded downward, and others being padded upward.
256
   Not a bad idea as this results in struct { int x; } being passed
257
   the same way as an int.  */
258
#define AGGREGATE_PADDING_FIXED TARGET_64BIT
259
#define AGGREGATES_PAD_UPWARD_ALWAYS 0
260
 
261
/* Specify padding for the last element of a block move between
262
   registers and memory.  FIRST is nonzero if this is the only
263
   element.  */
264
#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
265
  (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE))
266
 
267
/* __throw will restore its own return address to be the same as the
268
   return address of the function that the throw is being made to.
269
   This is unfortunate, because we want to check the original
270
   return address to see if we need to restore the TOC.
271
   So we have to squirrel it away with this.  */
272
#define SETUP_FRAME_ADDRESSES() \
273
  do { if (TARGET_64BIT) rs6000_aix_emit_builtin_unwind_init (); } while (0)
274
 
275
/* Override svr4.h  */
276
#undef MD_EXEC_PREFIX
277
#undef MD_STARTFILE_PREFIX
278
 
279
/* Linux doesn't support saving and restoring 64-bit regs in a 32-bit
280
   process.  */
281
#define OS_MISSING_POWERPC64 !TARGET_64BIT
282
 
283
/* glibc has float and long double forms of math functions.  */
284
#undef  TARGET_C99_FUNCTIONS
285
#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
286
 
287
#undef  TARGET_OS_CPP_BUILTINS
288
#define TARGET_OS_CPP_BUILTINS()                        \
289
  do                                                    \
290
    {                                                   \
291
      if (TARGET_64BIT)                                 \
292
        {                                               \
293
          builtin_define ("__PPC__");                   \
294
          builtin_define ("__PPC64__");                 \
295
          builtin_define ("__powerpc__");               \
296
          builtin_define ("__powerpc64__");             \
297
          builtin_assert ("cpu=powerpc64");             \
298
          builtin_assert ("machine=powerpc64");         \
299
        }                                               \
300
      else                                              \
301
        {                                               \
302
          builtin_define_std ("PPC");                   \
303
          builtin_define_std ("powerpc");               \
304
          builtin_assert ("cpu=powerpc");               \
305
          builtin_assert ("machine=powerpc");           \
306
          TARGET_OS_SYSV_CPP_BUILTINS ();               \
307
        }                                               \
308
    }                                                   \
309
  while (0)
310
 
311
#undef  CPP_OS_DEFAULT_SPEC
312
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
313
 
314
/* The GNU C++ standard library currently requires _GNU_SOURCE being
315
   defined on glibc-based systems. This temporary hack accomplishes this,
316
   it should go away as soon as libstdc++-v3 has a real fix.  */
317
#undef  CPLUSPLUS_CPP_SPEC
318
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
319
 
320
#undef  LINK_SHLIB_SPEC
321
#define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
322
 
323
#undef  LIB_DEFAULT_SPEC
324
#define LIB_DEFAULT_SPEC "%(lib_linux)"
325
 
326
#undef  STARTFILE_DEFAULT_SPEC
327
#define STARTFILE_DEFAULT_SPEC "%(startfile_linux)"
328
 
329
#undef  ENDFILE_DEFAULT_SPEC
330
#define ENDFILE_DEFAULT_SPEC "%(endfile_linux)"
331
 
332
#undef  LINK_START_DEFAULT_SPEC
333
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
334
 
335
#undef  LINK_OS_DEFAULT_SPEC
336
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
337
 
338
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
339
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
340
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
341
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
342
#if UCLIBC_DEFAULT
343
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
344
#else
345
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
346
#endif
347
#define LINUX_DYNAMIC_LINKER32 \
348
  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
349
#define LINUX_DYNAMIC_LINKER64 \
350
  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
351
 
352
 
353
#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
354
  %{rdynamic:-export-dynamic} \
355
  %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}}"
356
 
357
#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
358
  %{rdynamic:-export-dynamic} \
359
  %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}"
360
 
361
#undef  TOC_SECTION_ASM_OP
362
#define TOC_SECTION_ASM_OP \
363
  (TARGET_64BIT                                         \
364
   ? "\t.section\t\".toc\",\"aw\""                      \
365
   : "\t.section\t\".got\",\"aw\"")
366
 
367
#undef  MINIMAL_TOC_SECTION_ASM_OP
368
#define MINIMAL_TOC_SECTION_ASM_OP \
369
  (TARGET_64BIT                                         \
370
   ? "\t.section\t\".toc1\",\"aw\""                     \
371
   : ((TARGET_RELOCATABLE || flag_pic)                  \
372
      ? "\t.section\t\".got2\",\"aw\""                  \
373
      : "\t.section\t\".got1\",\"aw\""))
374
 
375
#undef  TARGET_VERSION
376
#define TARGET_VERSION fprintf (stderr, " (PowerPC64 GNU/Linux)");
377
 
378
/* Must be at least as big as our pointer type.  */
379
#undef  SIZE_TYPE
380
#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
381
 
382
#undef  PTRDIFF_TYPE
383
#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
384
 
385
#undef  WCHAR_TYPE
386
#define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
387
#undef  WCHAR_TYPE_SIZE
388
#define WCHAR_TYPE_SIZE 32
389
 
390
/* Override rs6000.h definition.  */
391
#undef  ASM_APP_ON
392
#define ASM_APP_ON "#APP\n"
393
 
394
/* Override rs6000.h definition.  */
395
#undef  ASM_APP_OFF
396
#define ASM_APP_OFF "#NO_APP\n"
397
 
398
/* PowerPC no-op instruction.  */
399
#undef  RS6000_CALL_GLUE
400
#define RS6000_CALL_GLUE (TARGET_64BIT ? "nop" : "cror 31,31,31")
401
 
402
#undef  RS6000_MCOUNT
403
#define RS6000_MCOUNT "_mcount"
404
 
405
#ifdef __powerpc64__
406
/* _init and _fini functions are built from bits spread across many
407
   object files, each potentially with a different TOC pointer.  For
408
   that reason, place a nop after the call so that the linker can
409
   restore the TOC pointer if a TOC adjusting call stub is needed.  */
410
#if DOT_SYMBOLS
411
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)      \
412
  asm (SECTION_OP "\n"                                  \
413
"       bl ." #FUNC "\n"                                \
414
"       nop\n"                                          \
415
"       .previous");
416
#else
417
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC)      \
418
  asm (SECTION_OP "\n"                                  \
419
"       bl " #FUNC "\n"                                 \
420
"       nop\n"                                          \
421
"       .previous");
422
#endif
423
#endif
424
 
425
/* FP save and restore routines.  */
426
#undef  SAVE_FP_PREFIX
427
#define SAVE_FP_PREFIX (TARGET_64BIT ? "._savef" : "_savefpr_")
428
#undef  SAVE_FP_SUFFIX
429
#define SAVE_FP_SUFFIX (TARGET_64BIT ? "" : "_l")
430
#undef  RESTORE_FP_PREFIX
431
#define RESTORE_FP_PREFIX (TARGET_64BIT ? "._restf" : "_restfpr_")
432
#undef  RESTORE_FP_SUFFIX
433
#define RESTORE_FP_SUFFIX (TARGET_64BIT ? "" : "_l")
434
 
435
/* Dwarf2 debugging.  */
436
#undef  PREFERRED_DEBUGGING_TYPE
437
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
438
 
439
/* This is how to declare the size of a function.  */
440
#undef  ASM_DECLARE_FUNCTION_SIZE
441
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)                    \
442
  do                                                                    \
443
    {                                                                   \
444
      if (!flag_inhibit_size_directive)                                 \
445
        {                                                               \
446
          fputs ("\t.size\t", (FILE));                                  \
447
          if (TARGET_64BIT && DOT_SYMBOLS)                              \
448
            putc ('.', (FILE));                                         \
449
          assemble_name ((FILE), (FNAME));                              \
450
          fputs (",.-", (FILE));                                        \
451
          rs6000_output_function_entry (FILE, FNAME);                   \
452
          putc ('\n', (FILE));                                          \
453
        }                                                               \
454
    }                                                                   \
455
  while (0)
456
 
457
/* Return nonzero if this entry is to be written into the constant
458
   pool in a special way.  We do so if this is a SYMBOL_REF, LABEL_REF
459
   or a CONST containing one of them.  If -mfp-in-toc (the default),
460
   we also do this for floating-point constants.  We actually can only
461
   do this if the FP formats of the target and host machines are the
462
   same, but we can't check that since not every file that uses
463
   GO_IF_LEGITIMATE_ADDRESS_P includes real.h.  We also do this when
464
   we can write the entry into the TOC and the entry is not larger
465
   than a TOC entry.  */
466
 
467
#undef  ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
468
#define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE)                        \
469
  (TARGET_TOC                                                           \
470
   && (GET_CODE (X) == SYMBOL_REF                                       \
471
       || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS       \
472
           && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF)             \
473
       || GET_CODE (X) == LABEL_REF                                     \
474
       || (GET_CODE (X) == CONST_INT                                    \
475
           && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode))      \
476
       || (GET_CODE (X) == CONST_DOUBLE                                 \
477
           && ((TARGET_64BIT                                            \
478
                && (TARGET_POWERPC64                                    \
479
                    || TARGET_MINIMAL_TOC                               \
480
                    || (SCALAR_FLOAT_MODE_P (GET_MODE (X))              \
481
                        && ! TARGET_NO_FP_IN_TOC)))                     \
482
               || (!TARGET_64BIT                                        \
483
                   && !TARGET_NO_FP_IN_TOC                              \
484
                   && !TARGET_RELOCATABLE                               \
485
                   && SCALAR_FLOAT_MODE_P (GET_MODE (X))                \
486
                   && BITS_PER_WORD == HOST_BITS_PER_INT)))))
487
 
488
/* Select a format to encode pointers in exception handling data.  CODE
489
   is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
490
   true if the symbol may be affected by dynamic relocations.  */
491
#undef  ASM_PREFERRED_EH_DATA_FORMAT
492
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
493
  ((TARGET_64BIT || flag_pic || TARGET_RELOCATABLE)                     \
494
   ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel                \
495
      | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4))             \
496
   : DW_EH_PE_absptr)
497
 
498
/* For backward compatibility, we must continue to use the AIX
499
   structure return convention.  */
500
#undef DRAFT_V4_STRUCT_RET
501
#define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
502
 
503
#define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack
504
 
505
#define TARGET_POSIX_IO
506
 
507
#define LINK_GCC_C_SEQUENCE_SPEC \
508
  "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
509
 
510
/* Use --as-needed -lgcc_s for eh support.  */
511
#ifdef HAVE_LD_AS_NEEDED
512
#define USE_LD_AS_NEEDED 1
513
#endif
514
 
515
#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"
516
 
517
#ifdef TARGET_LIBC_PROVIDES_SSP
518
/* ppc32 glibc provides __stack_chk_guard in -0x7008(2),
519
   ppc64 glibc provides it at -0x7010(13).  */
520
#define TARGET_THREAD_SSP_OFFSET        (TARGET_64BIT ? -0x7010 : -0x7008)
521
#endif
522
 
523
#define POWERPC_LINUX
524
 
525
/* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later.  */
526
#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
527
#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
528
#endif

powered by: WebSVN 2.1.0

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