output.h revision 96263
138514Sdfr/* Declarations for insn-output.c.  These functions are defined in recog.c,
259603Sdfr   final.c, and varasm.c.
338514Sdfr   Copyright (C) 1987, 1991, 1994, 1997, 1998,
438514Sdfr   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
538514Sdfr
638514SdfrThis file is part of GCC.
738514Sdfr
838514SdfrGCC is free software; you can redistribute it and/or modify it under
938514Sdfrthe terms of the GNU General Public License as published by the Free
1038514SdfrSoftware Foundation; either version 2, or (at your option) any later
1138514Sdfrversion.
1238514Sdfr
1338514SdfrGCC is distributed in the hope that it will be useful, but WITHOUT ANY
1438514SdfrWARRANTY; without even the implied warranty of MERCHANTABILITY or
1538514SdfrFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1638514Sdfrfor more details.
1738514Sdfr
1838514SdfrYou should have received a copy of the GNU General Public License
1938514Sdfralong with GCC; see the file COPYING.  If not, write to the Free
2038514SdfrSoftware Foundation, 59 Temple Place - Suite 330, Boston, MA
2138514Sdfr02111-1307, USA.  */
2238514Sdfr
2338514Sdfr/* Compute branch alignments based on frequency information in the CFG.  */
2438514Sdfrextern void compute_alignments  PARAMS ((void));
2538514Sdfr
2650477Speter/* Initialize data in final at the beginning of a compilation.  */
2738514Sdfrextern void init_final		PARAMS ((const char *));
2838514Sdfr
2959603Sdfr/* Called at end of source file,
3059603Sdfr   to output the block-profiling table for this entire compilation.  */
3138514Sdfrextern void end_final		PARAMS ((const char *));
3276166Smarkm
3338514Sdfr/* Enable APP processing of subsequent output.
3476166Smarkm   Used before the output from an `asm' statement.  */
3538514Sdfrextern void app_enable		PARAMS ((void));
3677642Sdd
3738514Sdfr/* Disable APP processing of subsequent output.
3838514Sdfr   Called from varasm.c before most kinds of output.  */
3938514Sdfrextern void app_disable		PARAMS ((void));
4038514Sdfr
4138514Sdfr/* Return the number of slots filled in the current
4276166Smarkm   delayed branch sequence (we don't count the insn needing the
4338514Sdfr   delay slot).   Zero if not in a delayed branch sequence.  */
4485735Sgreenextern int dbr_sequence_length	PARAMS ((void));
4585735Sgreen
4685735Sgreen/* Indicate that branch shortening hasn't yet been done.  */
4738514Sdfrextern void init_insn_lengths	PARAMS ((void));
4839071Sdfr
4939071Sdfr#ifdef RTX_CODE
5052128Speter/* Obtain the current length of an insn.  If branch shortening has been done,
5139071Sdfr   get its actual length.  Otherwise, get its maximum length.  */
5239071Sdfrextern int get_attr_length	PARAMS ((rtx));
5339071Sdfr
5452128Speter/* Make a pass over all insns and compute their actual lengths by shortening
5539071Sdfr   any branches of variable length if possible.  */
5639071Sdfrextern void shorten_branches	PARAMS ((rtx));
5776166Smarkm
58102288Speter/* Output assembler code for the start of a function,
5939071Sdfr   and initialize some of the variables in this file
6059603Sdfr   for the new function.  The label for the function and associated
6138514Sdfr   assembler pseudo-ops have already been output in
6238514Sdfr   `assemble_start_function'.  */
6359603Sdfrextern void final_start_function  PARAMS ((rtx, FILE *, int));
6459603Sdfr
6539071Sdfr/* Output assembler code for the end of a function.
6639071Sdfr   For clarity, args are same as those of `final_start_function'
6739071Sdfr   even though not all of them are needed.  */
6839071Sdfrextern void final_end_function  PARAMS ((void));
6959603Sdfr
7080700Sjake/* Output assembler code for some insns: all or part of a function.  */
7180700Sjakeextern void final		PARAMS ((rtx, FILE *, int, int));
7280700Sjake
7380700Sjake/* The final scan for one insn, INSN.  Args are same as in `final', except
7438514Sdfr   that INSN is the insn being scanned.  Value returned is the next insn to
7538514Sdfr   be scanned.  */
7640254Speterextern rtx final_scan_insn	PARAMS ((rtx, FILE *, int, int, int));
7739071Sdfr
7839071Sdfr/* Replace a SUBREG with a REG or a MEM, based on the thing it is a
7939071Sdfr   subreg of.  */
8039071Sdfrextern rtx alter_subreg PARAMS ((rtx *));
8139071Sdfr
8239071Sdfr/* Report inconsistency between the assembler template and the operands.
8339071Sdfr   In an `asm', it's the user's fault; otherwise, the compiler's fault.  */
8439071Sdfrextern void output_operand_lossage  PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1;
8539071Sdfr
8639071Sdfr/* Output a string of assembler code, substituting insn operands.
8740254Speter   Defined in final.c.  */
8840254Speterextern void output_asm_insn	PARAMS ((const char *, rtx *));
8940254Speter
9040254Speter/* Compute a worst-case reference address of a branch so that it
9140254Speter   can be safely used in the presence of aligned labels.
9240292Speter   Defined in final.c.  */
9340292Speterextern int insn_current_reference_address	PARAMS ((rtx));
9459603Sdfr
9559603Sdfr/* Find the alignment associated with a CODE_LABEL.
9659603Sdfr   Defined in final.c.  */
9738514Sdfrextern int label_to_alignment	PARAMS ((rtx));
9838514Sdfr
9959751Speter/* Output a LABEL_REF, or a bare CODE_LABEL, as an assembler symbol.  */
10059751Speterextern void output_asm_label	PARAMS ((rtx));
10159751Speter
10259751Speter/* Print a memory reference operand for address X
10359603Sdfr   using machine-dependent assembler syntax.  */
10459603Sdfrextern void output_address	PARAMS ((rtx));
10559603Sdfr
10659603Sdfr/* Print an integer constant expression in assembler syntax.
10759603Sdfr   Addition and subtraction are the only arithmetic
10838514Sdfr   that may appear in these expressions.  */
10959603Sdfrextern void output_addr_const PARAMS ((FILE *, rtx));
11059751Speter
11178161Speter/* Output a string of assembler code, substituting numbers, strings
11278161Speter   and fixed syntactic prefixes.  */
11385736Sgreenextern void asm_fprintf		PARAMS ((FILE *file, const char *p, ...));
11485736Sgreen
11585736Sgreen/* Split up a CONST_DOUBLE or integer constant rtx into two rtx's for single
11659603Sdfr   words.  */
11759603Sdfrextern void split_double	PARAMS ((rtx, rtx *, rtx *));
11859603Sdfr
11959603Sdfr/* Return nonzero if this function has no function calls.  */
12059603Sdfrextern int leaf_function_p	PARAMS ((void));
12159603Sdfr
12259751Speter/* Return 1 if branch is an forward branch.
12359751Speter   Uses insn_shuid array, so it works only in the final pass.  May be used by
12459751Speter   output templates to add branch prediction hints, for example.  */
12578161Speterextern int final_forward_branch_p PARAMS ((rtx));
12685736Sgreen
12759603Sdfr/* Return 1 if this function uses only the registers that can be
12859603Sdfr   safely renumbered.  */
12959603Sdfrextern int only_leaf_regs_used	PARAMS ((void));
13059603Sdfr
13159603Sdfr/* Scan IN_RTX and its subexpressions, and renumber all regs into those
13259603Sdfr   available in leaf functions.  */
13359603Sdfrextern void leaf_renumber_regs_insn PARAMS ((rtx));
13459603Sdfr
13559603Sdfr/* Locate the proper template for the given insn-code.  */
13659603Sdfrextern const char *get_insn_template PARAMS ((int, rtx));
13759603Sdfr
13859603Sdfr/* Add function NAME to the weak symbols list.  VALUE is a weak alias
13959603Sdfr   associated with NAME.  */
14059603Sdfrextern int add_weak PARAMS ((const char *, const char *));
14159751Speter
14259603Sdfr/* Functions in flow.c */
14359603Sdfrextern void allocate_for_life_analysis	PARAMS ((void));
14466719Sjhbextern int regno_uninitialized		PARAMS ((unsigned int));
14566719Sjhbextern int regno_clobbered_at_setjmp	PARAMS ((int));
14659603Sdfrextern void find_basic_blocks		PARAMS ((rtx, int, FILE *));
14738514Sdfrextern bool cleanup_cfg			PARAMS ((int));
14859603Sdfrextern void check_function_return_warnings PARAMS ((void));
14959603Sdfr#endif
15059603Sdfr
15159603Sdfr/* Functions in varasm.c.  */
15266719Sjhb
15359603Sdfr/* Tell assembler to switch to text section.  */
15459603Sdfrextern void text_section		PARAMS ((void));
15559603Sdfr
15659603Sdfr/* Tell assembler to switch to data section.  */
157104094Sphkextern void data_section		PARAMS ((void));
15866719Sjhb
15966719Sjhb/* Tell assembler to make sure its in the data section.  */
16059603Sdfrextern void force_data_section		PARAMS ((void));
16159603Sdfr
16259603Sdfr/* Tell assembler to switch to read-only data section.  This is normally
16359603Sdfr   the text section.  */
16459603Sdfrextern void readonly_data_section	PARAMS ((void));
16595228Smarcel
16695228Smarcel/* Determine if we're in the text section.  */
16795228Smarcelextern int in_text_section		PARAMS ((void));
16895228Smarcel
16959603Sdfr#ifdef CTORS_SECTION_ASM_OP
17038514Sdfrextern void ctors_section PARAMS ((void));
17138514Sdfr#endif
17238514Sdfr
17338514Sdfr#ifdef DTORS_SECTION_ASM_OP
17438514Sdfrextern void dtors_section PARAMS ((void));
17538514Sdfr#endif
17638514Sdfr
17740156Speter#ifdef BSS_SECTION_ASM_OP
17840156Speterextern void bss_section PARAMS ((void));
17940156Speter#endif
18040156Speter
18181500Swpaul#ifdef CONST_SECTION_ASM_OP
18281500Swpaulextern void const_section PARAMS ((void));
18340156Speter#endif
18438514Sdfr
18559603Sdfr#ifdef INIT_SECTION_ASM_OP
18638514Sdfrextern void init_section PARAMS ((void));
18740156Speter#endif
18882848Speter
18982848Speter#ifdef FINI_SECTION_ASM_OP
19082848Speterextern void fini_section PARAMS ((void));
19182848Speter#endif
19282848Speter
19382848Speter#ifdef EXPORTS_SECTION_ASM_OP
19482848Speterextern void exports_section PARAMS ((void));
19582848Speter#endif
19682848Speter
19782848Speter#ifdef TDESC_SECTION_ASM_OP
19882848Speterextern void tdesc_section PARAMS ((void));
19982848Speter#endif
20082848Speter
20159603Sdfr#ifdef DRECTVE_SECTION_ASM_OP
20282848Speterextern void drectve_section PARAMS ((void));
20359603Sdfr#endif
20482848Speter
20559603Sdfr#ifdef SDATA_SECTION_ASM_OP
20682848Speterextern void sdata_section PARAMS ((void));
20782848Speter#endif
20882848Speter
20982848Speter#ifdef RDATA_SECTION_ASM_OP
21040156Speterextern void rdata_section PARAMS ((void));
21182848Speter#endif
21282848Speter
21382848Speter#ifdef TREE_CODE
21482848Speter/* Tell assembler to change to section NAME for DECL.
21582848Speter   If DECL is NULL, just switch to section NAME.
21682848Speter   If NAME is NULL, get the name from DECL.
21782848Speter   If RELOC is 1, the initializer for DECL contains relocs.  */
21882848Speterextern void named_section		PARAMS ((tree, const char *, int));
21982848Speter
22082848Speter/* Tell assembler to switch to the section for function DECL.  */
22159603Sdfrextern void function_section		PARAMS ((tree));
22259603Sdfr
22382848Speter/* Tell assembler to switch to the section for string merging.  */
22482848Speterextern void mergeable_string_section	PARAMS ((tree, unsigned HOST_WIDE_INT,
22582848Speter						 unsigned int));
22682848Speter
22782848Speter/* Tell assembler to switch to the section for constant merging.  */
22882848Speterextern void mergeable_constant_section	PARAMS ((enum machine_mode,
22982848Speter						 unsigned HOST_WIDE_INT,
23059603Sdfr						 unsigned int));
23182848Speter
23282848Speter/* Declare DECL to be a weak symbol.  */
23382848Speterextern void declare_weak		PARAMS ((tree));
23459603Sdfr/* Merge weak status.  */
23582848Speterextern void merge_weak			PARAMS ((tree, tree));
23659603Sdfr#endif /* TREE_CODE */
23738514Sdfr
23838514Sdfr/* Emit any pending weak declarations.  */
23940156Speterextern void weak_finish			PARAMS ((void));
24038514Sdfr
24138514Sdfr/* Decode an `asm' spec for a declaration as a register name.
24259751Speter   Return the register number, or -1 if nothing specified,
24340254Speter   or -2 if the ASMSPEC is not `cc' or `memory' and is not recognized,
24440254Speter   or -3 if ASMSPEC is `cc' and is not recognized,
24540254Speter   or -4 if ASMSPEC is `memory' and is not recognized.
24640254Speter   Accept an exact spelling or a decimal number.
24740254Speter   Prefixes such as % are optional.  */
24840254Speterextern int decode_reg_name		PARAMS ((const char *));
24940254Speter
25040254Speter#ifdef TREE_CODE
25140292Speter/* Make the rtl for variable VAR be volatile.
25240292Speter   Use this only for static variables.  */
25340254Speterextern void make_var_volatile		PARAMS ((tree));
25440254Speter
25540254Speter/* Output alignment directive to align for constant expression EXP.  */
25640254Speterextern void assemble_constant_align	PARAMS ((tree));
25740254Speter
25840254Speterextern void assemble_alias		PARAMS ((tree, tree));
25940254Speter
26040254Speter/* Output a string of literal assembler code
26140254Speter   for an `asm' keyword used between functions.  */
26240254Speterextern void assemble_asm		PARAMS ((tree));
26340254Speter
26440254Speter/* Output assembler code for the constant pool of a function and associated
26540254Speter   with defining the name of the function.  DECL describes the function.
26640254Speter   NAME is the function's name.  For the constant pool, we use the current
26740254Speter   constant pool data.  */
26840254Speterextern void assemble_start_function	PARAMS ((tree, const char *));
26940254Speter
27040254Speter/* Output assembler code associated with defining the size of the
27140254Speter   function.  DECL describes the function.  NAME is the function's name.  */
27240254Speterextern void assemble_end_function	PARAMS ((tree, const char *));
27340254Speter
27440254Speter/* Assemble everything that is needed for a variable or function declaration.
27540254Speter   Not used for automatic variables, and not used for function definitions.
27640254Speter   Should not be called for variables of incomplete structure type.
27740254Speter
27840254Speter   TOP_LEVEL is nonzero if this variable has file scope.
27940254Speter   AT_END is nonzero if this is the special handling, at end of compilation,
28040254Speter   to define things that have had only tentative definitions.
28140254Speter   DONT_OUTPUT_DATA if nonzero means don't actually output the
28240254Speter   initial value (that will be done by the caller).  */
28340254Speterextern void assemble_variable		PARAMS ((tree, int, int, int));
28440254Speter
28540254Speter/* Output something to declare an external symbol to the assembler.
28640254Speter   (Most assemblers don't need this, so we normally output nothing.)
28740254Speter   Do nothing if DECL is not external.  */
28840254Speterextern void assemble_external		PARAMS ((tree));
28940254Speter#endif /* TREE_CODE */
29040254Speter
29140254Speter/* Assemble code to leave SIZE bytes of zeros.  */
29240254Speterextern void assemble_zeros		PARAMS ((int));
29359603Sdfr
29438514Sdfr/* Assemble an alignment pseudo op for an ALIGN-bit boundary.  */
29559603Sdfrextern void assemble_align		PARAMS ((int));
29639071Sdfrextern void assemble_eh_align		PARAMS ((int));
29738514Sdfr
29838514Sdfr/* Assemble a string constant with the specified C string as contents.  */
29938514Sdfrextern void assemble_string		PARAMS ((const char *, int));
30038514Sdfr
30138514Sdfr#ifdef RTX_CODE
30238514Sdfr/* Similar, for calling a library function FUN.  */
30380700Sjakeextern void assemble_external_libcall	PARAMS ((rtx));
30438514Sdfr#endif
30538514Sdfr
30638514Sdfr/* Declare the label NAME global.  */
30738514Sdfrextern void assemble_global		PARAMS ((const char *));
30838514Sdfr
30938514Sdfr/* Assemble a label named NAME.  */
31038514Sdfrextern void assemble_label		PARAMS ((const char *));
31138514Sdfrextern void assemble_eh_label		PARAMS ((const char *));
31239071Sdfr
31338514Sdfr/* Output to FILE a reference to the assembler name of a C-level name NAME.
31440254Speter   If NAME starts with a *, the rest of NAME is output verbatim.
31540254Speter   Otherwise NAME is transformed in an implementation-defined way
31640254Speter   (usually by the addition of an underscore).
31738514Sdfr   Many macros in the tm file are defined to call this function.  */
31839071Sdfrextern void assemble_name		PARAMS ((FILE *, const char *));
31938514Sdfr
32038514Sdfr/* Return the assembler directive for creating a given kind of integer
32138514Sdfr   object.  SIZE is the number of bytes in the object and ALIGNED_P
32238514Sdfr   indicates whether it is known to be aligned.  Return NULL if the
32339071Sdfr   assembly dialect has no such directive.
32439071Sdfr
32539071Sdfr   The returned string should be printed at the start of a new line and
32639071Sdfr   be followed immediately by the object's initial value.  */
32739071Sdfrextern const char *integer_asm_op	PARAMS ((int, int));
32839071Sdfr
32939071Sdfr#ifdef RTX_CODE
33039071Sdfr/* Use directive OP to assemble an integer object X.  Print OP at the
33139071Sdfr   start of the line, followed immediately by the value of X.  */
33239071Sdfrextern void assemble_integer_with_op	PARAMS ((const char *, rtx));
33339071Sdfr
33439071Sdfr/* The default implementation of the asm_out.integer target hook.  */
33539071Sdfrextern bool default_assemble_integer	PARAMS ((rtx, unsigned int, int));
33639071Sdfr
33739071Sdfr/* Assemble the integer constant X into an object of SIZE bytes.  ALIGN is
33839071Sdfr   the alignment of the integer in bits.  Return 1 if we were able to output
33939071Sdfr   the constant, otherwise 0.  If FORCE is non-zero, abort if we can't output
34039071Sdfr   the constant.  */
34139071Sdfrextern bool assemble_integer		PARAMS ((rtx, unsigned, unsigned, int));
34239071Sdfr
34339071Sdfr/* An interface to assemble_integer for the common case in which a value is
34439071Sdfr   fully aligned and must be printed.  VALUE is the value of the integer
34539071Sdfr   object and SIZE is the number of bytes it contains.  */
34639071Sdfr#define assemble_aligned_integer(SIZE, VALUE) \
34739071Sdfr  assemble_integer (VALUE, SIZE, (SIZE) * BITS_PER_UNIT, 1)
34839071Sdfr
34939071Sdfr#ifdef REAL_VALUE_TYPE
35039071Sdfr/* Assemble the floating-point constant D into an object of size MODE.  */
35139071Sdfrextern void assemble_real		PARAMS ((REAL_VALUE_TYPE,
35239071Sdfr					         enum machine_mode,
35339071Sdfr						 unsigned));
35439071Sdfr#endif
35539071Sdfr#endif
35639071Sdfr
35739071Sdfr/* At the end of a function, forget the memory-constants
35859603Sdfr   previously made for CONST_DOUBLEs.  Mark them as not on real_constant_chain.
35959603Sdfr   Also clear out real_constant_chain and clear out all the chain-pointers.  */
36059603Sdfrextern void clear_const_double_mem	PARAMS ((void));
36159603Sdfr
36259603Sdfr/* Start deferring output of subconstants.  */
36338514Sdfrextern void defer_addressed_constants	PARAMS ((void));
36438514Sdfr
36539071Sdfr/* Stop deferring output of subconstants,
36639071Sdfr   and output now all those that have been deferred.  */
36739071Sdfrextern void output_deferred_addressed_constants PARAMS ((void));
36839071Sdfr
36939071Sdfr/* Return the size of the constant pool.  */
37039071Sdfrextern int get_pool_size		PARAMS ((void));
37139071Sdfr
37239071Sdfr#ifdef HAVE_peephole
37340254Speterextern rtx peephole			PARAMS ((rtx));
37440254Speter#endif
37540254Speter
37640254Speter#ifdef TREE_CODE
37740254Speter/* Write all the constants in the constant pool.  */
37838514Sdfrextern void output_constant_pool	PARAMS ((const char *, tree));
37938514Sdfr
38038514Sdfr/* Return nonzero if VALUE is a valid constant-valued expression
38139071Sdfr   for use in initializing a static variable; one that can be an
38239071Sdfr   element of a "constant" initializer.
38339071Sdfr
38439071Sdfr   Return null_pointer_node if the value is absolute;
38539071Sdfr   if it is relocatable, return the variable that determines the relocation.
38639071Sdfr   We assume that VALUE has been folded as much as possible;
38759603Sdfr   therefore, we do not need to check for such things as
38859603Sdfr   arithmetic-combinations of integers.  */
38959603Sdfrextern tree initializer_constant_valid_p	PARAMS ((tree, tree));
39059603Sdfr
39159603Sdfr/* Output assembler code for constant EXP to FILE, with no label.
39259603Sdfr   This includes the pseudo-op such as ".int" or ".byte", and a newline.
39359603Sdfr   Assumes output_addressed_constants has been done on EXP already.
39459603Sdfr
39559603Sdfr   Generate exactly SIZE bytes of assembler data, padding at the end
39659603Sdfr   with zeros if necessary.  SIZE must always be specified.
39759603Sdfr
39859603Sdfr   ALIGN is the alignment in bits that may be assumed for the data.  */
39959603Sdfrextern void output_constant		PARAMS ((tree, HOST_WIDE_INT,
40059603Sdfr						 unsigned int));
40159603Sdfr#endif
40259603Sdfr
40359603Sdfr#ifdef RTX_CODE
40459603Sdfr/* When outputting delayed branch sequences, this rtx holds the
40559603Sdfr   sequence being output.  It is null when no delayed branch
40659603Sdfr   sequence is being output, so it can be used as a test in the
40759603Sdfr   insn output code.
40859603Sdfr
40959603Sdfr   This variable is defined  in final.c.  */
41059603Sdfrextern rtx final_sequence;
41159603Sdfr#endif
41259603Sdfr
41359603Sdfr/* The line number of the beginning of the current function.  Various
41459603Sdfr   md code needs this so that it can output relative linenumbers.  */
41559603Sdfr
41659603Sdfr#ifdef SDB_DEBUGGING_INFO /* Avoid undef sym in certain broken linkers.  */
41759603Sdfrextern int sdb_begin_function_line;
41859603Sdfr#endif
41959603Sdfr
42059603Sdfr/* File in which assembler code is being written.  */
42138514Sdfr
42259751Speter#ifdef BUFSIZ
42359751Speterextern FILE *asm_out_file;
42440156Speter#endif
42540156Speter
42640156Speter/* The first global object in the file.  */
42740156Speterextern const char *first_global_object_name;
42840156Speter
42940156Speter/* The first weak object in the file.  */
43040156Speterextern const char *weak_global_object_name;
43140156Speter
43259751Speter/* Nonzero if function being compiled doesn't contain any calls
43340156Speter   (ignoring the prologue and epilogue).  This is set prior to
43440156Speter   local register allocation and is valid for the remaining
43559751Speter   compiler passes.  */
43640156Speter
43740156Speterextern int current_function_is_leaf;
43840156Speter
43940156Speter/* Nonzero if function being compiled doesn't contain any instructions
44040156Speter   that can throw an exception.  This is set prior to final.  */
44140156Speter
44240156Speterextern int current_function_nothrow;
44340156Speter
44440156Speter/* Nonzero if function being compiled doesn't modify the stack pointer
44540156Speter   (ignoring the prologue and epilogue).  This is only valid after
44659603Sdfr   life_analysis has run.  */
44759603Sdfr
44859603Sdfrextern int current_function_sp_is_unchanging;
44959603Sdfr
45059603Sdfr/* Nonzero if the function being compiled is a leaf function which only
45159603Sdfr   uses leaf registers.  This is valid after reload (specifically after
45259603Sdfr   sched2) and is useful only if the port defines LEAF_REGISTERS.  */
45340292Speter
45440156Speterextern int current_function_uses_only_leaf_regs;
45540156Speter
45640156Speter/* Default file in which to dump debug output.  */
45740156Speter
45840156Speter#ifdef BUFSIZ
45940156Speterextern FILE *rtl_dump_file;
46040156Speter#endif
46140156Speter
46240156Speter/* Nonnull if the insn currently being emitted was a COND_EXEC pattern.  */
46359603Sdfrextern struct rtx_def *current_insn_predicate;
46440156Speter
46540156Speter/* Last insn processed by final_scan_insn.  */
46640156Speterextern struct rtx_def *current_output_insn;
46740156Speter
46859751Speter/* Decide whether DECL needs to be in a writable section.  RELOC is the same
46959751Speter   as for SELECT_SECTION.  */
47059751Speter
47159751Speter#define DECL_READONLY_SECTION(DECL,RELOC)		\
47259751Speter  (TREE_READONLY (DECL)					\
47359751Speter   && ! TREE_THIS_VOLATILE (DECL)			\
47459751Speter   && DECL_INITIAL (DECL)				\
47559751Speter   && (DECL_INITIAL (DECL) == error_mark_node		\
47659751Speter       || TREE_CONSTANT (DECL_INITIAL (DECL)))		\
47781500Swpaul   && ! (RELOC && (flag_pic || DECL_ONE_ONLY (DECL))))
47881500Swpaul
47981500Swpaul/* User label prefix in effect for this compilation.  */
48059751Speterextern const char *user_label_prefix;
48159751Speter
48259751Speter/* This macro gets just the user-specified name
48359751Speter   out of the string in a SYMBOL_REF.  On most machines,
48459751Speter   we discard the * if any and that's all.  */
48559751Speter#ifndef STRIP_NAME_ENCODING
48659751Speter#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
48759751Speter  (VAR) = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*'))
48859751Speter#endif
48959751Speter
49040156Speter/* Default target function prologue and epilogue assembler output.  */
49159751Speterextern void default_function_pro_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
49259603Sdfr
49359751Speter/* Tell assembler to switch to the section for the exception table.  */
49440156Speterextern void default_exception_section	PARAMS ((void));
49559751Speter
49659603Sdfr/* Tell assembler to switch to the section for the EH frames.  */
49759603Sdfrextern void default_eh_frame_section	PARAMS ((void));
49859603Sdfr
49959603Sdfr/* Default target hook that outputs nothing to a stream.  */
50081500Swpaulextern void no_asm_to_stream PARAMS ((FILE *));
50181500Swpaul
50281500Swpaul/* Flags controling properties of a section.  */
50359603Sdfr#define SECTION_ENTSIZE	 0x000ff	/* entity size in section */
50459603Sdfr#define SECTION_CODE	 0x00100	/* contains code */
50559603Sdfr#define SECTION_WRITE	 0x00200	/* data is writable */
50659603Sdfr#define SECTION_DEBUG	 0x00400	/* contains debug data */
50759603Sdfr#define SECTION_LINKONCE 0x00800	/* is linkonce */
50840156Speter#define SECTION_SMALL	 0x01000	/* contains "small data" */
50940156Speter#define SECTION_BSS	 0x02000	/* contains zeros only */
51040156Speter#define SECTION_FORGET	 0x04000	/* forget that we've entered the section */
51140156Speter#define SECTION_MERGE	 0x08000	/* contains mergeable data */
51259751Speter#define SECTION_STRINGS  0x10000	/* contains zero terminated strings without
51338514Sdfr					   embedded zeros */
51438514Sdfr#define SECTION_OVERRIDE 0x20000	/* allow override of default flags */
51583366Sjulian#define SECTION_MACH_DEP 0x40000	/* subsequent bits reserved for target */
51640962Speter
51740962Speterextern unsigned int get_named_section_flags PARAMS ((const char *));
51839071Sdfrextern bool set_named_section_flags	PARAMS ((const char *, unsigned int));
51939071Sdfrextern void named_section_flags		PARAMS ((const char *, unsigned int));
52039071Sdfrextern bool named_section_first_declaration PARAMS((const char *));
52139071Sdfr
52239071Sdfrunion tree_node;
52339071Sdfrextern unsigned int default_section_type_flags PARAMS ((union tree_node *,
52439071Sdfr							const char *, int));
52539071Sdfr
52639071Sdfrextern void default_no_named_section PARAMS ((const char *, unsigned int));
52739071Sdfrextern void default_elf_asm_named_section PARAMS ((const char *, unsigned int));
52839071Sdfrextern void default_coff_asm_named_section PARAMS ((const char *,
52939071Sdfr						    unsigned int));
53038514Sdfrextern void default_pe_asm_named_section PARAMS ((const char *, unsigned int));
53162550Smckusick
53238514Sdfrextern void default_stabs_asm_out_destructor PARAMS ((struct rtx_def *, int));
53338514Sdfrextern void default_named_section_asm_out_destructor PARAMS ((struct rtx_def *,
53440292Speter							      int));
53540292Speterextern void default_dtor_section_asm_out_destructor PARAMS ((struct rtx_def *,
53640292Speter							     int));
53740292Speterextern void default_stabs_asm_out_constructor PARAMS ((struct rtx_def *, int));
53840292Speterextern void default_named_section_asm_out_constructor PARAMS ((struct rtx_def *,
53981500Swpaul							       int));
54081201Sgreenextern void default_ctor_section_asm_out_constructor PARAMS ((struct rtx_def *,
54181500Swpaul							      int));
54238514Sdfr
54379224Sdillon/* Emit data for vtable gc for GNU binutils.  */
54479224Sdillonextern void assemble_vtable_entry PARAMS ((struct rtx_def *, HOST_WIDE_INT));
54540292Speterextern void assemble_vtable_inherit PARAMS ((struct rtx_def *,
54640292Speter					     struct rtx_def *));
54740292Speter