(ASM_SPEC): Change {% to %{.
[official-gcc.git] / gcc / function.h
blobb70d6b93d192a323afcb91d4e50b335e756ace82
1 /* Structure for saving state for a nested function.
2 Copyright (C) 1989, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
22 #ifndef NULL_TREE
23 #define tree int *
24 #endif
25 #ifndef GET_CODE
26 #define rtx int *
27 #endif
29 struct var_refs_queue
31 rtx modified;
32 enum machine_mode promoted_mode;
33 int unsignedp;
34 struct var_refs_queue *next;
37 /* Stack of pending (incomplete) sequences saved by `start_sequence'.
38 Each element describes one pending sequence.
39 The main insn-chain is saved in the last element of the chain,
40 unless the chain is empty. */
42 struct sequence_stack
44 /* First and last insns in the chain of the saved sequence. */
45 rtx first, last;
46 tree sequence_rtl_expr;
47 struct sequence_stack *next;
50 extern struct sequence_stack *sequence_stack;
52 /* Stack of single obstacks. */
54 struct simple_obstack_stack
56 struct obstack *obstack;
57 struct simple_obstack_stack *next;
60 /* This structure can save all the important global and static variables
61 describing the status of the current function. */
63 struct function
65 struct function *next;
67 /* For function.c. */
68 char *name;
69 tree decl;
70 int pops_args;
71 int returns_struct;
72 int returns_pcc_struct;
73 int returns_pointer;
74 int needs_context;
75 int calls_setjmp;
76 int calls_longjmp;
77 int calls_alloca;
78 int has_nonlocal_label;
79 int has_nonlocal_goto;
80 int contains_functions;
81 rtx nonlocal_goto_handler_slot;
82 rtx nonlocal_goto_stack_level;
83 tree nonlocal_labels;
84 int args_size;
85 int pretend_args_size;
86 rtx arg_offset_rtx;
87 int varargs;
88 int stdarg;
89 int max_parm_reg;
90 rtx *parm_reg_stack_loc;
91 int outgoing_args_size;
92 rtx return_rtx;
93 rtx cleanup_label;
94 rtx return_label;
95 rtx save_expr_regs;
96 rtx stack_slot_list;
97 rtx parm_birth_insn;
98 int frame_offset;
99 rtx tail_recursion_label;
100 rtx tail_recursion_reentry;
101 rtx internal_arg_pointer;
102 rtx arg_pointer_save_area;
103 tree rtl_expr_chain;
104 rtx last_parm_insn;
105 tree context_display;
106 tree trampoline_list;
107 int function_call_count;
108 struct temp_slot *temp_slots;
109 int temp_slot_level;
110 /* This slot is initialized as 0 and is added to
111 during the nested function. */
112 struct var_refs_queue *fixup_var_refs_queue;
114 /* For stmt.c */
115 struct nesting *block_stack;
116 struct nesting *stack_block_stack;
117 struct nesting *cond_stack;
118 struct nesting *loop_stack;
119 struct nesting *case_stack;
120 struct nesting *nesting_stack;
121 int nesting_depth;
122 int block_start_count;
123 tree last_expr_type;
124 rtx last_expr_value;
125 int expr_stmts_for_value;
126 char *emit_filename;
127 int emit_lineno;
128 struct goto_fixup *goto_fixup_chain;
130 /* For expr.c. */
131 int pending_stack_adjust;
132 int inhibit_defer_pop;
133 tree cleanups_this_call;
134 rtx saveregs_value;
135 rtx apply_args_value;
136 rtx forced_labels;
138 /* For emit-rtl.c. */
139 int reg_rtx_no;
140 int first_label_num;
141 rtx first_insn;
142 rtx last_insn;
143 tree sequence_rtl_expr;
144 struct sequence_stack *sequence_stack;
145 int cur_insn_uid;
146 int last_linenum;
147 char *last_filename;
148 char *regno_pointer_flag;
149 char *regno_pointer_align;
150 int regno_pointer_flag_length;
151 rtx *regno_reg_rtx;
153 /* For stor-layout.c. */
154 tree permanent_type_chain;
155 tree temporary_type_chain;
156 tree permanent_type_end;
157 tree temporary_type_end;
158 tree pending_sizes;
159 int immediate_size_expand;
161 /* For tree.c. */
162 int all_types_permanent;
163 struct momentary_level *momentary_stack;
164 char *maybepermanent_firstobj;
165 char *temporary_firstobj;
166 char *momentary_firstobj;
167 char *momentary_function_firstobj;
168 struct obstack *current_obstack;
169 struct obstack *function_obstack;
170 struct obstack *function_maybepermanent_obstack;
171 struct obstack *expression_obstack;
172 struct obstack *saveable_obstack;
173 struct obstack *rtl_obstack;
174 struct simple_obstack_stack *inline_obstacks;
176 /* For integrate.c. */
177 int uses_const_pool;
179 /* For md files. */
180 int uses_pic_offset_table;
181 /* tm.h can use this to store whatever it likes. */
182 struct machine_function *machine;
184 /* For reorg. */
185 rtx epilogue_delay_list;
187 /* For varasm. */
188 struct constant_descriptor **const_rtx_hash_table;
189 struct pool_sym **const_rtx_sym_hash_table;
190 struct pool_constant *first_pool, *last_pool;
191 int pool_offset;
194 /* The FUNCTION_DECL for an inline function currently being expanded. */
195 extern tree inline_function_decl;
197 /* Label that will go on function epilogue.
198 Jumping to this label serves as a "return" instruction
199 on machines which require execution of the epilogue on all returns. */
200 extern rtx return_label;
202 /* List (chain of EXPR_LISTs) of all stack slots in this function.
203 Made for the sake of unshare_all_rtl. */
204 extern rtx stack_slot_list;
206 /* Given a function decl for a containing function,
207 return the `struct function' for it. */
208 struct function *find_function_data PROTO((tree));
210 /* Pointer to chain of `struct function' for containing functions. */
211 extern struct function *outer_function_chain;
213 /* Put all this function's BLOCK nodes into a vector and return it.
214 Also store in each NOTE for the beginning or end of a block
215 the index of that block in the vector. */
216 extern tree *identify_blocks PROTO((tree, rtx));
218 /* These variables hold pointers to functions to
219 save and restore machine-specific data,
220 in push_function_context and pop_function_context. */
221 extern void (*save_machine_status) ();
222 extern void (*restore_machine_status) ();
224 /* Save and restore varasm.c status for a nested function. */
225 extern void save_varasm_status PROTO((struct function *));
226 extern void restore_varasm_status PROTO((struct function *));
228 #ifdef rtx
229 #undef rtx
230 #endif
232 #ifdef tree
233 #undef tree
234 #endif