source: trunk/third/gcc/function.h @ 11288

Revision 11288, 7.6 KB checked in by ghudson, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r11287, which included commits to RCS files with non-trunk default branches.
Line 
1/* Structure for saving state for a nested function.
2   Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc.
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
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA.  */
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
30{
31  rtx modified;
32  enum machine_mode promoted_mode;
33  int unsignedp;
34  struct var_refs_queue *next;
35};
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;
46  tree sequence_rtl_expr;
47  struct sequence_stack *next;
48};
49
50extern struct sequence_stack *sequence_stack;
51
52/* Stack of single obstacks.  */
53
54struct simple_obstack_stack
55{
56  struct obstack *obstack;
57  struct simple_obstack_stack *next;
58};
59
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 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  int is_thunk;
82  rtx nonlocal_goto_handler_slot;
83  rtx nonlocal_goto_stack_level;
84  tree nonlocal_labels;
85  int args_size;
86  int pretend_args_size;
87  rtx arg_offset_rtx;
88  int varargs;
89  int stdarg;
90  int max_parm_reg;
91  rtx *parm_reg_stack_loc;
92  int outgoing_args_size;
93  rtx return_rtx;
94  rtx cleanup_label;
95  rtx return_label;
96  rtx save_expr_regs;
97  rtx stack_slot_list;
98  rtx parm_birth_insn;
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;
104  tree rtl_expr_chain;
105  rtx last_parm_insn;
106  tree context_display;
107  tree trampoline_list;
108  int function_call_count;
109  struct temp_slot *temp_slots;
110  int temp_slot_level;
111  int target_temp_slot_level;
112  int var_temp_slot_level;
113  /* This slot is initialized as 0 and is added to
114     during the nested function.  */
115  struct var_refs_queue *fixup_var_refs_queue;
116  CUMULATIVE_ARGS args_info;
117
118  /* For stmt.c  */
119  struct nesting *block_stack;
120  struct nesting *stack_block_stack;
121  struct nesting *cond_stack;
122  struct nesting *loop_stack;
123  struct nesting *case_stack;
124  struct nesting *nesting_stack;
125  int nesting_depth;
126  int block_start_count;
127  tree last_expr_type;
128  rtx last_expr_value;
129  int expr_stmts_for_value;
130  char *emit_filename;
131  int emit_lineno;
132  struct goto_fixup *goto_fixup_chain;
133
134  /* For exception handling information.  */
135  struct eh_stack ehstack;
136  struct eh_queue ehqueue;
137  rtx catch_clauses;
138  struct label_node *false_label_stack;
139  struct label_node *caught_return_label_stack;
140  tree protect_list;
141  rtx dhc;
142  rtx dcc;
143
144  /* For expr.c.  */
145  int pending_stack_adjust;
146  int inhibit_defer_pop;
147  rtx saveregs_value;
148  rtx apply_args_value;
149  rtx forced_labels;
150
151  /* For emit-rtl.c.  */
152  int reg_rtx_no;
153  int first_label_num;
154  rtx first_insn;
155  rtx last_insn;
156  tree sequence_rtl_expr;
157  struct sequence_stack *sequence_stack;
158  int cur_insn_uid;
159  int last_linenum;
160  char *last_filename;
161  char *regno_pointer_flag;
162  char *regno_pointer_align;
163  int regno_pointer_flag_length;
164  rtx *regno_reg_rtx;
165
166  /* For stor-layout.c.  */
167  tree permanent_type_chain;
168  tree temporary_type_chain;
169  tree permanent_type_end;
170  tree temporary_type_end;
171  tree pending_sizes;
172  int immediate_size_expand;
173
174  /* For tree.c.  */
175  int all_types_permanent;
176  struct momentary_level *momentary_stack;
177  char *maybepermanent_firstobj;
178  char *temporary_firstobj;
179  char *momentary_firstobj;
180  char *momentary_function_firstobj;
181  struct obstack *current_obstack;
182  struct obstack *function_obstack;
183  struct obstack *function_maybepermanent_obstack;
184  struct obstack *expression_obstack;
185  struct obstack *saveable_obstack;
186  struct obstack *rtl_obstack;
187  struct simple_obstack_stack *inline_obstacks;
188
189  /* For integrate.c.  */
190  int uses_const_pool;
191
192  /* For md files.  */
193  int uses_pic_offset_table;
194  /* tm.h can use this to store whatever it likes.  */
195  struct machine_function *machine;
196
197  /* For reorg.  */
198  rtx epilogue_delay_list;
199
200  /* For varasm.  */
201  struct constant_descriptor **const_rtx_hash_table;
202  struct pool_sym **const_rtx_sym_hash_table;
203  struct pool_constant *first_pool, *last_pool;
204  int pool_offset;
205  rtx const_double_chain;
206};
207
208/* The FUNCTION_DECL for an inline function currently being expanded.  */
209extern tree inline_function_decl;
210
211/* Label that will go on function epilogue.
212   Jumping to this label serves as a "return" instruction
213   on machines which require execution of the epilogue on all returns.  */
214extern rtx return_label;
215
216/* List (chain of EXPR_LISTs) of all stack slots in this function.
217   Made for the sake of unshare_all_rtl.  */
218extern rtx stack_slot_list;
219
220/* Given a function decl for a containing function,
221   return the `struct function' for it.  */
222struct function *find_function_data PROTO((tree));
223
224/* Pointer to chain of `struct function' for containing functions.  */
225extern struct function *outer_function_chain;
226
227/* Put all this function's BLOCK nodes into a vector and return it.
228   Also store in each NOTE for the beginning or end of a block
229   the index of that block in the vector.  */
230extern tree *identify_blocks PROTO((tree, rtx));
231
232/* Return size needed for stack frame based on slots so far allocated.
233   This size counts from zero.  It is not rounded to STACK_BOUNDARY;
234   the caller may have to do that.  */
235extern HOST_WIDE_INT get_frame_size PROTO((void));
236
237/* These variables hold pointers to functions to
238   save and restore machine-specific data,
239   in push_function_context and pop_function_context.  */
240extern void (*save_machine_status) PROTO((struct function *));
241extern void (*restore_machine_status) PROTO((struct function *));
242
243/* Save and restore status information for a nested function.  */
244extern void save_tree_status            PROTO((struct function *, tree));
245extern void restore_tree_status         PROTO((struct function *, tree));
246extern void save_varasm_status          PROTO((struct function *, tree));
247extern void restore_varasm_status       PROTO((struct function *));
248extern void save_eh_status              PROTO((struct function *));
249extern void restore_eh_status           PROTO((struct function *));
250extern void save_stmt_status            PROTO((struct function *));
251extern void restore_stmt_status         PROTO((struct function *));
252extern void save_expr_status            PROTO((struct function *));
253extern void restore_expr_status         PROTO((struct function *));
254extern void save_emit_status            PROTO((struct function *));
255extern void restore_emit_status         PROTO((struct function *));
256extern void save_storage_status         PROTO((struct function *));
257extern void restore_storage_status      PROTO((struct function *));
258
259#ifdef rtx
260#undef rtx
261#endif
262
263#ifdef tree
264#undef tree
265#endif
Note: See TracBrowser for help on using the repository browser.