Remove LIBGCC2_HAS_?F_MODE target macros.
[official-gcc.git] / gcc / config / i386 / freebsd.h
blobb09bfd023fe3a91485d6a8d39ffa6ab68bcadb90
1 /* Definitions for Intel 386 running FreeBSD with ELF format
2 Copyright (C) 1996-2014 Free Software Foundation, Inc.
3 Contributed by Eric Youngdale.
4 Modified for stabs-in-ELF by H.J. Lu.
5 Adapted from GNU/Linux version by John Polstra.
6 Continued development by David O'Brien <obrien@freebsd.org>
8 This file is part of GCC.
10 GCC is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3, or (at your option)
13 any later version.
15 GCC is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with GCC; see the file COPYING3. If not see
22 <http://www.gnu.org/licenses/>. */
25 /* Override the default comment-starter of "/". */
26 #undef ASM_COMMENT_START
27 #define ASM_COMMENT_START "#"
29 #undef ASM_APP_ON
30 #define ASM_APP_ON "#APP\n"
32 #undef ASM_APP_OFF
33 #define ASM_APP_OFF "#NO_APP\n"
35 #undef DBX_REGISTER_NUMBER
36 #define DBX_REGISTER_NUMBER(n) \
37 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
39 #undef NO_PROFILE_COUNTERS
40 #define NO_PROFILE_COUNTERS 1
42 /* Tell final.c that we don't need a label passed to mcount. */
44 #undef MCOUNT_NAME
45 #define MCOUNT_NAME ".mcount"
47 /* Make gcc agree with <machine/ansi.h>. */
49 #undef SIZE_TYPE
50 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
52 #undef PTRDIFF_TYPE
53 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
55 #undef WCHAR_TYPE_SIZE
56 #define WCHAR_TYPE_SIZE (TARGET_64BIT ? 32 : BITS_PER_WORD)
58 #undef SUBTARGET_EXTRA_SPECS /* i386.h bogusly defines it. */
59 #define SUBTARGET_EXTRA_SPECS \
60 { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER }
62 /* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add
63 the magical crtbegin.o file (see crtstuff.c) which provides part
64 of the support for getting C++ file-scope static object constructed
65 before entering `main'. */
67 #undef STARTFILE_SPEC
68 #define STARTFILE_SPEC \
69 "%{!shared: \
70 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
71 %{!p:%{profile:gcrt1.o%s} \
72 %{!profile:crt1.o%s}}}} \
73 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
75 /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
76 the magical crtend.o file (see crtstuff.c) which provides part of
77 the support for getting C++ file-scope static object constructed
78 before entering `main', followed by a normal "finalizer" file,
79 `crtn.o'. */
81 #undef ENDFILE_SPEC
82 #define ENDFILE_SPEC \
83 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
85 /* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support
86 for the special GCC options -static and -shared, which allow us to
87 link things in one of these three modes by applying the appropriate
88 combinations of options at link-time.
90 When the -shared link option is used a final link is not being
91 done. */
93 #undef LINK_SPEC
94 #define LINK_SPEC "\
95 %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \
96 %{v:-V} \
97 %{assert*} %{R*} %{rpath*} %{defsym*} \
98 %{shared:-Bshareable %{h*} %{soname*}} \
99 %{!shared: \
100 %{!static: \
101 %{rdynamic:-export-dynamic} \
102 -dynamic-linker %(fbsd_dynamic_linker) } \
103 %{static:-Bstatic}} \
104 %{symbolic:-Bsymbolic}"
106 /* A C statement to output to the stdio stream FILE an assembler
107 command to advance the location counter to a multiple of 1<<LOG
108 bytes if it is within MAX_SKIP bytes.
110 This is used to align code labels according to Intel recommendations. */
112 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
113 #undef ASM_OUTPUT_MAX_SKIP_ALIGN
114 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP) \
115 if ((LOG) != 0) { \
116 if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
117 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
119 #endif
121 /* Don't default to pcc-struct-return, we want to retain compatibility with
122 older gcc versions AND pcc-struct-return is nonreentrant.
123 (even though the SVR4 ABI for the i386 says that records and unions are
124 returned in memory). */
126 #undef DEFAULT_PCC_STRUCT_RETURN
127 #define DEFAULT_PCC_STRUCT_RETURN 0
129 /* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the
130 compiler get the contents of <float.h> and std::numeric_limits correct. */
131 #undef TARGET_96_ROUND_53_LONG_DOUBLE
132 #define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT)
134 /* Put all *tf routines in libgcc. */
135 #define LIBGCC2_TF_CEXT q
137 /* Static stack checking is supported by means of probes. */
138 #define STACK_CHECK_STATIC_BUILTIN 1
140 /* Support for i386 has been removed from FreeBSD 6.0 onward. */
141 #if FBSD_MAJOR >= 6
142 #define SUBTARGET32_DEFAULT_CPU "i486"
143 #endif
145 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack