]> gcc.gnu.org Git - gcc.git/blame - gcc/output.h
Makefile.in (TCL_LIBRARY): Use 'cd' to find the library directory logically rather...
[gcc.git] / gcc / output.h
CommitLineData
0c2768fc
RS
1/* Declarations for insn-output.c. These functions are defined in recog.c,
2 final.c, and varasm.c.
1b0c6de6 3 Copyright (C) 1987, 1991, 1994, 1997, 1998 Free Software Foundation, Inc.
0c2768fc
RS
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12GNU CC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU CC; see the file COPYING. If not, write to
e99215a3
RK
19the Free Software Foundation, 59 Temple Place - Suite 330,
20Boston, MA 02111-1307, USA. */
0c2768fc 21
9b1d8cd6
RK
22/* Initialize data in final at the beginning of a compilation. */
23extern void init_final PROTO((char *));
24
25/* Called at end of source file,
26 to output the block-profiling table for this entire compilation. */
27extern void end_final PROTO((char *));
28
29/* Enable APP processing of subsequent output.
30 Used before the output from an `asm' statement. */
31extern void app_enable PROTO((void));
32
33/* Disable APP processing of subsequent output.
34 Called from varasm.c before most kinds of output. */
35extern void app_disable PROTO((void));
36
37/* Return the number of slots filled in the current
38 delayed branch sequence (we don't count the insn needing the
39 delay slot). Zero if not in a delayed branch sequence. */
40extern int dbr_sequence_length PROTO((void));
41
42/* Indicate that branch shortening hasn't yet been done. */
43extern void init_insn_lengths PROTO((void));
44
ed068cf5 45#ifdef RTX_CODE
9b1d8cd6
RK
46/* Obtain the current length of an insn. If branch shortening has been done,
47 get its actual length. Otherwise, get its maximum length. */
48extern int get_attr_length PROTO((rtx));
49
50/* Make a pass over all insns and compute their actual lengths by shortening
51 any branches of variable length if possible. */
52extern void shorten_branches PROTO((rtx));
53
54/* Output assembler code for the start of a function,
55 and initialize some of the variables in this file
56 for the new function. The label for the function and associated
57 assembler pseudo-ops have already been output in
58 `assemble_start_function'. */
b93a436e 59extern void final_start_function PROTO((rtx, FILE *, int));
9b1d8cd6
RK
60
61/* Output assembler code for the end of a function.
62 For clarity, args are same as those of `final_start_function'
63 even though not all of them are needed. */
b93a436e 64extern void final_end_function PROTO((rtx, FILE *, int));
9b1d8cd6
RK
65
66/* Output assembler code for some insns: all or part of a function. */
b93a436e 67extern void final PROTO((rtx, FILE *, int, int));
9b1d8cd6
RK
68
69/* The final scan for one insn, INSN. Args are same as in `final', except
70 that INSN is the insn being scanned. Value returned is the next insn to
71 be scanned. */
b93a436e 72extern rtx final_scan_insn PROTO((rtx, FILE *, int, int, int));
9b1d8cd6
RK
73
74/* Replace a SUBREG with a REG or a MEM, based on the thing it is a
75 subreg of. */
76extern rtx alter_subreg PROTO((rtx));
77
78/* Report inconsistency between the assembler template and the operands.
79 In an `asm', it's the user's fault; otherwise, the compiler's fault. */
80extern void output_operand_lossage PROTO((char *));
cf1c49cb 81
0c2768fc
RS
82/* Output a string of assembler code, substituting insn operands.
83 Defined in final.c. */
9b1d8cd6 84extern void output_asm_insn PROTO((char *, rtx *));
0c2768fc 85
487a6e06
KG
86/* Compute a worst-case reference address of a branch so that it
87 can be safely used in the presence of aligned labels.
88 Defined in final.c. */
89extern int insn_current_reference_address PROTO((rtx));
90
3873d24b
RH
91/* Find the alignment associated with a CODE_LABEL.
92 Defined in final.c. */
93extern int label_to_alignment PROTO((rtx));
94
9b1d8cd6
RK
95/* Output a LABEL_REF, or a bare CODE_LABEL, as an assembler symbol. */
96extern void output_asm_label PROTO((rtx));
97
98/* Print a memory reference operand for address X
99 using machine-dependent assembler syntax. */
100extern void output_address PROTO((rtx));
1428a6b3 101
aaff8ce0
CH
102/* Print an integer constant expression in assembler syntax.
103 Addition and subtraction are the only arithmetic
104 that may appear in these expressions. */
b93a436e 105extern void output_addr_const PROTO((FILE *, rtx));
aaff8ce0 106
9b1d8cd6
RK
107/* Output a string of assembler code, substituting numbers, strings
108 and fixed syntactic prefixes. */
b93a436e 109extern void asm_fprintf PROTO(PVPROTO((FILE *file, char *p, ...)));
9b1d8cd6
RK
110
111/* Split up a CONST_DOUBLE or integer constant rtx into two rtx's for single
112 words. */
113extern void split_double PROTO((rtx, rtx *, rtx *));
114
115/* Return nonzero if this function has no function calls. */
116extern int leaf_function_p PROTO((void));
117
118/* Return 1 if this function uses only the registers that can be
119 safely renumbered. */
120extern int only_leaf_regs_used PROTO((void));
121
122/* Scan IN_RTX and its subexpressions, and renumber all regs into those
123 available in leaf functions. */
124extern void leaf_renumber_regs_insn PROTO((rtx));
a1493f9f
RK
125
126/* Functions in flow.c */
127extern void allocate_for_life_analysis PROTO((void));
128extern int regno_uninitialized PROTO((int));
129extern int regno_clobbered_at_setjmp PROTO((int));
b93a436e 130extern void dump_flow_info PROTO((FILE *));
9265dacf 131extern void find_basic_blocks PROTO((rtx, int, FILE *));
d8af60bf
JL
132extern void free_basic_block_vars PROTO((int));
133extern void set_block_num PROTO((rtx, int));
134extern void life_analysis PROTO((rtx, int, FILE *));
ed068cf5
RK
135#endif
136
137/* Functions in varasm.c. */
138
139/* Tell assembler to switch to text section. */
140extern void text_section PROTO((void));
141
142/* Tell assembler to switch to data section. */
143extern void data_section PROTO((void));
144
3167de5b
AM
145/* Tell assembler to make sure its in the data section. */
146extern void force_data_section PROTO((void));
147
ed068cf5
RK
148/* Tell assembler to switch to read-only data section. This is normally
149 the text section. */
150extern void readonly_data_section PROTO((void));
151
152/* Determine if we're in the text section. */
153extern int in_text_section PROTO((void));
154
487a6e06
KG
155#ifdef EH_FRAME_SECTION_ASM_OP
156extern void eh_frame_section PROTO ((void));
157#endif
158
ed068cf5
RK
159#ifdef TREE_CODE
160/* Tell assembler to change to section NAME for DECL.
161 If DECL is NULL, just switch to section NAME.
ad4ff310
JM
162 If NAME is NULL, get the name from DECL.
163 If RELOC is 1, the initializer for DECL contains relocs. */
164extern void named_section PROTO((tree, char *, int));
ed068cf5 165
4d1065ed
DE
166/* Tell assembler to switch to the section for function DECL. */
167extern void function_section PROTO((tree));
168
6adb4e3a
MS
169/* Tell assembler to switch to the section for the exception table. */
170extern void exception_section PROTO((void));
171
ed068cf5
RK
172/* Create the rtl to represent a function, for a function definition.
173 DECL is a FUNCTION_DECL node which describes which function.
174 The rtl is stored into DECL. */
175extern void make_function_rtl PROTO((tree));
176
d6f4ec51
KG
177/* Declare DECL to be a weak symbol. */
178extern void declare_weak PROTO ((tree));
179#endif /* TREE_CODE */
180
50b2596f
KG
181/* Emit any pending weak declarations. */
182extern void weak_finish PROTO ((void));
183
ed068cf5
RK
184/* Decode an `asm' spec for a declaration as a register name.
185 Return the register number, or -1 if nothing specified,
186 or -2 if the ASMSPEC is not `cc' or `memory' and is not recognized,
187 or -3 if ASMSPEC is `cc' and is not recognized,
188 or -4 if ASMSPEC is `memory' and is not recognized.
189 Accept an exact spelling or a decimal number.
190 Prefixes such as % are optional. */
191extern int decode_reg_name PROTO((char *));
192
d6f4ec51 193#ifdef TREE_CODE
ed068cf5
RK
194/* Create the DECL_RTL for a declaration for a static or external variable
195 or static or external function.
196 ASMSPEC, if not 0, is the string which the user specified
197 as the assembler symbol name.
198 TOP_LEVEL is nonzero if this is a file-scope variable.
199
200 This is never called for PARM_DECL nodes. */
201extern void make_decl_rtl PROTO((tree, char *, int));
202
203/* Make the rtl for variable VAR be volatile.
204 Use this only for static variables. */
205extern void make_var_volatile PROTO((tree));
206
207/* Output alignment directive to align for constant expression EXP. */
208extern void assemble_constant_align PROTO((tree));
209
d6f4ec51
KG
210extern void assemble_alias PROTO((tree, tree));
211
ed068cf5
RK
212/* Output a string of literal assembler code
213 for an `asm' keyword used between functions. */
214extern void assemble_asm PROTO((tree));
215
216/* Record an element in the table of global destructors.
217 How this is done depends on what sort of assembler and linker
218 are in use.
219
220 NAME should be the name of a global function to be called
221 at exit time. This name is output using assemble_name. */
222extern void assemble_destructor PROTO((char *));
223
224/* Likewise for global constructors. */
225extern void assemble_constructor PROTO((char *));
226
227/* Likewise for entries we want to record for garbage collection.
228 Garbage collection is still under development. */
229extern void assemble_gc_entry PROTO((char *));
230
231/* Output assembler code for the constant pool of a function and associated
232 with defining the name of the function. DECL describes the function.
233 NAME is the function's name. For the constant pool, we use the current
234 constant pool data. */
235extern void assemble_start_function PROTO((tree, char *));
236
237/* Output assembler code associated with defining the size of the
238 function. DECL describes the function. NAME is the function's name. */
239extern void assemble_end_function PROTO((tree, char *));
240
241/* Assemble code to leave SIZE bytes of zeros. */
242extern void assemble_zeros PROTO((int));
243
244/* Assemble an alignment pseudo op for an ALIGN-bit boundary. */
245extern void assemble_align PROTO((int));
246
247/* Assemble a string constant with the specified C string as contents. */
248extern void assemble_string PROTO((char *, int));
249/* Assemble everything that is needed for a variable or function declaration.
250 Not used for automatic variables, and not used for function definitions.
251 Should not be called for variables of incomplete structure type.
252
253 TOP_LEVEL is nonzero if this variable has file scope.
254 AT_END is nonzero if this is the special handling, at end of compilation,
255 to define things that have had only tentative definitions.
256 DONT_OUTPUT_DATA if nonzero means don't actually output the
257 initial value (that will be done by the caller). */
258extern void assemble_variable PROTO((tree, int, int, int));
259
ed068cf5
RK
260/* Output something to declare an external symbol to the assembler.
261 (Most assemblers don't need this, so we normally output nothing.)
262 Do nothing if DECL is not external. */
263extern void assemble_external PROTO((tree));
d6f4ec51 264#endif /* TREE_CODE */
ed068cf5
RK
265
266#ifdef RTX_CODE
267/* Similar, for calling a library function FUN. */
268extern void assemble_external_libcall PROTO((rtx));
269#endif
9b1d8cd6 270
ed068cf5
RK
271/* Declare the label NAME global. */
272extern void assemble_global PROTO((char *));
273
274/* Assemble a label named NAME. */
275extern void assemble_label PROTO((char *));
276
277/* Output to FILE a reference to the assembler name of a C-level name NAME.
278 If NAME starts with a *, the rest of NAME is output verbatim.
279 Otherwise NAME is transformed in an implementation-defined way
280 (usually by the addition of an underscore).
281 Many macros in the tm file are defined to call this function. */
b93a436e 282extern void assemble_name PROTO((FILE *, char *));
ed068cf5
RK
283
284#ifdef RTX_CODE
285/* Assemble the integer constant X into an object of SIZE bytes.
286 X must be either a CONST_INT or CONST_DOUBLE.
287
288 Return 1 if we were able to output the constant, otherwise 0. If FORCE is
289 non-zero, abort if we can't output the constant. */
290extern int assemble_integer PROTO((rtx, int, int));
291
292#ifdef EMUSHORT
293/* Assemble the floating-point constant D into an object of size MODE. */
294extern void assemble_real PROTO((REAL_VALUE_TYPE,
295 enum machine_mode));
296#endif
297#endif
298
299/* At the end of a function, forget the memory-constants
300 previously made for CONST_DOUBLEs. Mark them as not on real_constant_chain.
301 Also clear out real_constant_chain and clear out all the chain-pointers. */
302extern void clear_const_double_mem PROTO((void));
303
304/* Start deferring output of subconstants. */
305extern void defer_addressed_constants PROTO((void));
306
307/* Stop deferring output of subconstants,
308 and output now all those that have been deferred. */
309extern void output_deferred_addressed_constants PROTO((void));
310
311/* Initialize constant pool hashing for next function. */
312extern void init_const_rtx_hash_table PROTO((void));
313
314/* Return the size of the constant pool. */
315extern int get_pool_size PROTO((void));
316
317#ifdef TREE_CODE
318/* Write all the constants in the constant pool. */
319extern void output_constant_pool PROTO((char *, tree));
320
321/* Output assembler code for constant EXP to FILE, with no label.
322 This includes the pseudo-op such as ".int" or ".byte", and a newline.
323 Assumes output_addressed_constants has been done on EXP already.
324
325 Generate exactly SIZE bytes of assembler data, padding at the end
326 with zeros if necessary. SIZE must always be specified. */
327extern void output_constant PROTO((tree, int));
328#endif
aaff8ce0 329
0c2768fc
RS
330/* When outputting assembler code, indicates which alternative
331 of the constraints was actually satisfied. */
332extern int which_alternative;
333
ed068cf5 334#ifdef RTX_CODE
0c2768fc
RS
335/* When outputting delayed branch sequences, this rtx holds the
336 sequence being output. It is null when no delayed branch
337 sequence is being output, so it can be used as a test in the
338 insn output code.
339
340 This variable is defined in final.c. */
341extern rtx final_sequence;
ed068cf5 342#endif
0c2768fc
RS
343
344/* Number of bytes of args popped by function being compiled on its return.
345 Zero if no bytes are to be popped.
346 May affect compilation of return insn or of function epilogue. */
347
348extern int current_function_pops_args;
349
350/* Nonzero if function being compiled needs to be given an address
351 where the value should be stored. */
352
353extern int current_function_returns_struct;
354
355/* Nonzero if function being compiled needs to
356 return the address of where it has put a structure value. */
357
358extern int current_function_returns_pcc_struct;
359
360/* Nonzero if function being compiled needs to be passed a static chain. */
361
362extern int current_function_needs_context;
363
364/* Nonzero if function being compiled can call setjmp. */
365
366extern int current_function_calls_setjmp;
367
368/* Nonzero if function being compiled can call longjmp. */
369
370extern int current_function_calls_longjmp;
371
372/* Nonzero if function being compiled can call alloca,
373 either as a subroutine or builtin. */
374
375extern int current_function_calls_alloca;
376
377/* Nonzero if function being compiled receives nonlocal gotos
378 from nested functions. */
379
380extern int current_function_has_nonlocal_label;
381
382/* Nonzero if function being compiled contains nested functions. */
383
384extern int current_function_contains_functions;
385
fdb8a883
JW
386/* Nonzero if function being compiled doesn't modify the stack pointer
387 (ignoring the prologue and epilogue). This is only valid after
388 life_analysis has run. */
389
390extern int current_function_sp_is_unchanging;
391
0c2768fc
RS
392/* Nonzero if the current function returns a pointer type */
393
394extern int current_function_returns_pointer;
395
396/* If function's args have a fixed size, this is that size, in bytes.
397 Otherwise, it is -1.
398 May affect compilation of return insn or of function epilogue. */
399
400extern int current_function_args_size;
401
402/* # bytes the prologue should push and pretend that the caller pushed them.
403 The prologue must do this, but only if parms can be passed in registers. */
404
405extern int current_function_pretend_args_size;
406
407/* # of bytes of outgoing arguments required to be pushed by the prologue.
408 If this is non-zero, it means that ACCUMULATE_OUTGOING_ARGS was defined
409 and no stack adjusts will be done on function calls. */
410
411extern int current_function_outgoing_args_size;
412
413/* Nonzero if current function uses varargs.h or equivalent.
414 Zero for functions that use stdarg.h. */
415
416extern int current_function_varargs;
417
ca00d1e0
RK
418/* Nonzero if current function uses stdarg.h or equivalent.
419 Zero for functions that use varargs.h. */
420
421extern int current_function_stdarg;
422
0c2768fc
RS
423/* Quantities of various kinds of registers
424 used for the current function's args. */
425
426extern CUMULATIVE_ARGS current_function_args_info;
427
428/* Name of function now being compiled. */
429
430extern char *current_function_name;
431
ed068cf5 432#ifdef RTX_CODE
0c2768fc
RS
433/* If non-zero, an RTL expression for that location at which the current
434 function returns its result. Usually equal to
435 DECL_RTL (DECL_RESULT (current_function_decl)). */
436
437extern rtx current_function_return_rtx;
438
439/* If some insns can be deferred to the delay slots of the epilogue, the
440 delay list for them is recorded here. */
441
442extern rtx current_function_epilogue_delay_list;
ed068cf5 443#endif
0c2768fc 444
7fe78aa6
JL
445/* Nonzero means generate position-independent code.
446 This is not fully implemented yet. */
447
448extern int flag_pic;
449
0c2768fc
RS
450/* This is nonzero if the current function uses pic_offset_table_rtx. */
451extern int current_function_uses_pic_offset_table;
452
aae75261
JVA
453/* This is nonzero if the current function uses the constant pool. */
454extern int current_function_uses_const_pool;
455
aeb302bb
JM
456/* Language-specific reason why the current function cannot be made inline. */
457extern char *current_function_cannot_inline;
458
0c2768fc
RS
459/* The line number of the beginning of the current function.
460 sdbout.c needs this so that it can output relative linenumbers. */
461
462#ifdef SDB_DEBUGGING_INFO /* Avoid undef sym in certain broken linkers. */
463extern int sdb_begin_function_line;
464#endif
465
466/* File in which assembler code is being written. */
467
cf1c49cb 468#ifdef BUFSIZ
0c2768fc
RS
469extern FILE *asm_out_file;
470#endif
ad4ff310 471
a86d864c
RH
472/* Default file in which to dump debug output. */
473
474#ifdef BUFSIZ
475extern FILE *rtl_dump_file;
476#endif
477
ad4ff310
JM
478/* Decide whether DECL needs to be in a writable section. RELOC is the same
479 as for SELECT_SECTION. */
480
481#define DECL_READONLY_SECTION(DECL,RELOC) \
482 (TREE_READONLY (DECL) \
483 && ! TREE_THIS_VOLATILE (DECL) \
484 && DECL_INITIAL (DECL) \
485 && (DECL_INITIAL (DECL) == error_mark_node \
486 || TREE_CONSTANT (DECL_INITIAL (DECL))) \
487 && ! (RELOC && (flag_pic || DECL_ONE_ONLY (DECL))))
19283265
RH
488
489/* User label prefix in effect for this compilation. */
490extern char *user_label_prefix;
This page took 0.729982 seconds and 5 git commands to generate.