(CONST_OK_FOR_LETTER_P): Only allow constants valid when inverted for 'K'.
[official-gcc.git] / gcc / output.h
blobebd0a2f13fc85db9029cc328ff27a43a66e3ab7a
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.
5 This file is part of GNU CC.
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.
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.
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. */
21 /* Initialize data in final at the beginning of a compilation. */
22 extern void init_final PROTO((char *));
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 *));
28 /* Enable APP processing of subsequent output.
29 Used before the output from an `asm' statement. */
30 extern void app_enable PROTO((void));
32 /* Disable APP processing of subsequent output.
33 Called from varasm.c before most kinds of output. */
34 extern void app_disable PROTO((void));
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));
41 /* Indicate that branch shortening hasn't yet been done. */
42 extern void init_insn_lengths PROTO((void));
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));
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));
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));
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));
64 /* Output assembler code for some insns: all or part of a function. */
65 extern void final STDIO_PROTO((rtx, FILE *, int, int));
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));
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));
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 *));
80 /* Output a string of assembler code, substituting insn operands.
81 Defined in final.c. */
82 extern void output_asm_insn PROTO((char *, rtx *));
84 /* Output a LABEL_REF, or a bare CODE_LABEL, as an assembler symbol. */
85 extern void output_asm_label PROTO((rtx));
87 /* Print a memory reference operand for address X
88 using machine-dependent assembler syntax. */
89 extern void output_address PROTO((rtx));
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));
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, ...)));
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 *));
105 /* Return nonzero if this function has no function calls. */
106 extern int leaf_function_p PROTO((void));
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));
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));
116 /* Output a name (as found inside a symbol_ref) in assembler syntax. */
117 extern void assemble_name STDIO_PROTO((FILE *, char *));
119 /* When outputting assembler code, indicates which alternative
120 of the constraints was actually satisfied. */
121 extern int which_alternative;
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.
128 This variable is defined in final.c. */
129 extern rtx final_sequence;
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. */
135 extern int current_function_pops_args;
137 /* Nonzero if function being compiled needs to be given an address
138 where the value should be stored. */
140 extern int current_function_returns_struct;
142 /* Nonzero if function being compiled needs to
143 return the address of where it has put a structure value. */
145 extern int current_function_returns_pcc_struct;
147 /* Nonzero if function being compiled needs to be passed a static chain. */
149 extern int current_function_needs_context;
151 /* Nonzero if function being compiled can call setjmp. */
153 extern int current_function_calls_setjmp;
155 /* Nonzero if function being compiled can call longjmp. */
157 extern int current_function_calls_longjmp;
159 /* Nonzero if function being compiled can call alloca,
160 either as a subroutine or builtin. */
162 extern int current_function_calls_alloca;
164 /* Nonzero if function being compiled receives nonlocal gotos
165 from nested functions. */
167 extern int current_function_has_nonlocal_label;
169 /* Nonzero if function being compiled contains nested functions. */
171 extern int current_function_contains_functions;
173 /* Nonzero if the current function returns a pointer type */
175 extern int current_function_returns_pointer;
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. */
181 extern int current_function_args_size;
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. */
186 extern int current_function_pretend_args_size;
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. */
192 extern int current_function_outgoing_args_size;
194 /* Nonzero if current function uses varargs.h or equivalent.
195 Zero for functions that use stdarg.h. */
197 extern int current_function_varargs;
199 /* Quantities of various kinds of registers
200 used for the current function's args. */
202 extern CUMULATIVE_ARGS current_function_args_info;
204 /* Name of function now being compiled. */
206 extern char *current_function_name;
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)). */
212 extern rtx current_function_return_rtx;
214 /* If some insns can be deferred to the delay slots of the epilogue, the
215 delay list for them is recorded here. */
217 extern rtx current_function_epilogue_delay_list;
219 /* Nonzero means generate position-independent code.
220 This is not fully implemented yet. */
222 extern int flag_pic;
224 /* This is nonzero if the current function uses pic_offset_table_rtx. */
225 extern int current_function_uses_pic_offset_table;
227 /* This is nonzero if the current function uses the constant pool. */
228 extern int current_function_uses_const_pool;
230 /* The line number of the beginning of the current function.
231 sdbout.c needs this so that it can output relative linenumbers. */
233 #ifdef SDB_DEBUGGING_INFO /* Avoid undef sym in certain broken linkers. */
234 extern int sdb_begin_function_line;
235 #endif
237 /* File in which assembler code is being written. */
239 #ifdef BUFSIZ
240 extern FILE *asm_out_file;
241 #endif