1 /* Structure for saving state for a nested function.
2 Copyright (C) 1989, 92, 93, 94, 95, 96, 1997 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)
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. */
32 enum machine_mode promoted_mode
;
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. */
44 /* First and last insns in the chain of the saved sequence. */
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. */
65 struct function
*next
;
72 int returns_pcc_struct
;
78 int has_nonlocal_label
;
79 int has_nonlocal_goto
;
80 int contains_functions
;
82 rtx nonlocal_goto_handler_slot
;
83 rtx nonlocal_goto_stack_level
;
86 int pretend_args_size
;
91 rtx
*parm_reg_stack_loc
;
92 int outgoing_args_size
;
99 HOST_WIDE_INT frame_offset
;
100 rtx tail_recursion_label
;
101 rtx tail_recursion_reentry
;
102 rtx internal_arg_pointer
;
103 rtx arg_pointer_save_area
;
106 tree context_display
;
107 tree trampoline_list
;
108 int function_call_count
;
109 struct temp_slot
*temp_slots
;
111 /* This slot is initialized as 0 and is added to
112 during the nested function. */
113 struct var_refs_queue
*fixup_var_refs_queue
;
114 CUMULATIVE_ARGS args_info
;
117 struct nesting
*block_stack
;
118 struct nesting
*stack_block_stack
;
119 struct nesting
*cond_stack
;
120 struct nesting
*loop_stack
;
121 struct nesting
*case_stack
;
122 struct nesting
*nesting_stack
;
124 int block_start_count
;
127 int expr_stmts_for_value
;
130 struct goto_fixup
*goto_fixup_chain
;
132 /* For exception handling information. */
133 struct eh_stack ehstack
;
134 struct eh_queue ehqueue
;
136 struct label_node
*false_label_stack
;
137 struct label_node
*caught_return_label_stack
;
142 int pending_stack_adjust
;
143 int inhibit_defer_pop
;
145 rtx apply_args_value
;
148 /* For emit-rtl.c. */
153 tree sequence_rtl_expr
;
154 struct sequence_stack
*sequence_stack
;
158 char *regno_pointer_flag
;
159 char *regno_pointer_align
;
160 int regno_pointer_flag_length
;
163 /* For stor-layout.c. */
164 tree permanent_type_chain
;
165 tree temporary_type_chain
;
166 tree permanent_type_end
;
167 tree temporary_type_end
;
169 int immediate_size_expand
;
172 int all_types_permanent
;
173 struct momentary_level
*momentary_stack
;
174 char *maybepermanent_firstobj
;
175 char *temporary_firstobj
;
176 char *momentary_firstobj
;
177 char *momentary_function_firstobj
;
178 struct obstack
*current_obstack
;
179 struct obstack
*function_obstack
;
180 struct obstack
*function_maybepermanent_obstack
;
181 struct obstack
*expression_obstack
;
182 struct obstack
*saveable_obstack
;
183 struct obstack
*rtl_obstack
;
184 struct simple_obstack_stack
*inline_obstacks
;
186 /* For integrate.c. */
190 int uses_pic_offset_table
;
191 /* tm.h can use this to store whatever it likes. */
192 struct machine_function
*machine
;
195 rtx epilogue_delay_list
;
198 struct constant_descriptor
**const_rtx_hash_table
;
199 struct pool_sym
**const_rtx_sym_hash_table
;
200 struct pool_constant
*first_pool
, *last_pool
;
202 rtx const_double_chain
;
205 /* The FUNCTION_DECL for an inline function currently being expanded. */
206 extern tree inline_function_decl
;
208 /* Label that will go on function epilogue.
209 Jumping to this label serves as a "return" instruction
210 on machines which require execution of the epilogue on all returns. */
211 extern rtx return_label
;
213 /* List (chain of EXPR_LISTs) of all stack slots in this function.
214 Made for the sake of unshare_all_rtl. */
215 extern rtx stack_slot_list
;
217 /* Given a function decl for a containing function,
218 return the `struct function' for it. */
219 struct function
*find_function_data
PROTO((tree
));
221 /* Pointer to chain of `struct function' for containing functions. */
222 extern struct function
*outer_function_chain
;
224 /* Put all this function's BLOCK nodes into a vector and return it.
225 Also store in each NOTE for the beginning or end of a block
226 the index of that block in the vector. */
227 extern tree
*identify_blocks
PROTO((tree
, rtx
));
229 /* Return size needed for stack frame based on slots so far allocated.
230 This size counts from zero. It is not rounded to STACK_BOUNDARY;
231 the caller may have to do that. */
232 extern HOST_WIDE_INT get_frame_size
PROTO((void));
234 /* These variables hold pointers to functions to
235 save and restore machine-specific data,
236 in push_function_context and pop_function_context. */
237 extern void (*save_machine_status
) PROTO((struct function
*));
238 extern void (*restore_machine_status
) PROTO((struct function
*));
240 /* Save and restore status information for a nested function. */
241 extern void save_tree_status
PROTO((struct function
*, tree
));
242 extern void restore_tree_status
PROTO((struct function
*, tree
));
243 extern void save_varasm_status
PROTO((struct function
*, tree
));
244 extern void restore_varasm_status
PROTO((struct function
*));
245 extern void save_eh_status
PROTO((struct function
*));
246 extern void restore_eh_status
PROTO((struct function
*));
247 extern void save_stmt_status
PROTO((struct function
*));
248 extern void restore_stmt_status
PROTO((struct function
*));
249 extern void save_expr_status
PROTO((struct function
*));
250 extern void restore_expr_status
PROTO((struct function
*));
251 extern void save_emit_status
PROTO((struct function
*));
252 extern void restore_emit_status
PROTO((struct function
*));
253 extern void save_storage_status
PROTO((struct function
*));
254 extern void restore_storage_status
PROTO((struct function
*));