]>
Commit | Line | Data |
---|---|---|
672a6f42 | 1 | /* Default initializers for a generic GCC target. |
f913c102 | 2 | Copyright (C) 2001, 2002 Free Software Foundation, Inc. |
672a6f42 NB |
3 | |
4 | This program is free software; you can redistribute it and/or modify it | |
5 | under the terms of the GNU General Public License as published by the | |
6 | Free Software Foundation; either version 2, or (at your option) any | |
7 | later version. | |
8 | ||
9 | This program is distributed in the hope that it will be useful, | |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | GNU General Public License for more details. | |
13 | ||
14 | You should have received a copy of the GNU General Public License | |
15 | along with this program; if not, write to the Free Software | |
16 | Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
17 | ||
18 | In other words, you are welcome to use, share and improve this program. | |
19 | You are forbidden to forbid anyone else to use, share and improve | |
20 | what you give them. Help stamp out software-hoarding! */ | |
21 | ||
07c9d2eb | 22 | /* See target.h for a description of what this file contains and how to |
a8b997e8 | 23 | use it. |
672a6f42 | 24 | |
a8b997e8 NB |
25 | We want to have non-NULL default definitions of all hook functions, |
26 | even if they do nothing. */ | |
27 | ||
07c9d2eb SS |
28 | /* Note that if one of these macros must be defined in an OS .h file |
29 | rather than the .c file, then we need to wrap the default | |
30 | definition in a #ifndef, since files include tm.h before this one. */ | |
31 | ||
b4c25db2 | 32 | /* Assembler output. */ |
17b53c33 NB |
33 | #define TARGET_ASM_OPEN_PAREN "(" |
34 | #define TARGET_ASM_CLOSE_PAREN ")" | |
301d03af RS |
35 | #define TARGET_ASM_BYTE_OP "\t.byte\t" |
36 | ||
37 | #define TARGET_ASM_ALIGNED_HI_OP "\t.short\t" | |
38 | #define TARGET_ASM_ALIGNED_SI_OP "\t.long\t" | |
39 | #define TARGET_ASM_ALIGNED_DI_OP NULL | |
40 | #define TARGET_ASM_ALIGNED_TI_OP NULL | |
41 | ||
42 | /* GAS and SYSV4 assemblers accept these. */ | |
43 | #if defined (OBJECT_FORMAT_ELF) || defined (OBJECT_FORMAT_ROSE) | |
44 | #define TARGET_ASM_UNALIGNED_HI_OP "\t.2byte\t" | |
45 | #define TARGET_ASM_UNALIGNED_SI_OP "\t.4byte\t" | |
46 | #define TARGET_ASM_UNALIGNED_DI_OP "\t.8byte\t" | |
47 | #define TARGET_ASM_UNALIGNED_TI_OP NULL | |
48 | #else | |
49 | #define TARGET_ASM_UNALIGNED_HI_OP NULL | |
50 | #define TARGET_ASM_UNALIGNED_SI_OP NULL | |
51 | #define TARGET_ASM_UNALIGNED_DI_OP NULL | |
52 | #define TARGET_ASM_UNALIGNED_TI_OP NULL | |
53 | #endif /* OBJECT_FORMAT_ELF || OBJECT_FORMAT_ROSE */ | |
54 | ||
55 | #define TARGET_ASM_INTEGER default_assemble_integer | |
56 | ||
08c148a8 NB |
57 | #define TARGET_ASM_FUNCTION_PROLOGUE default_function_pro_epilogue |
58 | #define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue | |
b4c25db2 NB |
59 | #define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream |
60 | #define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE no_asm_to_stream | |
08c148a8 | 61 | |
2cc07db4 RH |
62 | #if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2) |
63 | # ifdef CTORS_SECTION_ASM_OP | |
64 | # define TARGET_ASM_CONSTRUCTOR default_ctor_section_asm_out_constructor | |
65 | # else | |
66 | # ifdef TARGET_ASM_NAMED_SECTION | |
67 | # define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor | |
68 | # else | |
69 | # define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor | |
70 | # endif | |
71 | # endif | |
72 | #endif | |
73 | ||
74 | #if !defined(TARGET_ASM_DESTRUCTOR) && !defined(USE_COLLECT2) | |
75 | # ifdef DTORS_SECTION_ASM_OP | |
76 | # define TARGET_ASM_DESTRUCTOR default_dtor_section_asm_out_destructor | |
77 | # else | |
78 | # ifdef TARGET_ASM_NAMED_SECTION | |
79 | # define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor | |
80 | # else | |
81 | # define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor | |
82 | # endif | |
83 | # endif | |
84 | #endif | |
85 | ||
86 | #if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR) | |
87 | #define TARGET_HAVE_CTORS_DTORS true | |
88 | #else | |
89 | #define TARGET_HAVE_CTORS_DTORS false | |
90 | #define TARGET_ASM_CONSTRUCTOR NULL | |
91 | #define TARGET_ASM_DESTRUCTOR NULL | |
92 | #endif | |
93 | ||
7c262518 RH |
94 | #ifdef TARGET_ASM_NAMED_SECTION |
95 | #define TARGET_HAVE_NAMED_SECTIONS true | |
96 | #else | |
97 | #define TARGET_ASM_NAMED_SECTION default_no_named_section | |
98 | #define TARGET_HAVE_NAMED_SECTIONS false | |
99 | #endif | |
100 | ||
07c9d2eb SS |
101 | #ifndef TARGET_ASM_EXCEPTION_SECTION |
102 | #define TARGET_ASM_EXCEPTION_SECTION default_exception_section | |
103 | #endif | |
104 | ||
105 | #ifndef TARGET_ASM_EH_FRAME_SECTION | |
106 | #define TARGET_ASM_EH_FRAME_SECTION default_eh_frame_section | |
107 | #endif | |
108 | ||
301d03af RS |
109 | #define TARGET_ASM_ALIGNED_INT_OP \ |
110 | {TARGET_ASM_ALIGNED_HI_OP, \ | |
111 | TARGET_ASM_ALIGNED_SI_OP, \ | |
112 | TARGET_ASM_ALIGNED_DI_OP, \ | |
113 | TARGET_ASM_ALIGNED_TI_OP} | |
114 | ||
115 | #define TARGET_ASM_UNALIGNED_INT_OP \ | |
116 | {TARGET_ASM_UNALIGNED_HI_OP, \ | |
117 | TARGET_ASM_UNALIGNED_SI_OP, \ | |
118 | TARGET_ASM_UNALIGNED_DI_OP, \ | |
119 | TARGET_ASM_UNALIGNED_TI_OP} | |
120 | ||
17b53c33 NB |
121 | #define TARGET_ASM_OUT {TARGET_ASM_OPEN_PAREN, \ |
122 | TARGET_ASM_CLOSE_PAREN, \ | |
301d03af RS |
123 | TARGET_ASM_BYTE_OP, \ |
124 | TARGET_ASM_ALIGNED_INT_OP, \ | |
125 | TARGET_ASM_UNALIGNED_INT_OP, \ | |
126 | TARGET_ASM_INTEGER, \ | |
17b53c33 | 127 | TARGET_ASM_FUNCTION_PROLOGUE, \ |
b4c25db2 NB |
128 | TARGET_ASM_FUNCTION_END_PROLOGUE, \ |
129 | TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, \ | |
7c262518 | 130 | TARGET_ASM_FUNCTION_EPILOGUE, \ |
2cc07db4 | 131 | TARGET_ASM_NAMED_SECTION, \ |
07c9d2eb SS |
132 | TARGET_ASM_EXCEPTION_SECTION, \ |
133 | TARGET_ASM_EH_FRAME_SECTION, \ | |
2cc07db4 RH |
134 | TARGET_ASM_CONSTRUCTOR, \ |
135 | TARGET_ASM_DESTRUCTOR} | |
08c148a8 | 136 | |
c237e94a ZW |
137 | /* Scheduler hooks. All of these default to null pointers, which |
138 | haifa-sched.c looks for and handles. */ | |
139 | #define TARGET_SCHED_ADJUST_COST 0 | |
140 | #define TARGET_SCHED_ADJUST_PRIORITY 0 | |
141 | #define TARGET_SCHED_ISSUE_RATE 0 | |
142 | #define TARGET_SCHED_VARIABLE_ISSUE 0 | |
143 | #define TARGET_SCHED_INIT 0 | |
144 | #define TARGET_SCHED_FINISH 0 | |
145 | #define TARGET_SCHED_REORDER 0 | |
146 | #define TARGET_SCHED_REORDER2 0 | |
147 | #define TARGET_SCHED_CYCLE_DISPLAY 0 | |
148 | ||
b8ec5764 VM |
149 | #define TARGET_SCHED {TARGET_SCHED_ADJUST_COST, \ |
150 | TARGET_SCHED_ADJUST_PRIORITY, \ | |
151 | TARGET_SCHED_ISSUE_RATE, \ | |
152 | TARGET_SCHED_VARIABLE_ISSUE, \ | |
153 | TARGET_SCHED_INIT, \ | |
154 | TARGET_SCHED_FINISH, \ | |
155 | TARGET_SCHED_REORDER, \ | |
156 | TARGET_SCHED_REORDER2, \ | |
157 | TARGET_SCHED_CYCLE_DISPLAY} | |
c237e94a | 158 | |
a8b997e8 | 159 | /* All in tree.c. */ |
672a6f42 NB |
160 | #define TARGET_MERGE_DECL_ATTRIBUTES merge_decl_attributes |
161 | #define TARGET_MERGE_TYPE_ATTRIBUTES merge_type_attributes | |
91d231cb | 162 | #define TARGET_ATTRIBUTE_TABLE default_target_attribute_table |
8d8e52be JM |
163 | #define TARGET_COMP_TYPE_ATTRIBUTES default_comp_type_attributes |
164 | #define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES default_set_default_type_attributes | |
12a68f1f | 165 | #define TARGET_INSERT_ATTRIBUTES default_insert_attributes |
91d231cb | 166 | #define TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P default_function_attribute_inlinable_p |
f913c102 | 167 | #define TARGET_MS_BITFIELD_LAYOUT_P default_ms_bitfield_layout_p |
672a6f42 | 168 | |
f6155fda SS |
169 | /* In builtins.c. */ |
170 | #define TARGET_INIT_BUILTINS default_init_builtins | |
171 | #define TARGET_EXPAND_BUILTIN default_expand_builtin | |
172 | ||
7c262518 RH |
173 | /* In varasm.c. */ |
174 | #ifndef TARGET_SECTION_TYPE_FLAGS | |
175 | #define TARGET_SECTION_TYPE_FLAGS default_section_type_flags | |
176 | #endif | |
177 | ||
672a6f42 NB |
178 | /* The whole shebang. */ |
179 | #define TARGET_INITIALIZER \ | |
180 | { \ | |
08c148a8 | 181 | TARGET_ASM_OUT, \ |
c237e94a | 182 | TARGET_SCHED, \ |
672a6f42 NB |
183 | TARGET_MERGE_DECL_ATTRIBUTES, \ |
184 | TARGET_MERGE_TYPE_ATTRIBUTES, \ | |
91d231cb | 185 | TARGET_ATTRIBUTE_TABLE, \ |
8d8e52be | 186 | TARGET_COMP_TYPE_ATTRIBUTES, \ |
12a68f1f | 187 | TARGET_SET_DEFAULT_TYPE_ATTRIBUTES, \ |
f6155fda | 188 | TARGET_INSERT_ATTRIBUTES, \ |
91d231cb | 189 | TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P, \ |
f913c102 | 190 | TARGET_MS_BITFIELD_LAYOUT_P, \ |
f6155fda | 191 | TARGET_INIT_BUILTINS, \ |
7c262518 RH |
192 | TARGET_EXPAND_BUILTIN, \ |
193 | TARGET_SECTION_TYPE_FLAGS, \ | |
2cc07db4 RH |
194 | TARGET_HAVE_NAMED_SECTIONS, \ |
195 | TARGET_HAVE_CTORS_DTORS \ | |
672a6f42 | 196 | } |