Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/i386/freebsd.h @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Definitions for Intel 386 running FreeBSD with ELF format | 1 /* Definitions for Intel 386 running FreeBSD with ELF format |
2 Copyright (C) 1996, 2000, 2002, 2004, 2007, 2010 | 2 Copyright (C) 1996-2017 Free Software Foundation, Inc. |
3 Free Software Foundation, Inc. | |
4 Contributed by Eric Youngdale. | 3 Contributed by Eric Youngdale. |
5 Modified for stabs-in-ELF by H.J. Lu. | 4 Modified for stabs-in-ELF by H.J. Lu. |
6 Adapted from GNU/Linux version by John Polstra. | 5 Adapted from GNU/Linux version by John Polstra. |
7 Continued development by David O'Brien <obrien@freebsd.org> | 6 Continued development by David O'Brien <obrien@freebsd.org> |
8 | 7 |
20 | 19 |
21 You should have received a copy of the GNU General Public License | 20 You should have received a copy of the GNU General Public License |
22 along with GCC; see the file COPYING3. If not see | 21 along with GCC; see the file COPYING3. If not see |
23 <http://www.gnu.org/licenses/>. */ | 22 <http://www.gnu.org/licenses/>. */ |
24 | 23 |
25 | |
26 #define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)"); | |
27 | 24 |
28 /* Override the default comment-starter of "/". */ | 25 /* Override the default comment-starter of "/". */ |
29 #undef ASM_COMMENT_START | 26 #undef ASM_COMMENT_START |
30 #define ASM_COMMENT_START "#" | 27 #define ASM_COMMENT_START "#" |
31 | 28 |
60 | 57 |
61 #undef SUBTARGET_EXTRA_SPECS /* i386.h bogusly defines it. */ | 58 #undef SUBTARGET_EXTRA_SPECS /* i386.h bogusly defines it. */ |
62 #define SUBTARGET_EXTRA_SPECS \ | 59 #define SUBTARGET_EXTRA_SPECS \ |
63 { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } | 60 { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } |
64 | 61 |
65 /* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add | 62 /* Use the STARTFILE_SPEC from config/freebsd-spec.h. */ |
66 the magical crtbegin.o file (see crtstuff.c) which provides part | |
67 of the support for getting C++ file-scope static object constructed | |
68 before entering `main'. */ | |
69 | |
70 #undef STARTFILE_SPEC | |
71 #define STARTFILE_SPEC \ | |
72 "%{!shared: \ | |
73 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ | |
74 %{!p:%{profile:gcrt1.o%s} \ | |
75 %{!profile:crt1.o%s}}}} \ | |
76 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" | |
77 | 63 |
78 /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on | 64 #undef STARTFILE_SPEC |
79 the magical crtend.o file (see crtstuff.c) which provides part of | 65 #define STARTFILE_SPEC FBSD_STARTFILE_SPEC |
80 the support for getting C++ file-scope static object constructed | |
81 before entering `main', followed by a normal "finalizer" file, | |
82 `crtn.o'. */ | |
83 | 66 |
84 #undef ENDFILE_SPEC | 67 /* Use the ENDFILE_SPEC from config/freebsd-spec.h. */ |
85 #define ENDFILE_SPEC \ | 68 |
86 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" | 69 #undef ENDFILE_SPEC |
70 #define ENDFILE_SPEC FBSD_ENDFILE_SPEC | |
87 | 71 |
88 /* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support | 72 /* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support |
89 for the special GCC options -static and -shared, which allow us to | 73 for the special GCC options -static and -shared, which allow us to |
90 link things in one of these three modes by applying the appropriate | 74 link things in one of these three modes by applying the appropriate |
91 combinations of options at link-time. | 75 combinations of options at link-time. |
112 | 96 |
113 This is used to align code labels according to Intel recommendations. */ | 97 This is used to align code labels according to Intel recommendations. */ |
114 | 98 |
115 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN | 99 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN |
116 #undef ASM_OUTPUT_MAX_SKIP_ALIGN | 100 #undef ASM_OUTPUT_MAX_SKIP_ALIGN |
117 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP) \ | 101 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ |
118 if ((LOG) != 0) { \ | 102 do { \ |
119 if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ | 103 if ((LOG) != 0) { \ |
120 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ | 104 if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ |
121 } | 105 else { \ |
106 fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ | |
107 /* Make sure that we have at least 8 byte alignment if > 8 byte \ | |
108 alignment is preferred. */ \ | |
109 if ((LOG) > 3 \ | |
110 && (1 << (LOG)) > ((MAX_SKIP) + 1) \ | |
111 && (MAX_SKIP) >= 7) \ | |
112 fputs ("\t.p2align 3\n", (FILE)); \ | |
113 } \ | |
114 } \ | |
115 } while (0) | |
122 #endif | 116 #endif |
123 | 117 |
124 /* Don't default to pcc-struct-return, we want to retain compatibility with | 118 /* Don't default to pcc-struct-return, we want to retain compatibility with |
125 older gcc versions AND pcc-struct-return is nonreentrant. | 119 older gcc versions AND pcc-struct-return is nonreentrant. |
126 (even though the SVR4 ABI for the i386 says that records and unions are | 120 (even though the SVR4 ABI for the i386 says that records and unions are |
132 /* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the | 126 /* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the |
133 compiler get the contents of <float.h> and std::numeric_limits correct. */ | 127 compiler get the contents of <float.h> and std::numeric_limits correct. */ |
134 #undef TARGET_96_ROUND_53_LONG_DOUBLE | 128 #undef TARGET_96_ROUND_53_LONG_DOUBLE |
135 #define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT) | 129 #define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT) |
136 | 130 |
137 /* Put all *tf routines in libgcc. */ | |
138 #undef LIBGCC2_HAS_TF_MODE | |
139 #define LIBGCC2_HAS_TF_MODE 1 | |
140 #define LIBGCC2_TF_CEXT q | |
141 #define TF_SIZE 113 | |
142 | |
143 /* Static stack checking is supported by means of probes. */ | 131 /* Static stack checking is supported by means of probes. */ |
144 #define STACK_CHECK_STATIC_BUILTIN 1 | 132 #define STACK_CHECK_STATIC_BUILTIN 1 |
145 | 133 |
146 /* Support for i386 has been removed from FreeBSD 6.0 onward. */ | 134 #define SUBTARGET32_DEFAULT_CPU "i586" |
147 #if FBSD_MAJOR >= 6 | 135 |
148 #define SUBTARGET32_DEFAULT_CPU "i486" | 136 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack |
149 #endif | 137 |