Mercurial > hg > CbC > CbC_gcc
annotate gcc/config/i386/linux64.h @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 04ced10e8804 |
rev | line source |
---|---|
0 | 1 /* Definitions for AMD x86-64 running Linux-based GNU systems with ELF format. |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
2 Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 |
0 | 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 #if TARGET_64BIT_DEFAULT | |
28 #define TARGET_VERSION fprintf (stderr, " (x86-64 Linux/ELF)"); | |
29 #else | |
30 #define TARGET_VERSION fprintf (stderr, " (i386 Linux/ELF)"); | |
31 #endif | |
32 | |
33 #define TARGET_OS_CPP_BUILTINS() \ | |
34 do \ | |
35 { \ | |
36 LINUX_TARGET_OS_CPP_BUILTINS(); \ | |
37 } \ | |
38 while (0) | |
39 | |
40 #undef CPP_SPEC | |
41 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" | |
42 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
43 #undef CC1_SPEC |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
44 #define CC1_SPEC "%(cc1_cpu) %{profile:-p}" |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
45 |
0 | 46 /* The svr4 ABI for the i386 says that records and unions are returned |
47 in memory. In the 64bit compilation we will turn this flag off in | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
48 ix86_option_override_internal, as we never do pcc_struct_return |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
49 scheme on this target. */ |
0 | 50 #undef DEFAULT_PCC_STRUCT_RETURN |
51 #define DEFAULT_PCC_STRUCT_RETURN 1 | |
52 | |
53 /* We arrange for the whole %fs segment to map the tls area. */ | |
54 #undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT | |
55 #define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS | |
56 | |
57 /* Provide a LINK_SPEC. Here we provide support for the special GCC | |
58 options -static and -shared, which allow us to link things in one | |
59 of these three modes by applying the appropriate combinations of | |
60 options at link-time. | |
61 | |
62 When the -shared link option is used a final link is not being | |
63 done. */ | |
64 | |
65 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | |
66 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" | |
67 | |
68 #if TARGET_64BIT_DEFAULT | |
69 #define SPEC_32 "m32" | |
70 #define SPEC_64 "!m32" | |
71 #else | |
72 #define SPEC_32 "!m64" | |
73 #define SPEC_64 "m64" | |
74 #endif | |
75 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
76 #undef ASM_SPEC |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
77 #define ASM_SPEC "%{" SPEC_32 ":--32} %{" SPEC_64 ":--64} \ |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
78 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
79 |
0 | 80 #undef LINK_SPEC |
81 #define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \ | |
82 %{shared:-shared} \ | |
83 %{!shared: \ | |
84 %{!static: \ | |
85 %{rdynamic:-export-dynamic} \ | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
86 %{" SPEC_32 ":-dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
87 %{" SPEC_64 ":-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \ |
0 | 88 %{static:-static}}" |
89 | |
90 /* Similar to standard Linux, but adding -ffast-math support. */ | |
91 #undef ENDFILE_SPEC | |
92 #define ENDFILE_SPEC \ | |
93 "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ | |
94 %{mpc32:crtprec32.o%s} \ | |
95 %{mpc64:crtprec64.o%s} \ | |
96 %{mpc80:crtprec80.o%s} \ | |
97 %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" | |
98 | |
99 #if TARGET_64BIT_DEFAULT | |
100 #define MULTILIB_DEFAULTS { "m64" } | |
101 #else | |
102 #define MULTILIB_DEFAULTS { "m32" } | |
103 #endif | |
104 | |
105 /* Put all *tf routines in libgcc. */ | |
106 #undef LIBGCC2_HAS_TF_MODE | |
107 #define LIBGCC2_HAS_TF_MODE 1 | |
108 #define LIBGCC2_TF_CEXT q | |
109 #define TF_SIZE 113 | |
110 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
111 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack |
0 | 112 |
113 #define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h" | |
114 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
115 /* The stack pointer needs to be moved while checking the stack. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
116 #define STACK_CHECK_MOVING_SP 1 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
117 |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
118 /* Static stack checking is supported by means of probes. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
119 #define STACK_CHECK_STATIC_BUILTIN 1 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
120 |
0 | 121 /* This macro may be overridden in i386/k*bsd-gnu.h. */ |
122 #define REG_NAME(reg) reg | |
123 | |
124 #ifdef TARGET_LIBC_PROVIDES_SSP | |
125 /* i386 glibc provides __stack_chk_guard in %gs:0x14, | |
126 x86_64 glibc provides it in %fs:0x28. */ | |
127 #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14) | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
128 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
129 /* We steal the last transactional memory word. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
130 #define TARGET_CAN_SPLIT_STACK |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
131 #define TARGET_THREAD_SPLIT_STACK_OFFSET (TARGET_64BIT ? 0x70 : 0x30) |
0 | 132 #endif |