]>
Commit | Line | Data |
---|---|---|
41e5a1f5 | 1 | /* Definitions for Intel 386 running FreeBSD with ELF format |
7adcbafe | 2 | Copyright (C) 1996-2022 Free Software Foundation, Inc. |
41e5a1f5 DB |
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> | |
0e3ce1df | 7 | |
e20285ad | 8 | This file is part of GCC. |
0e3ce1df | 9 | |
e20285ad | 10 | GCC is free software; you can redistribute it and/or modify |
0e3ce1df | 11 | it under the terms of the GNU General Public License as published by |
2f83c7d6 | 12 | the Free Software Foundation; either version 3, or (at your option) |
0e3ce1df RK |
13 | any later version. |
14 | ||
e20285ad | 15 | GCC is distributed in the hope that it will be useful, |
0e3ce1df RK |
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. | |
19 | ||
20 | You should have received a copy of the GNU General Public License | |
2f83c7d6 NC |
21 | along with GCC; see the file COPYING3. If not see |
22 | <http://www.gnu.org/licenses/>. */ | |
0e3ce1df | 23 | |
39ed301b | 24 | |
6981eacf | 25 | /* Override the default comment-starter of "/". */ |
8634e925 | 26 | #undef ASM_COMMENT_START |
6981eacf JL |
27 | #define ASM_COMMENT_START "#" |
28 | ||
8634e925 | 29 | #undef ASM_APP_ON |
0e3ce1df RK |
30 | #define ASM_APP_ON "#APP\n" |
31 | ||
8634e925 | 32 | #undef ASM_APP_OFF |
0e3ce1df | 33 | #define ASM_APP_OFF "#NO_APP\n" |
56f28b73 | 34 | |
8634e925 | 35 | #undef DBX_REGISTER_NUMBER |
0f7fa3d0 JH |
36 | #define DBX_REGISTER_NUMBER(n) \ |
37 | (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) | |
41e5a1f5 | 38 | |
618ec0d7 | 39 | #undef NO_PROFILE_COUNTERS |
9739c90c | 40 | #define NO_PROFILE_COUNTERS 1 |
618ec0d7 | 41 | |
41e5a1f5 | 42 | /* Tell final.c that we don't need a label passed to mcount. */ |
0e3ce1df | 43 | |
8634e925 | 44 | #undef MCOUNT_NAME |
a5fa1ecd | 45 | #define MCOUNT_NAME ".mcount" |
0e3ce1df | 46 | |
41e5a1f5 | 47 | /* Make gcc agree with <machine/ansi.h>. */ |
0e3ce1df | 48 | |
8634e925 | 49 | #undef SIZE_TYPE |
04b379ba | 50 | #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") |
41e5a1f5 | 51 | |
8634e925 | 52 | #undef PTRDIFF_TYPE |
04b379ba | 53 | #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") |
41e5a1f5 | 54 | |
8634e925 | 55 | #undef WCHAR_TYPE_SIZE |
04b379ba | 56 | #define WCHAR_TYPE_SIZE (TARGET_64BIT ? 32 : BITS_PER_WORD) |
2de2f846 DB |
57 | |
58 | #undef SUBTARGET_EXTRA_SPECS /* i386.h bogusly defines it. */ | |
59 | #define SUBTARGET_EXTRA_SPECS \ | |
60 | { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } | |
41e5a1f5 | 61 | |
8ea0dcb9 AT |
62 | /* Use the STARTFILE_SPEC from config/freebsd-spec.h. */ |
63 | ||
64 | #undef STARTFILE_SPEC | |
65 | #define STARTFILE_SPEC FBSD_STARTFILE_SPEC | |
66 | ||
67 | /* Use the ENDFILE_SPEC from config/freebsd-spec.h. */ | |
68 | ||
69 | #undef ENDFILE_SPEC | |
70 | #define ENDFILE_SPEC FBSD_ENDFILE_SPEC | |
41e5a1f5 DB |
71 | |
72 | /* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support | |
73 | for the special GCC options -static and -shared, which allow us to | |
74 | link things in one of these three modes by applying the appropriate | |
83c2a9ef | 75 | combinations of options at link-time. |
41e5a1f5 DB |
76 | |
77 | When the -shared link option is used a final link is not being | |
78 | done. */ | |
79 | ||
80 | #undef LINK_SPEC | |
54e20385 | 81 | #define LINK_SPEC "\ |
d8a07487 | 82 | %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \ |
41e5a1f5 DB |
83 | %{v:-V} \ |
84 | %{assert*} %{R*} %{rpath*} %{defsym*} \ | |
85 | %{shared:-Bshareable %{h*} %{soname*}} \ | |
86 | %{!shared: \ | |
87 | %{!static: \ | |
88 | %{rdynamic:-export-dynamic} \ | |
e59dabd2 | 89 | -dynamic-linker %(fbsd_dynamic_linker) } \ |
41e5a1f5 DB |
90 | %{static:-Bstatic}} \ |
91 | %{symbolic:-Bsymbolic}" | |
92 | ||
93 | /* A C statement to output to the stdio stream FILE an assembler | |
94 | command to advance the location counter to a multiple of 1<<LOG | |
dd047c67 | 95 | bytes if it is within MAX_SKIP bytes. */ |
41e5a1f5 | 96 | |
dd047c67 | 97 | #define SUBALIGN_LOG 3 |
41e5a1f5 | 98 | |
d360fd18 DB |
99 | /* Don't default to pcc-struct-return, we want to retain compatibility with |
100 | older gcc versions AND pcc-struct-return is nonreentrant. | |
101 | (even though the SVR4 ABI for the i386 says that records and unions are | |
102 | returned in memory). */ | |
103 | ||
104 | #undef DEFAULT_PCC_STRUCT_RETURN | |
105 | #define DEFAULT_PCC_STRUCT_RETURN 0 | |
bfa0c519 RH |
106 | |
107 | /* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the | |
108 | compiler get the contents of <float.h> and std::numeric_limits correct. */ | |
cc69336f RH |
109 | #undef TARGET_96_ROUND_53_LONG_DOUBLE |
110 | #define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT) | |
2de710b9 EB |
111 | |
112 | /* Static stack checking is supported by means of probes. */ | |
113 | #define STACK_CHECK_STATIC_BUILTIN 1 | |
f52a39cd | 114 | |
01a0467e | 115 | #define SUBTARGET32_DEFAULT_CPU "i586" |
fb38bcf4 AT |
116 | |
117 | #define TARGET_ASM_FILE_END file_end_indicate_exec_stack | |
118 | ||
d730fd95 AT |
119 | /* Define the shadow offsets for asan. */ |
120 | #undef SUBTARGET_SHADOW_OFFSET | |
121 | #define SUBTARGET_SHADOW_OFFSET \ | |
122 | (TARGET_LP64 ? HOST_WIDE_INT_1 << 46 : HOST_WIDE_INT_1 << 30) |