output.h revision 90075
118334Speter/* Declarations for insn-output.c.  These functions are defined in recog.c,
218334Speter   final.c, and varasm.c.
390075Sobrien   Copyright (C) 1987, 1991, 1994, 1997, 1998,
490075Sobrien   1999, 2000, 2001 Free Software Foundation, Inc.
518334Speter
690075SobrienThis file is part of GCC.
718334Speter
890075SobrienGCC is free software; you can redistribute it and/or modify it under
990075Sobrienthe terms of the GNU General Public License as published by the Free
1090075SobrienSoftware Foundation; either version 2, or (at your option) any later
1190075Sobrienversion.
1218334Speter
1390075SobrienGCC is distributed in the hope that it will be useful, but WITHOUT ANY
1490075SobrienWARRANTY; without even the implied warranty of MERCHANTABILITY or
1590075SobrienFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1690075Sobrienfor more details.
1718334Speter
1818334SpeterYou should have received a copy of the GNU General Public License
1990075Sobrienalong with GCC; see the file COPYING.  If not, write to the Free
2090075SobrienSoftware Foundation, 59 Temple Place - Suite 330, Boston, MA
2190075Sobrien02111-1307, USA.  */
2218334Speter
2390075Sobrien/* Compute branch alignments based on frequency information in the CFG.  */
2490075Sobrienextern void compute_alignments  PARAMS ((void));
2590075Sobrien
2618334Speter/* Initialize data in final at the beginning of a compilation.  */
2790075Sobrienextern void init_final		PARAMS ((const char *));
2818334Speter
2918334Speter/* Called at end of source file,
3018334Speter   to output the block-profiling table for this entire compilation.  */
3190075Sobrienextern void end_final		PARAMS ((const char *));
3218334Speter
3318334Speter/* Enable APP processing of subsequent output.
3418334Speter   Used before the output from an `asm' statement.  */
3590075Sobrienextern void app_enable		PARAMS ((void));
3618334Speter
3718334Speter/* Disable APP processing of subsequent output.
3818334Speter   Called from varasm.c before most kinds of output.  */
3990075Sobrienextern void app_disable		PARAMS ((void));
4018334Speter
4190075Sobrien/* Return the number of slots filled in the current
4218334Speter   delayed branch sequence (we don't count the insn needing the
4318334Speter   delay slot).   Zero if not in a delayed branch sequence.  */
4490075Sobrienextern int dbr_sequence_length	PARAMS ((void));
4518334Speter
4618334Speter/* Indicate that branch shortening hasn't yet been done.  */
4790075Sobrienextern void init_insn_lengths	PARAMS ((void));
4818334Speter
4918334Speter#ifdef RTX_CODE
5018334Speter/* Obtain the current length of an insn.  If branch shortening has been done,
5118334Speter   get its actual length.  Otherwise, get its maximum length.  */
5290075Sobrienextern int get_attr_length	PARAMS ((rtx));
5318334Speter
5418334Speter/* Make a pass over all insns and compute their actual lengths by shortening
5518334Speter   any branches of variable length if possible.  */
5690075Sobrienextern void shorten_branches	PARAMS ((rtx));
5718334Speter
5818334Speter/* Output assembler code for the start of a function,
5918334Speter   and initialize some of the variables in this file
6018334Speter   for the new function.  The label for the function and associated
6118334Speter   assembler pseudo-ops have already been output in
6218334Speter   `assemble_start_function'.  */
6390075Sobrienextern void final_start_function  PARAMS ((rtx, FILE *, int));
6418334Speter
6518334Speter/* Output assembler code for the end of a function.
6618334Speter   For clarity, args are same as those of `final_start_function'
6718334Speter   even though not all of them are needed.  */
6890075Sobrienextern void final_end_function  PARAMS ((void));
6918334Speter
7018334Speter/* Output assembler code for some insns: all or part of a function.  */
7190075Sobrienextern void final		PARAMS ((rtx, FILE *, int, int));
7218334Speter
7318334Speter/* The final scan for one insn, INSN.  Args are same as in `final', except
7418334Speter   that INSN is the insn being scanned.  Value returned is the next insn to
7518334Speter   be scanned.  */
7690075Sobrienextern rtx final_scan_insn	PARAMS ((rtx, FILE *, int, int, int));
7718334Speter
7818334Speter/* Replace a SUBREG with a REG or a MEM, based on the thing it is a
7918334Speter   subreg of.  */
8090075Sobrienextern rtx alter_subreg PARAMS ((rtx *));
8118334Speter
8218334Speter/* Report inconsistency between the assembler template and the operands.
8318334Speter   In an `asm', it's the user's fault; otherwise, the compiler's fault.  */
8490075Sobrienextern void output_operand_lossage  PARAMS ((const char *));
8518334Speter
8618334Speter/* Output a string of assembler code, substituting insn operands.
8718334Speter   Defined in final.c.  */
8890075Sobrienextern void output_asm_insn	PARAMS ((const char *, rtx *));
8918334Speter
9050397Sobrien/* Compute a worst-case reference address of a branch so that it
9150397Sobrien   can be safely used in the presence of aligned labels.
9250397Sobrien   Defined in final.c.  */
9390075Sobrienextern int insn_current_reference_address	PARAMS ((rtx));
9450397Sobrien
9552284Sobrien/* Find the alignment associated with a CODE_LABEL.
9652284Sobrien   Defined in final.c.  */
9790075Sobrienextern int label_to_alignment	PARAMS ((rtx));
9852284Sobrien
9918334Speter/* Output a LABEL_REF, or a bare CODE_LABEL, as an assembler symbol.  */
10090075Sobrienextern void output_asm_label	PARAMS ((rtx));
10118334Speter
10218334Speter/* Print a memory reference operand for address X
10318334Speter   using machine-dependent assembler syntax.  */
10490075Sobrienextern void output_address	PARAMS ((rtx));
10518334Speter
10618334Speter/* Print an integer constant expression in assembler syntax.
10718334Speter   Addition and subtraction are the only arithmetic
10818334Speter   that may appear in these expressions.  */
10990075Sobrienextern void output_addr_const PARAMS ((FILE *, rtx));
11018334Speter
11118334Speter/* Output a string of assembler code, substituting numbers, strings
11218334Speter   and fixed syntactic prefixes.  */
11390075Sobrienextern void asm_fprintf		PARAMS ((FILE *file, const char *p, ...));
11418334Speter
11518334Speter/* Split up a CONST_DOUBLE or integer constant rtx into two rtx's for single
11618334Speter   words.  */
11790075Sobrienextern void split_double	PARAMS ((rtx, rtx *, rtx *));
11818334Speter
11918334Speter/* Return nonzero if this function has no function calls.  */
12090075Sobrienextern int leaf_function_p	PARAMS ((void));
12118334Speter
12290075Sobrien/* Return 1 if branch is an forward branch.
12390075Sobrien   Uses insn_shuid array, so it works only in the final pass.  May be used by
12490075Sobrien   output templates to add branch prediction hints, for example.  */
12590075Sobrienextern int final_forward_branch_p PARAMS ((rtx));
12690075Sobrien
12718334Speter/* Return 1 if this function uses only the registers that can be
12818334Speter   safely renumbered.  */
12990075Sobrienextern int only_leaf_regs_used	PARAMS ((void));
13018334Speter
13118334Speter/* Scan IN_RTX and its subexpressions, and renumber all regs into those
13218334Speter   available in leaf functions.  */
13390075Sobrienextern void leaf_renumber_regs_insn PARAMS ((rtx));
13450397Sobrien
13590075Sobrien/* Locate the proper template for the given insn-code.  */
13690075Sobrienextern const char *get_insn_template PARAMS ((int, rtx));
13790075Sobrien
13890075Sobrien/* Add function NAME to the weak symbols list.  VALUE is a weak alias
13990075Sobrien   associated with NAME.  */
14090075Sobrienextern int add_weak PARAMS ((const char *, const char *));
14190075Sobrien
14250397Sobrien/* Functions in flow.c */
14390075Sobrienextern void allocate_for_life_analysis	PARAMS ((void));
14490075Sobrienextern int regno_uninitialized		PARAMS ((unsigned int));
14590075Sobrienextern int regno_clobbered_at_setjmp	PARAMS ((int));
14690075Sobrienextern void find_basic_blocks		PARAMS ((rtx, int, FILE *));
14790075Sobrienextern bool cleanup_cfg			PARAMS ((int));
14890075Sobrienextern void check_function_return_warnings PARAMS ((void));
14918334Speter#endif
15018334Speter
15118334Speter/* Functions in varasm.c.  */
15218334Speter
15318334Speter/* Tell assembler to switch to text section.  */
15490075Sobrienextern void text_section		PARAMS ((void));
15518334Speter
15618334Speter/* Tell assembler to switch to data section.  */
15790075Sobrienextern void data_section		PARAMS ((void));
15818334Speter
15952284Sobrien/* Tell assembler to make sure its in the data section.  */
16090075Sobrienextern void force_data_section		PARAMS ((void));
16152284Sobrien
16218334Speter/* Tell assembler to switch to read-only data section.  This is normally
16318334Speter   the text section.  */
16490075Sobrienextern void readonly_data_section	PARAMS ((void));
16518334Speter
16690075Sobrien/* Determine if we're in the text section.  */
16790075Sobrienextern int in_text_section		PARAMS ((void));
16818334Speter
16990075Sobrien#ifdef CTORS_SECTION_ASM_OP
17090075Sobrienextern void ctors_section PARAMS ((void));
17150397Sobrien#endif
17250397Sobrien
17390075Sobrien#ifdef DTORS_SECTION_ASM_OP
17490075Sobrienextern void dtors_section PARAMS ((void));
17590075Sobrien#endif
17690075Sobrien
17790075Sobrien#ifdef BSS_SECTION_ASM_OP
17890075Sobrienextern void bss_section PARAMS ((void));
17990075Sobrien#endif
18090075Sobrien
18190075Sobrien#ifdef CONST_SECTION_ASM_OP
18290075Sobrienextern void const_section PARAMS ((void));
18390075Sobrien#endif
18490075Sobrien
18590075Sobrien#ifdef INIT_SECTION_ASM_OP
18690075Sobrienextern void init_section PARAMS ((void));
18790075Sobrien#endif
18890075Sobrien
18990075Sobrien#ifdef FINI_SECTION_ASM_OP
19090075Sobrienextern void fini_section PARAMS ((void));
19190075Sobrien#endif
19290075Sobrien
19390075Sobrien#ifdef EXPORTS_SECTION_ASM_OP
19490075Sobrienextern void exports_section PARAMS ((void));
19590075Sobrien#endif
19690075Sobrien
19790075Sobrien#ifdef TDESC_SECTION_ASM_OP
19890075Sobrienextern void tdesc_section PARAMS ((void));
19990075Sobrien#endif
20090075Sobrien
20190075Sobrien#ifdef DRECTVE_SECTION_ASM_OP
20290075Sobrienextern void drectve_section PARAMS ((void));
20390075Sobrien#endif
20490075Sobrien
20590075Sobrien#ifdef SDATA_SECTION_ASM_OP
20690075Sobrienextern void sdata_section PARAMS ((void));
20790075Sobrien#endif
20890075Sobrien
20990075Sobrien#ifdef RDATA_SECTION_ASM_OP
21090075Sobrienextern void rdata_section PARAMS ((void));
21190075Sobrien#endif
21290075Sobrien
21318334Speter#ifdef TREE_CODE
21418334Speter/* Tell assembler to change to section NAME for DECL.
21518334Speter   If DECL is NULL, just switch to section NAME.
21650397Sobrien   If NAME is NULL, get the name from DECL.
21750397Sobrien   If RELOC is 1, the initializer for DECL contains relocs.  */
21890075Sobrienextern void named_section		PARAMS ((tree, const char *, int));
21918334Speter
22018334Speter/* Tell assembler to switch to the section for function DECL.  */
22190075Sobrienextern void function_section		PARAMS ((tree));
22218334Speter
22390075Sobrien/* Tell assembler to switch to the section for string merging.  */
22490075Sobrienextern void mergeable_string_section	PARAMS ((tree, unsigned HOST_WIDE_INT,
22590075Sobrien						 unsigned int));
22650397Sobrien
22790075Sobrien/* Tell assembler to switch to the section for constant merging.  */
22890075Sobrienextern void mergeable_constant_section	PARAMS ((enum machine_mode,
22990075Sobrien						 unsigned HOST_WIDE_INT,
23090075Sobrien						 unsigned int));
23118334Speter
23250397Sobrien/* Declare DECL to be a weak symbol.  */
23390075Sobrienextern void declare_weak		PARAMS ((tree));
23450397Sobrien#endif /* TREE_CODE */
23550397Sobrien
23650397Sobrien/* Emit any pending weak declarations.  */
23790075Sobrienextern void weak_finish			PARAMS ((void));
23850397Sobrien
23918334Speter/* Decode an `asm' spec for a declaration as a register name.
24018334Speter   Return the register number, or -1 if nothing specified,
24118334Speter   or -2 if the ASMSPEC is not `cc' or `memory' and is not recognized,
24218334Speter   or -3 if ASMSPEC is `cc' and is not recognized,
24318334Speter   or -4 if ASMSPEC is `memory' and is not recognized.
24418334Speter   Accept an exact spelling or a decimal number.
24518334Speter   Prefixes such as % are optional.  */
24690075Sobrienextern int decode_reg_name		PARAMS ((const char *));
24718334Speter
24850397Sobrien#ifdef TREE_CODE
24918334Speter/* Make the rtl for variable VAR be volatile.
25018334Speter   Use this only for static variables.  */
25190075Sobrienextern void make_var_volatile		PARAMS ((tree));
25218334Speter
25318334Speter/* Output alignment directive to align for constant expression EXP.  */
25490075Sobrienextern void assemble_constant_align	PARAMS ((tree));
25518334Speter
25690075Sobrienextern void assemble_alias		PARAMS ((tree, tree));
25750397Sobrien
25818334Speter/* Output a string of literal assembler code
25918334Speter   for an `asm' keyword used between functions.  */
26090075Sobrienextern void assemble_asm		PARAMS ((tree));
26118334Speter
26218334Speter/* Output assembler code for the constant pool of a function and associated
26318334Speter   with defining the name of the function.  DECL describes the function.
26418334Speter   NAME is the function's name.  For the constant pool, we use the current
26518334Speter   constant pool data.  */
26690075Sobrienextern void assemble_start_function	PARAMS ((tree, const char *));
26718334Speter
26818334Speter/* Output assembler code associated with defining the size of the
26918334Speter   function.  DECL describes the function.  NAME is the function's name.  */
27090075Sobrienextern void assemble_end_function	PARAMS ((tree, const char *));
27118334Speter
27218334Speter/* Assemble everything that is needed for a variable or function declaration.
27318334Speter   Not used for automatic variables, and not used for function definitions.
27418334Speter   Should not be called for variables of incomplete structure type.
27518334Speter
27618334Speter   TOP_LEVEL is nonzero if this variable has file scope.
27718334Speter   AT_END is nonzero if this is the special handling, at end of compilation,
27818334Speter   to define things that have had only tentative definitions.
27918334Speter   DONT_OUTPUT_DATA if nonzero means don't actually output the
28018334Speter   initial value (that will be done by the caller).  */
28190075Sobrienextern void assemble_variable		PARAMS ((tree, int, int, int));
28218334Speter
28318334Speter/* Output something to declare an external symbol to the assembler.
28418334Speter   (Most assemblers don't need this, so we normally output nothing.)
28518334Speter   Do nothing if DECL is not external.  */
28690075Sobrienextern void assemble_external		PARAMS ((tree));
28750397Sobrien#endif /* TREE_CODE */
28818334Speter
28990075Sobrien/* Assemble code to leave SIZE bytes of zeros.  */
29090075Sobrienextern void assemble_zeros		PARAMS ((int));
29190075Sobrien
29290075Sobrien/* Assemble an alignment pseudo op for an ALIGN-bit boundary.  */
29390075Sobrienextern void assemble_align		PARAMS ((int));
29490075Sobrienextern void assemble_eh_align		PARAMS ((int));
29590075Sobrien
29690075Sobrien/* Assemble a string constant with the specified C string as contents.  */
29790075Sobrienextern void assemble_string		PARAMS ((const char *, int));
29890075Sobrien
29918334Speter#ifdef RTX_CODE
30018334Speter/* Similar, for calling a library function FUN.  */
30190075Sobrienextern void assemble_external_libcall	PARAMS ((rtx));
30218334Speter#endif
30318334Speter
30418334Speter/* Declare the label NAME global.  */
30590075Sobrienextern void assemble_global		PARAMS ((const char *));
30618334Speter
30718334Speter/* Assemble a label named NAME.  */
30890075Sobrienextern void assemble_label		PARAMS ((const char *));
30990075Sobrienextern void assemble_eh_label		PARAMS ((const char *));
31018334Speter
31118334Speter/* Output to FILE a reference to the assembler name of a C-level name NAME.
31218334Speter   If NAME starts with a *, the rest of NAME is output verbatim.
31318334Speter   Otherwise NAME is transformed in an implementation-defined way
31418334Speter   (usually by the addition of an underscore).
31518334Speter   Many macros in the tm file are defined to call this function.  */
31690075Sobrienextern void assemble_name		PARAMS ((FILE *, const char *));
31718334Speter
31890075Sobrien/* Return the assembler directive for creating a given kind of integer
31990075Sobrien   object.  SIZE is the number of bytes in the object and ALIGNED_P
32090075Sobrien   indicates whether it is known to be aligned.  Return NULL if the
32190075Sobrien   assembly dialect has no such directive.
32290075Sobrien
32390075Sobrien   The returned string should be printed at the start of a new line and
32490075Sobrien   be followed immediately by the object's initial value.  */
32590075Sobrienextern const char *integer_asm_op	PARAMS ((int, int));
32690075Sobrien
32718334Speter#ifdef RTX_CODE
32890075Sobrien/* Use directive OP to assemble an integer object X.  Print OP at the
32990075Sobrien   start of the line, followed immediately by the value of X.  */
33090075Sobrienextern void assemble_integer_with_op	PARAMS ((const char *, rtx));
33118334Speter
33290075Sobrien/* The default implementation of the asm_out.integer target hook.  */
33390075Sobrienextern bool default_assemble_integer	PARAMS ((rtx, unsigned int, int));
33418334Speter
33590075Sobrien/* Assemble the integer constant X into an object of SIZE bytes.  ALIGN is
33690075Sobrien   the alignment of the integer in bits.  Return 1 if we were able to output
33790075Sobrien   the constant, otherwise 0.  If FORCE is non-zero, abort if we can't output
33890075Sobrien   the constant.  */
33990075Sobrienextern bool assemble_integer		PARAMS ((rtx, unsigned, unsigned, int));
34090075Sobrien
34190075Sobrien/* An interface to assemble_integer for the common case in which a value is
34290075Sobrien   fully aligned and must be printed.  VALUE is the value of the integer
34390075Sobrien   object and SIZE is the number of bytes it contains.  */
34490075Sobrien#define assemble_aligned_integer(SIZE, VALUE) \
34590075Sobrien  assemble_integer (VALUE, SIZE, (SIZE) * BITS_PER_UNIT, 1)
34690075Sobrien
34790075Sobrien#ifdef REAL_VALUE_TYPE
34818334Speter/* Assemble the floating-point constant D into an object of size MODE.  */
34990075Sobrienextern void assemble_real		PARAMS ((REAL_VALUE_TYPE,
35090075Sobrien					         enum machine_mode,
35190075Sobrien						 unsigned));
35218334Speter#endif
35318334Speter#endif
35418334Speter
35518334Speter/* At the end of a function, forget the memory-constants
35618334Speter   previously made for CONST_DOUBLEs.  Mark them as not on real_constant_chain.
35718334Speter   Also clear out real_constant_chain and clear out all the chain-pointers.  */
35890075Sobrienextern void clear_const_double_mem	PARAMS ((void));
35918334Speter
36018334Speter/* Start deferring output of subconstants.  */
36190075Sobrienextern void defer_addressed_constants	PARAMS ((void));
36218334Speter
36318334Speter/* Stop deferring output of subconstants,
36418334Speter   and output now all those that have been deferred.  */
36590075Sobrienextern void output_deferred_addressed_constants PARAMS ((void));
36618334Speter
36718334Speter/* Return the size of the constant pool.  */
36890075Sobrienextern int get_pool_size		PARAMS ((void));
36918334Speter
37090075Sobrien#ifdef HAVE_peephole
37190075Sobrienextern rtx peephole			PARAMS ((rtx));
37290075Sobrien#endif
37390075Sobrien
37418334Speter#ifdef TREE_CODE
37518334Speter/* Write all the constants in the constant pool.  */
37690075Sobrienextern void output_constant_pool	PARAMS ((const char *, tree));
37718334Speter
37890075Sobrien/* Return nonzero if VALUE is a valid constant-valued expression
37990075Sobrien   for use in initializing a static variable; one that can be an
38090075Sobrien   element of a "constant" initializer.
38190075Sobrien
38290075Sobrien   Return null_pointer_node if the value is absolute;
38390075Sobrien   if it is relocatable, return the variable that determines the relocation.
38490075Sobrien   We assume that VALUE has been folded as much as possible;
38590075Sobrien   therefore, we do not need to check for such things as
38690075Sobrien   arithmetic-combinations of integers.  */
38790075Sobrienextern tree initializer_constant_valid_p	PARAMS ((tree, tree));
38890075Sobrien
38918334Speter/* Output assembler code for constant EXP to FILE, with no label.
39018334Speter   This includes the pseudo-op such as ".int" or ".byte", and a newline.
39118334Speter   Assumes output_addressed_constants has been done on EXP already.
39218334Speter
39318334Speter   Generate exactly SIZE bytes of assembler data, padding at the end
39490075Sobrien   with zeros if necessary.  SIZE must always be specified.
39590075Sobrien
39690075Sobrien   ALIGN is the alignment in bits that may be assumed for the data.  */
39790075Sobrienextern void output_constant		PARAMS ((tree, HOST_WIDE_INT,
39890075Sobrien						 unsigned int));
39918334Speter#endif
40018334Speter
40118334Speter#ifdef RTX_CODE
40218334Speter/* When outputting delayed branch sequences, this rtx holds the
40318334Speter   sequence being output.  It is null when no delayed branch
40418334Speter   sequence is being output, so it can be used as a test in the
40518334Speter   insn output code.
40618334Speter
40718334Speter   This variable is defined  in final.c.  */
40818334Speterextern rtx final_sequence;
40918334Speter#endif
41018334Speter
41190075Sobrien/* The line number of the beginning of the current function.  Various
41290075Sobrien   md code needs this so that it can output relative linenumbers.  */
41318334Speter
41490075Sobrien#ifdef SDB_DEBUGGING_INFO /* Avoid undef sym in certain broken linkers.  */
41590075Sobrienextern int sdb_begin_function_line;
41690075Sobrien#endif
41718334Speter
41890075Sobrien/* File in which assembler code is being written.  */
41918334Speter
42090075Sobrien#ifdef BUFSIZ
42190075Sobrienextern FILE *asm_out_file;
42290075Sobrien#endif
42318334Speter
42490075Sobrien/* The first global object in the file.  */
42590075Sobrienextern const char *first_global_object_name;
42618334Speter
42790075Sobrien/* The first weak object in the file.  */
42890075Sobrienextern const char *weak_global_object_name;
42918334Speter
43052284Sobrien/* Nonzero if function being compiled doesn't contain any calls
43152284Sobrien   (ignoring the prologue and epilogue).  This is set prior to
43252284Sobrien   local register allocation and is valid for the remaining
43390075Sobrien   compiler passes.  */
43452284Sobrien
43552284Sobrienextern int current_function_is_leaf;
43652284Sobrien
43790075Sobrien/* Nonzero if function being compiled doesn't contain any instructions
43890075Sobrien   that can throw an exception.  This is set prior to final.  */
43990075Sobrien
44090075Sobrienextern int current_function_nothrow;
44190075Sobrien
44252284Sobrien/* Nonzero if function being compiled doesn't modify the stack pointer
44352284Sobrien   (ignoring the prologue and epilogue).  This is only valid after
44490075Sobrien   life_analysis has run.  */
44552284Sobrien
44652284Sobrienextern int current_function_sp_is_unchanging;
44752284Sobrien
44852284Sobrien/* Nonzero if the function being compiled is a leaf function which only
44952284Sobrien   uses leaf registers.  This is valid after reload (specifically after
45052284Sobrien   sched2) and is useful only if the port defines LEAF_REGISTERS.  */
45152284Sobrien
45252284Sobrienextern int current_function_uses_only_leaf_regs;
45352284Sobrien
45452284Sobrien/* Default file in which to dump debug output.  */
45552284Sobrien
45652284Sobrien#ifdef BUFSIZ
45752284Sobrienextern FILE *rtl_dump_file;
45852284Sobrien#endif
45952284Sobrien
46090075Sobrien/* Nonnull if the insn currently being emitted was a COND_EXEC pattern.  */
46190075Sobrienextern struct rtx_def *current_insn_predicate;
46290075Sobrien
46390075Sobrien/* Last insn processed by final_scan_insn.  */
46490075Sobrienextern struct rtx_def *current_output_insn;
46590075Sobrien
46650397Sobrien/* Decide whether DECL needs to be in a writable section.  RELOC is the same
46750397Sobrien   as for SELECT_SECTION.  */
46850397Sobrien
46950397Sobrien#define DECL_READONLY_SECTION(DECL,RELOC)		\
47050397Sobrien  (TREE_READONLY (DECL)					\
47150397Sobrien   && ! TREE_THIS_VOLATILE (DECL)			\
47250397Sobrien   && DECL_INITIAL (DECL)				\
47350397Sobrien   && (DECL_INITIAL (DECL) == error_mark_node		\
47450397Sobrien       || TREE_CONSTANT (DECL_INITIAL (DECL)))		\
47550397Sobrien   && ! (RELOC && (flag_pic || DECL_ONE_ONLY (DECL))))
47652284Sobrien
47752284Sobrien/* User label prefix in effect for this compilation.  */
47852284Sobrienextern const char *user_label_prefix;
47952284Sobrien
48052284Sobrien/* This macro gets just the user-specified name
48152284Sobrien   out of the string in a SYMBOL_REF.  On most machines,
48252284Sobrien   we discard the * if any and that's all.  */
48352284Sobrien#ifndef STRIP_NAME_ENCODING
48452284Sobrien#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
48552284Sobrien  (VAR) = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*'))
48652284Sobrien#endif
48790075Sobrien/* Assign unique numbers to labels generated for profiling.  */
48890075Sobrien
48990075Sobrienextern int profile_label_no;
49090075Sobrien
49190075Sobrien/* Default target function prologue and epilogue assembler output.  */
49290075Sobrienextern void default_function_pro_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
49390075Sobrien
49490075Sobrien/* Tell assembler to switch to the section for the exception table.  */
49590075Sobrienextern void default_exception_section	PARAMS ((void));
49690075Sobrien
49790075Sobrien/* Tell assembler to switch to the section for the EH frames.  */
49890075Sobrienextern void default_eh_frame_section	PARAMS ((void));
49990075Sobrien
50090075Sobrien/* Default target hook that outputs nothing to a stream.  */
50190075Sobrienextern void no_asm_to_stream PARAMS ((FILE *));
50290075Sobrien
50390075Sobrien/* Flags controling properties of a section.  */
50490075Sobrien#define SECTION_ENTSIZE	 0x000ff	/* entity size in section */
50590075Sobrien#define SECTION_CODE	 0x00100	/* contains code */
50690075Sobrien#define SECTION_WRITE	 0x00200	/* data is writable */
50790075Sobrien#define SECTION_DEBUG	 0x00400	/* contains debug data */
50890075Sobrien#define SECTION_LINKONCE 0x00800	/* is linkonce */
50990075Sobrien#define SECTION_SMALL	 0x01000	/* contains "small data" */
51090075Sobrien#define SECTION_BSS	 0x02000	/* contains zeros only */
51190075Sobrien#define SECTION_FORGET	 0x04000	/* forget that we've entered the section */
51290075Sobrien#define SECTION_MERGE	 0x08000	/* contains mergeable data */
51390075Sobrien#define SECTION_STRINGS  0x10000	/* contains zero terminated strings without
51490075Sobrien					   embedded zeros */
51590075Sobrien#define SECTION_MACH_DEP 0x20000	/* subsequent bits reserved for target */
51690075Sobrien
51790075Sobrienextern unsigned int get_named_section_flags PARAMS ((const char *));
51890075Sobrienextern bool set_named_section_flags	PARAMS ((const char *, unsigned int));
51990075Sobrienextern void named_section_flags		PARAMS ((const char *, unsigned int));
52090075Sobrienextern bool named_section_first_declaration PARAMS((const char *));
52190075Sobrien
52290075Sobrienunion tree_node;
52390075Sobrienextern unsigned int default_section_type_flags PARAMS ((union tree_node *,
52490075Sobrien							const char *, int));
52590075Sobrien
52690075Sobrienextern void default_no_named_section PARAMS ((const char *, unsigned int));
52790075Sobrienextern void default_elf_asm_named_section PARAMS ((const char *, unsigned int));
52890075Sobrienextern void default_coff_asm_named_section PARAMS ((const char *,
52990075Sobrien						    unsigned int));
53090075Sobrienextern void default_pe_asm_named_section PARAMS ((const char *, unsigned int));
53190075Sobrien
53290075Sobrienextern void default_stabs_asm_out_destructor PARAMS ((struct rtx_def *, int));
53390075Sobrienextern void default_named_section_asm_out_destructor PARAMS ((struct rtx_def *,
53490075Sobrien							      int));
53590075Sobrienextern void default_dtor_section_asm_out_destructor PARAMS ((struct rtx_def *,
53690075Sobrien							     int));
53790075Sobrienextern void default_stabs_asm_out_constructor PARAMS ((struct rtx_def *, int));
53890075Sobrienextern void default_named_section_asm_out_constructor PARAMS ((struct rtx_def *,
53990075Sobrien							       int));
54090075Sobrienextern void default_ctor_section_asm_out_constructor PARAMS ((struct rtx_def *,
54190075Sobrien							      int));
54290075Sobrien
54390075Sobrien/* Emit data for vtable gc for GNU binutils.  */
54490075Sobrienextern void assemble_vtable_entry PARAMS ((struct rtx_def *, HOST_WIDE_INT));
54590075Sobrienextern void assemble_vtable_inherit PARAMS ((struct rtx_def *,
54690075Sobrien					     struct rtx_def *));
547