]>
Commit | Line | Data |
---|---|---|
bf6beae5 | 1 | /* Structure for saving state for a nested function. |
f55eed99 | 2 | Copyright (C) 1989, 1992, 1993 Free Software Foundation, Inc. |
bf6beae5 CH |
3 | |
4 | This file is part of GNU CC. | |
5 | ||
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. | |
10 | ||
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. | |
15 | ||
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, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
19 | ||
20 | ||
21 | #ifndef NULL_TREE | |
22 | #define tree int * | |
23 | #endif | |
24 | #ifndef GET_CODE | |
25 | #define rtx int * | |
26 | #endif | |
27 | ||
28 | struct var_refs_queue | |
29 | { | |
30 | rtx modified; | |
c56d91f8 RK |
31 | enum machine_mode promoted_mode; |
32 | int unsignedp; | |
bf6beae5 CH |
33 | struct var_refs_queue *next; |
34 | }; | |
35 | ||
36 | /* Stack of pending (incomplete) sequences saved by `start_sequence'. | |
37 | Each element describes one pending sequence. | |
38 | The main insn-chain is saved in the last element of the chain, | |
39 | unless the chain is empty. */ | |
40 | ||
41 | struct sequence_stack | |
42 | { | |
43 | /* First and last insns in the chain of the saved sequence. */ | |
44 | rtx first, last; | |
f55eed99 | 45 | tree sequence_rtl_expr; |
bf6beae5 CH |
46 | struct sequence_stack *next; |
47 | }; | |
48 | ||
49 | extern struct sequence_stack *sequence_stack; | |
50 | \f | |
51 | /* This structure can save all the important global and static variables | |
52 | describing the status of the current function. */ | |
53 | ||
54 | struct function | |
55 | { | |
56 | struct function *next; | |
57 | ||
58 | /* For function.c. */ | |
59 | char *name; | |
60 | tree decl; | |
61 | int pops_args; | |
62 | int returns_struct; | |
63 | int returns_pcc_struct; | |
64 | int needs_context; | |
65 | int calls_setjmp; | |
66 | int calls_longjmp; | |
67 | int calls_alloca; | |
68 | int has_nonlocal_label; | |
67664664 | 69 | int has_nonlocal_goto; |
bf6beae5 CH |
70 | rtx nonlocal_goto_handler_slot; |
71 | rtx nonlocal_goto_stack_level; | |
72 | tree nonlocal_labels; | |
73 | int args_size; | |
74 | int pretend_args_size; | |
75 | rtx arg_offset_rtx; | |
76 | int max_parm_reg; | |
77 | rtx *parm_reg_stack_loc; | |
78 | int outgoing_args_size; | |
79 | rtx return_rtx; | |
80 | rtx cleanup_label; | |
81 | rtx return_label; | |
82 | rtx save_expr_regs; | |
83 | rtx stack_slot_list; | |
84 | rtx parm_birth_insn; | |
85 | int frame_offset; | |
86 | rtx tail_recursion_label; | |
87 | rtx tail_recursion_reentry; | |
88 | rtx internal_arg_pointer; | |
89 | rtx arg_pointer_save_area; | |
90 | tree rtl_expr_chain; | |
91 | rtx last_parm_insn; | |
92 | tree context_display; | |
93 | tree trampoline_list; | |
94 | int function_call_count; | |
95 | struct temp_slot *temp_slots; | |
96 | int temp_slot_level; | |
97 | /* This slot is initialized as 0 and is added to | |
98 | during the nested function. */ | |
99 | struct var_refs_queue *fixup_var_refs_queue; | |
100 | ||
101 | /* For stmt.c */ | |
102 | struct nesting *block_stack; | |
103 | struct nesting *stack_block_stack; | |
104 | struct nesting *cond_stack; | |
105 | struct nesting *loop_stack; | |
106 | struct nesting *case_stack; | |
107 | struct nesting *nesting_stack; | |
108 | int nesting_depth; | |
109 | int block_start_count; | |
110 | tree last_expr_type; | |
111 | rtx last_expr_value; | |
112 | int expr_stmts_for_value; | |
113 | char *emit_filename; | |
114 | int emit_lineno; | |
115 | struct goto_fixup *goto_fixup_chain; | |
116 | ||
117 | /* For expr.c. */ | |
118 | int pending_stack_adjust; | |
119 | int inhibit_defer_pop; | |
120 | tree cleanups_this_call; | |
121 | rtx saveregs_value; | |
d12b5382 | 122 | rtx apply_args_value; |
bf6beae5 CH |
123 | rtx forced_labels; |
124 | ||
125 | /* For emit-rtl.c. */ | |
126 | int reg_rtx_no; | |
127 | int first_label_num; | |
128 | rtx first_insn; | |
129 | rtx last_insn; | |
f55eed99 | 130 | tree sequence_rtl_expr; |
bf6beae5 CH |
131 | struct sequence_stack *sequence_stack; |
132 | int cur_insn_uid; | |
133 | int last_linenum; | |
134 | char *last_filename; | |
135 | char *regno_pointer_flag; | |
136 | int regno_pointer_flag_length; | |
137 | rtx *regno_reg_rtx; | |
138 | ||
139 | /* For stor-layout.c. */ | |
140 | tree permanent_type_chain; | |
141 | tree temporary_type_chain; | |
142 | tree permanent_type_end; | |
143 | tree temporary_type_end; | |
144 | tree pending_sizes; | |
145 | int immediate_size_expand; | |
146 | ||
147 | /* For tree.c. */ | |
148 | int all_types_permanent; | |
149 | struct momentary_level *momentary_stack; | |
150 | char *maybepermanent_firstobj; | |
151 | char *temporary_firstobj; | |
152 | char *momentary_firstobj; | |
b8100453 | 153 | char *momentary_function_firstobj; |
bf6beae5 CH |
154 | struct obstack *current_obstack; |
155 | struct obstack *function_obstack; | |
156 | struct obstack *function_maybepermanent_obstack; | |
157 | struct obstack *expression_obstack; | |
158 | struct obstack *saveable_obstack; | |
159 | struct obstack *rtl_obstack; | |
160 | ||
161 | /* For integrate.c. */ | |
162 | int uses_const_pool; | |
163 | ||
164 | /* For md files. */ | |
165 | int uses_pic_offset_table; | |
d6e1b011 RS |
166 | /* tm.h can use this to store whatever it likes. */ |
167 | struct machine_function *machine; | |
bd231550 JW |
168 | |
169 | /* For reorg. */ | |
170 | rtx epilogue_delay_list; | |
b76227ea RS |
171 | |
172 | /* For varasm. */ | |
173 | struct constant_descriptor **const_rtx_hash_table; | |
174 | struct pool_sym **const_rtx_sym_hash_table; | |
175 | struct pool_constant *first_pool, *last_pool; | |
176 | int pool_offset; | |
bf6beae5 CH |
177 | }; |
178 | ||
179 | /* The FUNCTION_DECL for an inline function currently being expanded. */ | |
180 | extern tree inline_function_decl; | |
181 | ||
182 | /* Label that will go on function epilogue. | |
183 | Jumping to this label serves as a "return" instruction | |
184 | on machines which require execution of the epilogue on all returns. */ | |
185 | extern rtx return_label; | |
186 | ||
187 | /* List (chain of EXPR_LISTs) of all stack slots in this function. | |
188 | Made for the sake of unshare_all_rtl. */ | |
189 | extern rtx stack_slot_list; | |
190 | ||
ba534a45 JW |
191 | /* Given a function decl for a containing function, |
192 | return the `struct function' for it. */ | |
521f2d6f | 193 | struct function *find_function_data PROTO((tree)); |
ba534a45 JW |
194 | |
195 | /* Pointer to chain of `struct function' for containing functions. */ | |
196 | extern struct function *outer_function_chain; | |
197 | ||
198 | /* Put all this function's BLOCK nodes into a vector and return it. | |
199 | Also store in each NOTE for the beginning or end of a block | |
200 | the index of that block in the vector. */ | |
d6e1b011 RS |
201 | extern tree *identify_blocks PROTO((tree, rtx)); |
202 | ||
203 | /* These variables hold pointers to functions to | |
204 | save and restore machine-specific data, | |
205 | in push_function_context and pop_function_context. */ | |
206 | extern void (*save_machine_status) (); | |
207 | extern void (*restore_machine_status) (); | |
ba534a45 | 208 | |
bf6beae5 CH |
209 | #ifdef rtx |
210 | #undef rtx | |
211 | #endif | |
212 | ||
213 | #ifdef tree | |
214 | #undef tree | |
215 | #endif |