OSDN Git Service

* target.h (struct gcc_target): Add asm_out.exception_section,
[pf3gnuchains/gcc-fork.git] / gcc / target-def.h
1 /* Default initializers for a generic GCC target.
2    Copyright (C) 2001 Free Software Foundation, Inc.
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
22 /* See target.h for a description of what this file contains and how to
23    use it.
24
25    We want to have non-NULL default definitions of all hook functions,
26    even if they do nothing.  */
27
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
32 /* Assembler output.  */
33 #define TARGET_ASM_OPEN_PAREN "("
34 #define TARGET_ASM_CLOSE_PAREN ")"
35 #define TARGET_ASM_FUNCTION_PROLOGUE default_function_pro_epilogue
36 #define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue
37 #define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
38 #define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE no_asm_to_stream
39
40 #if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2)
41 # ifdef CTORS_SECTION_ASM_OP
42 #  define TARGET_ASM_CONSTRUCTOR default_ctor_section_asm_out_constructor
43 # else
44 #  ifdef TARGET_ASM_NAMED_SECTION
45 #   define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor
46 #  else
47 #   define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor
48 #  endif
49 # endif
50 #endif
51
52 #if !defined(TARGET_ASM_DESTRUCTOR) && !defined(USE_COLLECT2)
53 # ifdef DTORS_SECTION_ASM_OP
54 #  define TARGET_ASM_DESTRUCTOR default_dtor_section_asm_out_destructor
55 # else
56 #  ifdef TARGET_ASM_NAMED_SECTION
57 #   define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor
58 #  else
59 #   define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor
60 #  endif
61 # endif
62 #endif
63
64 #if defined(TARGET_ASM_CONSTRUCTOR) && defined(TARGET_ASM_DESTRUCTOR)
65 #define TARGET_HAVE_CTORS_DTORS true
66 #else
67 #define TARGET_HAVE_CTORS_DTORS false
68 #define TARGET_ASM_CONSTRUCTOR NULL
69 #define TARGET_ASM_DESTRUCTOR NULL
70 #endif
71
72 #ifdef TARGET_ASM_NAMED_SECTION
73 #define TARGET_HAVE_NAMED_SECTIONS true
74 #else
75 #define TARGET_ASM_NAMED_SECTION default_no_named_section
76 #define TARGET_HAVE_NAMED_SECTIONS false
77 #endif
78
79 #ifndef TARGET_ASM_EXCEPTION_SECTION
80 #define TARGET_ASM_EXCEPTION_SECTION default_exception_section
81 #endif
82
83 #ifndef TARGET_ASM_EH_FRAME_SECTION
84 #define TARGET_ASM_EH_FRAME_SECTION default_eh_frame_section
85 #endif
86
87 #define TARGET_ASM_OUT {TARGET_ASM_OPEN_PAREN,                  \
88                         TARGET_ASM_CLOSE_PAREN,                 \
89                         TARGET_ASM_FUNCTION_PROLOGUE,           \
90                         TARGET_ASM_FUNCTION_END_PROLOGUE,       \
91                         TARGET_ASM_FUNCTION_BEGIN_EPILOGUE,     \
92                         TARGET_ASM_FUNCTION_EPILOGUE,           \
93                         TARGET_ASM_NAMED_SECTION,               \
94                         TARGET_ASM_EXCEPTION_SECTION,           \
95                         TARGET_ASM_EH_FRAME_SECTION,            \
96                         TARGET_ASM_CONSTRUCTOR,                 \
97                         TARGET_ASM_DESTRUCTOR}
98
99 /* Scheduler hooks.  All of these default to null pointers, which
100    haifa-sched.c looks for and handles.  */
101 #define TARGET_SCHED_ADJUST_COST 0
102 #define TARGET_SCHED_ADJUST_PRIORITY 0
103 #define TARGET_SCHED_ISSUE_RATE 0
104 #define TARGET_SCHED_VARIABLE_ISSUE 0
105 #define TARGET_SCHED_INIT 0
106 #define TARGET_SCHED_FINISH 0
107 #define TARGET_SCHED_REORDER 0
108 #define TARGET_SCHED_REORDER2 0
109 #define TARGET_SCHED_CYCLE_DISPLAY 0
110
111 #define TARGET_SCHED    {TARGET_SCHED_ADJUST_COST,      \
112                          TARGET_SCHED_ADJUST_PRIORITY,  \
113                          TARGET_SCHED_ISSUE_RATE,       \
114                          TARGET_SCHED_VARIABLE_ISSUE,   \
115                          TARGET_SCHED_INIT,             \
116                          TARGET_SCHED_FINISH,           \
117                          TARGET_SCHED_REORDER,          \
118                          TARGET_SCHED_REORDER2,         \
119                          TARGET_SCHED_CYCLE_DISPLAY}
120
121 /* All in tree.c.  */
122 #define TARGET_MERGE_DECL_ATTRIBUTES merge_decl_attributes
123 #define TARGET_MERGE_TYPE_ATTRIBUTES merge_type_attributes
124 #define TARGET_ATTRIBUTE_TABLE default_target_attribute_table
125 #define TARGET_COMP_TYPE_ATTRIBUTES default_comp_type_attributes
126 #define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES default_set_default_type_attributes
127 #define TARGET_INSERT_ATTRIBUTES default_insert_attributes
128 #define TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P default_function_attribute_inlinable_p
129
130 /* In builtins.c.  */
131 #define TARGET_INIT_BUILTINS default_init_builtins
132 #define TARGET_EXPAND_BUILTIN default_expand_builtin
133
134 /* In varasm.c.  */
135 #ifndef TARGET_SECTION_TYPE_FLAGS
136 #define TARGET_SECTION_TYPE_FLAGS default_section_type_flags
137 #endif
138
139 /* The whole shebang.  */
140 #define TARGET_INITIALIZER                      \
141 {                                               \
142   TARGET_ASM_OUT,                               \
143   TARGET_SCHED,                                 \
144   TARGET_MERGE_DECL_ATTRIBUTES,                 \
145   TARGET_MERGE_TYPE_ATTRIBUTES,                 \
146   TARGET_ATTRIBUTE_TABLE,                       \
147   TARGET_COMP_TYPE_ATTRIBUTES,                  \
148   TARGET_SET_DEFAULT_TYPE_ATTRIBUTES,           \
149   TARGET_INSERT_ATTRIBUTES,                     \
150   TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P,        \
151   TARGET_INIT_BUILTINS,                         \
152   TARGET_EXPAND_BUILTIN,                        \
153   TARGET_SECTION_TYPE_FLAGS,                    \
154   TARGET_HAVE_NAMED_SECTIONS,                   \
155   TARGET_HAVE_CTORS_DTORS                       \
156 }