(decl_attributes): Added argument.
[official-gcc.git] / gcc / function.h
blob03186ade9a6cad5d5ba298fda0c06daffbd5cbb5
1 /* Structure for saving state for a nested function.
2 Copyright (C) 1989, 1992, 1993, 1994 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 #ifndef NULL_TREE
22 #define tree int *
23 #endif
24 #ifndef GET_CODE
25 #define rtx int *
26 #endif
28 struct var_refs_queue
30 rtx modified;
31 enum machine_mode promoted_mode;
32 int unsignedp;
33 struct var_refs_queue *next;
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. */
41 struct sequence_stack
43 /* First and last insns in the chain of the saved sequence. */
44 rtx first, last;
45 tree sequence_rtl_expr;
46 struct sequence_stack *next;
49 extern struct sequence_stack *sequence_stack;
51 /* This structure can save all the important global and static variables
52 describing the status of the current function. */
54 struct function
56 struct function *next;
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;
69 int has_nonlocal_goto;
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 varargs;
77 int max_parm_reg;
78 rtx *parm_reg_stack_loc;
79 int outgoing_args_size;
80 rtx return_rtx;
81 rtx cleanup_label;
82 rtx return_label;
83 rtx save_expr_regs;
84 rtx stack_slot_list;
85 rtx parm_birth_insn;
86 int frame_offset;
87 rtx tail_recursion_label;
88 rtx tail_recursion_reentry;
89 rtx internal_arg_pointer;
90 rtx arg_pointer_save_area;
91 tree rtl_expr_chain;
92 rtx last_parm_insn;
93 tree context_display;
94 tree trampoline_list;
95 int function_call_count;
96 struct temp_slot *temp_slots;
97 int temp_slot_level;
98 /* This slot is initialized as 0 and is added to
99 during the nested function. */
100 struct var_refs_queue *fixup_var_refs_queue;
102 /* For stmt.c */
103 struct nesting *block_stack;
104 struct nesting *stack_block_stack;
105 struct nesting *cond_stack;
106 struct nesting *loop_stack;
107 struct nesting *case_stack;
108 struct nesting *nesting_stack;
109 int nesting_depth;
110 int block_start_count;
111 tree last_expr_type;
112 rtx last_expr_value;
113 int expr_stmts_for_value;
114 char *emit_filename;
115 int emit_lineno;
116 struct goto_fixup *goto_fixup_chain;
118 /* For expr.c. */
119 int pending_stack_adjust;
120 int inhibit_defer_pop;
121 tree cleanups_this_call;
122 rtx saveregs_value;
123 rtx apply_args_value;
124 rtx forced_labels;
126 /* For emit-rtl.c. */
127 int reg_rtx_no;
128 int first_label_num;
129 rtx first_insn;
130 rtx last_insn;
131 tree sequence_rtl_expr;
132 struct sequence_stack *sequence_stack;
133 int cur_insn_uid;
134 int last_linenum;
135 char *last_filename;
136 char *regno_pointer_flag;
137 int regno_pointer_flag_length;
138 rtx *regno_reg_rtx;
140 /* For stor-layout.c. */
141 tree permanent_type_chain;
142 tree temporary_type_chain;
143 tree permanent_type_end;
144 tree temporary_type_end;
145 tree pending_sizes;
146 int immediate_size_expand;
148 /* For tree.c. */
149 int all_types_permanent;
150 struct momentary_level *momentary_stack;
151 char *maybepermanent_firstobj;
152 char *temporary_firstobj;
153 char *momentary_firstobj;
154 char *momentary_function_firstobj;
155 struct obstack *current_obstack;
156 struct obstack *function_obstack;
157 struct obstack *function_maybepermanent_obstack;
158 struct obstack *expression_obstack;
159 struct obstack *saveable_obstack;
160 struct obstack *rtl_obstack;
162 /* For integrate.c. */
163 int uses_const_pool;
165 /* For md files. */
166 int uses_pic_offset_table;
167 /* tm.h can use this to store whatever it likes. */
168 struct machine_function *machine;
170 /* For reorg. */
171 rtx epilogue_delay_list;
173 /* For varasm. */
174 struct constant_descriptor **const_rtx_hash_table;
175 struct pool_sym **const_rtx_sym_hash_table;
176 struct pool_constant *first_pool, *last_pool;
177 int pool_offset;
180 /* The FUNCTION_DECL for an inline function currently being expanded. */
181 extern tree inline_function_decl;
183 /* Label that will go on function epilogue.
184 Jumping to this label serves as a "return" instruction
185 on machines which require execution of the epilogue on all returns. */
186 extern rtx return_label;
188 /* List (chain of EXPR_LISTs) of all stack slots in this function.
189 Made for the sake of unshare_all_rtl. */
190 extern rtx stack_slot_list;
192 /* Given a function decl for a containing function,
193 return the `struct function' for it. */
194 struct function *find_function_data PROTO((tree));
196 /* Pointer to chain of `struct function' for containing functions. */
197 extern struct function *outer_function_chain;
199 /* Put all this function's BLOCK nodes into a vector and return it.
200 Also store in each NOTE for the beginning or end of a block
201 the index of that block in the vector. */
202 extern tree *identify_blocks PROTO((tree, rtx));
204 /* These variables hold pointers to functions to
205 save and restore machine-specific data,
206 in push_function_context and pop_function_context. */
207 extern void (*save_machine_status) ();
208 extern void (*restore_machine_status) ();
210 /* Save and restore varasm.c status for a nested function. */
211 extern void save_varasm_status PROTO((struct function *));
212 extern void restore_varasm_status PROTO((struct function *));
214 #ifdef rtx
215 #undef rtx
216 #endif
218 #ifdef tree
219 #undef tree
220 #endif