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