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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [i386/] [gnu-user64.h] - Blame information for rev 801

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

Line No. Rev Author Line
1 709 jeremybenn
/* Definitions for AMD x86-64 using GNU userspace.
2
   Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
3
   Free Software Foundation, Inc.
4
   Contributed by Jan Hubicka <jh@suse.cz>, based on linux.h.
5
 
6
This file is part of GCC.
7
 
8
GCC is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 3, or (at your option)
11
any later version.
12
 
13
GCC is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17
 
18
Under Section 7 of GPL version 3, you are granted additional
19
permissions described in the GCC Runtime Library Exception, version
20
3.1, as published by the Free Software Foundation.
21
 
22
You should have received a copy of the GNU General Public License and
23
a copy of the GCC Runtime Library Exception along with this program;
24
see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
25
<http://www.gnu.org/licenses/>.  */
26
 
27
#define TARGET_OS_CPP_BUILTINS()                                \
28
  do                                                            \
29
    {                                                           \
30
        GNU_USER_TARGET_OS_CPP_BUILTINS();                      \
31
    }                                                           \
32
  while (0)
33
 
34
#undef CPP_SPEC
35
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
36
 
37
#undef CC1_SPEC
38
#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
39
 
40
/* The svr4 ABI for the i386 says that records and unions are returned
41
   in memory.  In the 64bit compilation we will turn this flag off in
42
   ix86_option_override_internal, as we never do pcc_struct_return
43
   scheme on this target.  */
44
#undef DEFAULT_PCC_STRUCT_RETURN
45
#define DEFAULT_PCC_STRUCT_RETURN 1
46
 
47
/* We arrange for the whole %fs segment to map the tls area.  */
48
#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
49
#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS
50
 
51
/* Provide a LINK_SPEC.  Here we provide support for the special GCC
52
   options -static and -shared, which allow us to link things in one
53
   of these three modes by applying the appropriate combinations of
54
   options at link-time.
55
 
56
   When the -shared link option is used a final link is not being
57
   done.  */
58
 
59
#if TARGET_64BIT_DEFAULT
60
#define SPEC_32 "m32"
61
#define SPEC_64 "m32|mx32:;"
62
#define SPEC_X32 "mx32"
63
#else
64
#define SPEC_32 "m64|mx32:;"
65
#define SPEC_64 "m64"
66
#define SPEC_X32 "mx32"
67
#endif
68
 
69
#undef ASM_SPEC
70
#define ASM_SPEC "%{" SPEC_32 ":--32} \
71
 %{" SPEC_64 ":--64} \
72
 %{" SPEC_X32 ":--x32} \
73
 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
74
 
75
#undef  LINK_SPEC
76
#define LINK_SPEC "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \
77
                   %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
78
                   %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \
79
  %{shared:-shared} \
80
  %{!shared: \
81
    %{!static: \
82
      %{rdynamic:-export-dynamic} \
83
      %{" SPEC_32 ":-dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "} \
84
      %{" SPEC_64 ":-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "} \
85
      %{" SPEC_X32 ":-dynamic-linker " GNU_USER_DYNAMIC_LINKERX32 "}} \
86
    %{static:-static}}"
87
 
88
/* Similar to standard GNU userspace, but adding -ffast-math support.  */
89
#undef  ENDFILE_SPEC
90
#define ENDFILE_SPEC \
91
  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
92
   %{mpc32:crtprec32.o%s} \
93
   %{mpc64:crtprec64.o%s} \
94
   %{mpc80:crtprec80.o%s} \
95
   %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
96
 
97
#if TARGET_64BIT_DEFAULT
98
#define MULTILIB_DEFAULTS { "m64" }
99
#else
100
#define MULTILIB_DEFAULTS { "m32" }
101
#endif
102
 
103
/* Put all *tf routines in libgcc.  */
104
#undef LIBGCC2_HAS_TF_MODE
105
#define LIBGCC2_HAS_TF_MODE 1
106
#define LIBGCC2_TF_CEXT q
107
#define TF_SIZE 113
108
 
109
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
110
 
111
/* The stack pointer needs to be moved while checking the stack.  */
112
#define STACK_CHECK_MOVING_SP 1
113
 
114
/* Static stack checking is supported by means of probes.  */
115
#define STACK_CHECK_STATIC_BUILTIN 1
116
 
117
#ifdef TARGET_LIBC_PROVIDES_SSP
118
/* i386 glibc provides __stack_chk_guard in %gs:0x14,
119
   x32 glibc provides it in %fs:0x18.
120
   x86_64 glibc provides it in %fs:0x28.  */
121
#define TARGET_THREAD_SSP_OFFSET \
122
  (TARGET_64BIT ? (TARGET_X32 ? 0x18 : 0x28) : 0x14)
123
 
124
/* We steal the last transactional memory word.  */
125
#define TARGET_CAN_SPLIT_STACK
126
#define TARGET_THREAD_SPLIT_STACK_OFFSET \
127
  (TARGET_64BIT ? (TARGET_X32 ? 0x40 : 0x70) : 0x30)
128
#endif

powered by: WebSVN 2.1.0

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