OSDN Git Service

(PREDICATE_CODES): Add reversible_cc_register.
[pf3gnuchains/gcc-fork.git] / gcc / output.h
1 /* Declarations for insn-output.c.  These functions are defined in recog.c,
2    final.c, and varasm.c.
3    Copyright (C) 1987, 1991, 1994 Free Software Foundation, Inc.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
20
21 /* Initialize data in final at the beginning of a compilation.  */
22 extern void init_final          PROTO((char *));
23
24 /* Called at end of source file,
25    to output the block-profiling table for this entire compilation.  */
26 extern void end_final           PROTO((char *));
27
28 /* Enable APP processing of subsequent output.
29    Used before the output from an `asm' statement.  */
30 extern void app_enable          PROTO((void));
31
32 /* Disable APP processing of subsequent output.
33    Called from varasm.c before most kinds of output.  */
34 extern void app_disable         PROTO((void));
35
36 /* Return the number of slots filled in the current 
37    delayed branch sequence (we don't count the insn needing the
38    delay slot).   Zero if not in a delayed branch sequence.  */
39 extern int dbr_sequence_length  PROTO((void));
40
41 /* Indicate that branch shortening hasn't yet been done.  */
42 extern void init_insn_lengths   PROTO((void));
43
44 /* Obtain the current length of an insn.  If branch shortening has been done,
45    get its actual length.  Otherwise, get its maximum length.  */
46 extern int get_attr_length      PROTO((rtx));
47
48 /* Make a pass over all insns and compute their actual lengths by shortening
49    any branches of variable length if possible.  */
50 extern void shorten_branches    PROTO((rtx));
51
52 /* Output assembler code for the start of a function,
53    and initialize some of the variables in this file
54    for the new function.  The label for the function and associated
55    assembler pseudo-ops have already been output in
56    `assemble_start_function'.  */
57 extern void final_start_function  STDIO_PROTO((rtx, FILE *, int));
58
59 /* Output assembler code for the end of a function.
60    For clarity, args are same as those of `final_start_function'
61    even though not all of them are needed.  */
62 extern void final_end_function  STDIO_PROTO((rtx, FILE *, int));
63
64 /* Output assembler code for some insns: all or part of a function.  */
65 extern void final               STDIO_PROTO((rtx, FILE *, int, int));
66
67 /* The final scan for one insn, INSN.  Args are same as in `final', except
68    that INSN is the insn being scanned.  Value returned is the next insn to
69    be scanned.  */
70 extern rtx final_scan_insn      STDIO_PROTO((rtx, FILE *, int, int, int));
71
72 /* Replace a SUBREG with a REG or a MEM, based on the thing it is a
73    subreg of.  */
74 extern rtx alter_subreg PROTO((rtx));
75
76 /* Report inconsistency between the assembler template and the operands.
77    In an `asm', it's the user's fault; otherwise, the compiler's fault.  */
78 extern void output_operand_lossage  PROTO((char *));
79
80 /* Output a string of assembler code, substituting insn operands.
81    Defined in final.c.  */
82 extern void output_asm_insn     PROTO((char *, rtx *));
83
84 /* Output a LABEL_REF, or a bare CODE_LABEL, as an assembler symbol.  */
85 extern void output_asm_label    PROTO((rtx));
86
87 /* Print a memory reference operand for address X
88    using machine-dependent assembler syntax.  */
89 extern void output_address      PROTO((rtx));
90
91 /* Print an integer constant expression in assembler syntax.
92    Addition and subtraction are the only arithmetic
93    that may appear in these expressions.  */
94 extern void output_addr_const STDIO_PROTO((FILE *, rtx));
95
96 /* Output a string of assembler code, substituting numbers, strings
97    and fixed syntactic prefixes.  */
98 extern void asm_fprintf         STDIO_PROTO(PVPROTO((FILE *file,
99                                                      char *p, ...)));
100
101 /* Split up a CONST_DOUBLE or integer constant rtx into two rtx's for single
102    words.  */
103 extern void split_double        PROTO((rtx, rtx *, rtx *));
104
105 /* Return nonzero if this function has no function calls.  */
106 extern int leaf_function_p      PROTO((void));
107
108 /* Return 1 if this function uses only the registers that can be
109    safely renumbered.  */
110 extern int only_leaf_regs_used  PROTO((void));
111
112 /* Scan IN_RTX and its subexpressions, and renumber all regs into those
113    available in leaf functions.  */
114 extern void leaf_renumber_regs_insn PROTO((rtx));
115
116 /* Output a name (as found inside a symbol_ref) in assembler syntax.  */
117 extern void assemble_name STDIO_PROTO((FILE *, char *));
118
119 /* When outputting assembler code, indicates which alternative
120    of the constraints was actually satisfied.  */
121 extern int which_alternative;
122
123 /* When outputting delayed branch sequences, this rtx holds the
124    sequence being output.  It is null when no delayed branch
125    sequence is being output, so it can be used as a test in the
126    insn output code.
127
128    This variable is defined  in final.c.  */
129 extern rtx final_sequence;
130
131 /* Number of bytes of args popped by function being compiled on its return.
132    Zero if no bytes are to be popped.
133    May affect compilation of return insn or of function epilogue.  */
134
135 extern int current_function_pops_args;
136
137 /* Nonzero if function being compiled needs to be given an address
138    where the value should be stored.  */
139
140 extern int current_function_returns_struct;
141
142 /* Nonzero if function being compiled needs to
143    return the address of where it has put a structure value.  */
144
145 extern int current_function_returns_pcc_struct;
146
147 /* Nonzero if function being compiled needs to be passed a static chain.  */
148
149 extern int current_function_needs_context;
150
151 /* Nonzero if function being compiled can call setjmp.  */
152
153 extern int current_function_calls_setjmp;
154
155 /* Nonzero if function being compiled can call longjmp.  */
156
157 extern int current_function_calls_longjmp;
158
159 /* Nonzero if function being compiled can call alloca,
160    either as a subroutine or builtin.  */
161
162 extern int current_function_calls_alloca;
163
164 /* Nonzero if function being compiled receives nonlocal gotos
165    from nested functions.  */
166
167 extern int current_function_has_nonlocal_label;
168
169 /* Nonzero if function being compiled contains nested functions.  */
170
171 extern int current_function_contains_functions;
172
173 /* Nonzero if the current function returns a pointer type */
174
175 extern int current_function_returns_pointer;
176
177 /* If function's args have a fixed size, this is that size, in bytes.
178    Otherwise, it is -1.
179    May affect compilation of return insn or of function epilogue.  */
180
181 extern int current_function_args_size;
182
183 /* # bytes the prologue should push and pretend that the caller pushed them.
184    The prologue must do this, but only if parms can be passed in registers.  */
185
186 extern int current_function_pretend_args_size;
187
188 /* # of bytes of outgoing arguments required to be pushed by the prologue.
189    If this is non-zero, it means that ACCUMULATE_OUTGOING_ARGS was defined
190    and no stack adjusts will be done on function calls.  */
191
192 extern int current_function_outgoing_args_size;
193
194 /* Nonzero if current function uses varargs.h or equivalent.
195    Zero for functions that use stdarg.h.  */
196
197 extern int current_function_varargs;
198
199 /* Quantities of various kinds of registers
200    used for the current function's args.  */
201
202 extern CUMULATIVE_ARGS current_function_args_info;
203
204 /* Name of function now being compiled.  */
205
206 extern char *current_function_name;
207
208 /* If non-zero, an RTL expression for that location at which the current
209    function returns its result.  Usually equal to
210    DECL_RTL (DECL_RESULT (current_function_decl)).  */
211
212 extern rtx current_function_return_rtx;
213
214 /* If some insns can be deferred to the delay slots of the epilogue, the
215    delay list for them is recorded here.  */
216
217 extern rtx current_function_epilogue_delay_list;
218
219 /* Nonzero means generate position-independent code.
220    This is not fully implemented yet.  */
221
222 extern int flag_pic;
223
224 /* This is nonzero if the current function uses pic_offset_table_rtx.  */
225 extern int current_function_uses_pic_offset_table;
226
227 /* This is nonzero if the current function uses the constant pool.  */
228 extern int current_function_uses_const_pool;
229
230 /* The line number of the beginning of the current function.
231    sdbout.c needs this so that it can output relative linenumbers.  */
232
233 #ifdef SDB_DEBUGGING_INFO /* Avoid undef sym in certain broken linkers.  */
234 extern int sdb_begin_function_line;
235 #endif
236
237 /* File in which assembler code is being written.  */
238
239 #ifdef BUFSIZ
240 extern FILE *asm_out_file;
241 #endif