GCC Middle and Back End API Reference
output.h File Reference

Go to the source code of this file.

Data Structures

struct  section_common
struct  named_section
struct  unnamed_section
struct  noswitch_section
union  section

Typedefs

typedef void(* unnamed_section_callback )(const void *)
typedef bool(* noswitch_section_callback )(tree decl, const char *name, unsigned HOST_WIDE_INT size, unsigned HOST_WIDE_INT rounded)

Enumerations

enum  section_category {
  SECCAT_TEXT, SECCAT_RODATA, SECCAT_RODATA_MERGE_STR, SECCAT_RODATA_MERGE_STR_INIT,
  SECCAT_RODATA_MERGE_CONST, SECCAT_SRODATA, SECCAT_DATA, SECCAT_DATA_REL,
  SECCAT_DATA_REL_LOCAL, SECCAT_DATA_REL_RO, SECCAT_DATA_REL_RO_LOCAL, SECCAT_SDATA,
  SECCAT_TDATA, SECCAT_BSS, SECCAT_SBSS, SECCAT_TBSS
}

Functions

void init_final (const char *)
void app_enable (void)
void app_disable (void)
int dbr_sequence_length (void)
void init_insn_lengths (void)
int get_attr_length (rtx)
int get_attr_min_length (rtx)
void shorten_branches (rtx)
void final_start_function (rtx, FILE *, int)
void final_end_function (void)
void final (rtx, FILE *, int)
rtx final_scan_insn (rtx, FILE *, int, int, int *)
rtx alter_subreg (rtx *, bool)
void output_operand (rtx, int)
void output_operand_lossage (const char *,...) ATTRIBUTE_PRINTF_1
void output_asm_insn (const char *, rtx *)
int insn_current_reference_address (rtx)
int label_to_alignment (rtx)
int label_to_max_skip (rtx)
void output_asm_label (rtx)
void mark_symbol_refs_as_used (rtx)
void output_address (rtx)
void output_addr_const (FILE *, rtx)
void fprint_whex (FILE *, unsigned HOST_WIDE_INT)
void fprint_ul (FILE *, unsigned long)
int sprint_ul (char *, unsigned long)
void asm_fprintf (FILE *file, const char *p,...) ATTRIBUTE_ASM_FPRINTF(2
void int leaf_function_p (void)
int final_forward_branch_p (rtx)
int only_leaf_regs_used (void)
void leaf_renumber_regs_insn (rtx)
const char * get_insn_template (int, rtx)
void weak_finish (void)
int decode_reg_name (const char *)
int decode_reg_name_and_count (const char *, int *)
void do_assemble_alias (tree, tree)
void default_assemble_visibility (tree, int)
void assemble_asm (tree)
void assemble_start_function (tree, const char *)
void assemble_end_function (tree, const char *)
void assemble_variable (tree, int, int, int)
void assemble_vtv_preinit_initializer (tree)
void align_variable (tree decl, bool dont_output_data)
void assemble_external (tree)
void assemble_zeros (unsigned HOST_WIDE_INT)
void assemble_align (int)
void assemble_string (const char *, int)
void assemble_external_libcall (rtx)
void assemble_label (FILE *, const char *)
void assemble_name_raw (FILE *, const char *)
void assemble_name (FILE *, const char *)
const char * integer_asm_op (int, int)
void assemble_integer_with_op (const char *, rtx)
bool default_assemble_integer (rtx, unsigned int, int)
bool assemble_integer (rtx, unsigned, unsigned, int)
sectionget_named_text_section (tree, const char *, const char *)
void assemble_real (REAL_VALUE_TYPE, enum machine_mode, unsigned)
void assemble_addr_to_section (rtx, section *)
int get_pool_size (void)
rtx peephole (rtx)
void output_shared_constant_pool (void)
void output_object_blocks (void)
void output_quoted_string (FILE *, const char *)
void output_constant (tree, unsigned HOST_WIDE_INT, unsigned int)
bool decl_readonly_section (const_tree, int)
int compute_reloc_for_constant (tree)
void default_function_pro_epilogue (FILE *, HOST_WIDE_INT)
void default_function_switched_text_sections (FILE *, tree, bool)
void no_asm_to_stream (FILE *)
sectionget_unnamed_section (unsigned int, void(*)(const void *), const void *)
sectionget_section (const char *, unsigned int, tree)
sectionget_named_section (tree, const char *, int)
sectionget_variable_section (tree, bool)
void place_block_symbol (rtx)
rtx get_section_anchor (struct object_block *, HOST_WIDE_INT, enum tls_model)
sectionmergeable_constant_section (enum machine_mode, unsigned HOST_WIDE_INT, unsigned int)
sectionfunction_section (tree)
sectionunlikely_text_section (void)
sectioncurrent_function_section (void)
sectionget_cdtor_priority_section (int, bool)
bool unlikely_text_section_p (section *)
void switch_to_section (section *)
void output_section_asm_op (const void *)
void record_tm_clone_pair (tree, tree)
void finish_tm_clone_pairs (void)
tree get_tm_clone_pair (tree)
void default_asm_output_source_filename (FILE *, const char *)
void output_file_directive (FILE *, const char *)
unsigned int default_section_type_flags (tree, const char *, int)
bool have_global_bss_p (void)
bool bss_initializer_p (const_tree)
void default_no_named_section (const char *, unsigned int, tree)
void default_elf_asm_named_section (const char *, unsigned int, tree)
enum section_category categorize_decl_for_section (const_tree, int)
void default_coff_asm_named_section (const char *, unsigned int, tree)
void default_pe_asm_named_section (const char *, unsigned int, tree)
void default_named_section_asm_out_destructor (rtx, int)
void default_dtor_section_asm_out_destructor (rtx, int)
void default_named_section_asm_out_constructor (rtx, int)
void default_ctor_section_asm_out_constructor (rtx, int)
sectiondefault_select_section (tree, int, unsigned HOST_WIDE_INT)
sectiondefault_elf_select_section (tree, int, unsigned HOST_WIDE_INT)
void default_unique_section (tree, int)
sectiondefault_function_rodata_section (tree)
sectiondefault_no_function_rodata_section (tree)
sectiondefault_clone_table_section (void)
sectiondefault_select_rtx_section (enum machine_mode, rtx, unsigned HOST_WIDE_INT)
sectiondefault_elf_select_rtx_section (enum machine_mode, rtx, unsigned HOST_WIDE_INT)
void default_encode_section_info (tree, rtx, int)
const char * default_strip_name_encoding (const char *)
void default_asm_output_anchor (rtx)
bool default_use_anchors_for_symbol_p (const_rtx)
bool default_binds_local_p (const_tree)
bool default_binds_local_p_1 (const_tree, int)
void default_globalize_label (FILE *, const char *)
void default_globalize_decl_name (FILE *, tree)
void default_emit_unwind_label (FILE *, tree, int, int)
void default_emit_except_table_label (FILE *)
void default_generate_internal_label (char *, const char *, unsigned long)
void default_internal_label (FILE *, const char *, unsigned long)
void default_asm_declare_constant_name (FILE *, const char *, const_tree, HOST_WIDE_INT)
void default_file_start (void)
void file_end_indicate_exec_stack (void)
void file_end_indicate_split_stack (void)
void default_elf_asm_output_external (FILE *file, tree, const char *)
void default_elf_asm_output_limited_string (FILE *, const char *)
void default_elf_asm_output_ascii (FILE *, const char *, unsigned int)
void default_elf_internal_label (FILE *, const char *, unsigned long)
void default_elf_init_array_asm_out_constructor (rtx, int)
void default_elf_fini_array_asm_out_destructor (rtx, int)
int maybe_assemble_visibility (tree)
int default_address_cost (rtx, enum machine_mode, addr_space_t, bool)
void output_stack_usage (void)

Variables

rtx final_sequence
int sdb_begin_function_line
FILE * asm_out_file
const char * first_global_object_name
const char * weak_global_object_name
rtx current_insn_predicate
rtx current_output_insn
rtx this_is_asm_operands
int size_directive_output
tree last_assemble_variable_decl
bool first_function_block_is_cold
const char * user_label_prefix
sectiontext_section
sectiondata_section
sectionreadonly_data_section
sectionsdata_section
sectionctors_section
sectiondtors_section
sectionbss_section
sectionsbss_section
sectionexception_section
sectioneh_frame_section
sectiontls_comm_section
sectioncomm_section
sectionlcomm_section
sectionbss_noswitch_section
sectionin_section
bool in_cold_section_p

Typedef Documentation

typedef bool(* noswitch_section_callback)(tree decl, const char *name, unsigned HOST_WIDE_INT size, unsigned HOST_WIDE_INT rounded)
A callback that writes the assembly code for a decl in a
   SECTION_NOSWITCH section.  DECL is the decl that should be assembled
   and NAME is the name of its SYMBOL_REF.  SIZE is the size of the decl
   in bytes and ROUNDED is that size rounded up to the next
   BIGGEST_ALIGNMENT / BITS_PER_UNIT boundary.

   Return true if the callback used DECL_ALIGN to set the object's
   alignment.  A false return value implies that we are relying
   on the rounded size to align the decl.   
typedef void(* unnamed_section_callback)(const void *)
A callback that writes the assembly code for switching to an unnamed
   section.  The argument provides callback-specific data.   

Enumeration Type Documentation

A helper function for default_elf_select_section and
   default_elf_unique_section.  Categorizes the DECL.   
Enumerator:
SECCAT_TEXT 
SECCAT_RODATA 
SECCAT_RODATA_MERGE_STR 
SECCAT_RODATA_MERGE_STR_INIT 
SECCAT_RODATA_MERGE_CONST 
SECCAT_SRODATA 
SECCAT_DATA 
SECCAT_DATA_REL 
SECCAT_DATA_REL_LOCAL 
SECCAT_DATA_REL_RO 
SECCAT_DATA_REL_RO_LOCAL 
SECCAT_SDATA 
SECCAT_TDATA 
SECCAT_BSS 
SECCAT_SBSS 
SECCAT_TBSS 

Function Documentation

void align_variable ( tree  decl,
bool  dont_output_data 
)
Compute the alignment of variable specified by DECL.
   DONT_OUTPUT_DATA is from assemble_variable.   

Referenced by assemble_variable(), build_constant_desc(), get_block_for_decl(), and varpool_analyze_node().

rtx alter_subreg ( rtx ,
bool   
)
Replace a SUBREG with a REG or a MEM, based on the thing it is a
   subreg of.   
void app_disable ( void  )
Disable APP processing of subsequent output.
   Called from varasm.c before most kinds of output.   

References app_on, and asm_out_file.

Referenced by assemble_start_function(), assemble_variable(), final_end_function(), final_scan_insn(), and output_call_frame_info().

void app_enable ( void  )
Enable APP processing of subsequent output.
   Used before the output from an `asm' statement.   

References app_on, and asm_out_file.

Referenced by assemble_asm(), final_scan_insn(), and output_call_frame_info().

void asm_fprintf ( FILE *  file,
const char *  p,
  ... 
)
void assemble_asm ( tree  )
Output a string of literal assembler code
   for an `asm' keyword used between functions.   

Referenced by output_asm_statements(), and output_in_order().

void assemble_end_function ( tree  ,
const char *   
)
Output assembler code associated with defining the size of the
   function.  DECL describes the function.  NAME is the function's name.   

Referenced by expand_thunk(), and rest_of_handle_final().

void assemble_external ( tree  )
Queue for outputting something to declare an external symbol to the
   assembler.  (Most assemblers don't need this, so we normally output
   nothing.)  Do nothing if DECL is not external.   

Referenced by final_scan_insn(), mark_symbol_ref_as_used(), and output_addr_const().

void assemble_external_libcall ( rtx  )
bool assemble_integer ( rtx  ,
unsigned  ,
unsigned  ,
int   
)
void assemble_integer_with_op ( const char *  ,
rtx   
)
Use directive OP to assemble an integer object X.  Print OP at the
   start of the line, followed immediately by the value of X.   

Referenced by default_assemble_integer().

void assemble_label ( FILE *  ,
const char *   
)
Assemble a label named NAME.   

Referenced by default_asm_declare_constant_name().

void assemble_name ( FILE *  ,
const char *   
)
Like assemble_name_raw, but should be used when NAME might refer to
   an entity that is also represented as a tree (like a function or
   variable).  If NAME does refer to such an entity, that entity will
   be marked as referenced.   

Referenced by dbxout_stab_value_label(), dbxout_stab_value_label_diff(), default_assemble_visibility(), default_globalize_label(), dw2_asm_output_delta_sleb128(), dw2_asm_output_delta_uleb128(), output_addr_const(), output_asm_label(), and sdbout_end_epilogue().

void assemble_name_raw ( FILE *  ,
const char *   
)
Output to FILE (an assembly file) a reference to NAME.  If NAME
   starts with a *, the rest of NAME is output verbatim.  Otherwise
   NAME is transformed in a target-specific way (usually by the
   addition of an underscore).   

Referenced by assemble_name().

void assemble_real ( REAL_VALUE_TYPE  ,
enum  machine_mode,
unsigned   
)
Assemble the floating-point constant D into an object of size MODE.   

Referenced by output_constant(), and output_constant_pool_2().

void assemble_start_function ( tree  ,
const char *   
)
Output assembler code for the constant pool of a function and associated
   with defining the name of the function.  DECL describes the function.
   NAME is the function's name.  For the constant pool, we use the current
   constant pool data.   

Referenced by expand_thunk(), and rest_of_handle_final().

void assemble_string ( const char *  ,
int   
)
Assemble a string constant with the specified C string as contents.   

Referenced by lhd_append_data(), output_constant(), output_index_string(), and output_indirect_string().

void assemble_variable ( tree  decl,
int  top_level,
int  at_end,
int  dont_output_data 
)
Assemble everything that is needed for a variable or function declaration.
   Not used for automatic variables, and not used for function definitions.
   Should not be called for variables of incomplete structure type.

   TOP_LEVEL is nonzero if this variable has file scope.
   AT_END is nonzero if this is the special handling, at end of compilation,
   to define things that have had only tentative definitions.
   DONT_OUTPUT_DATA if nonzero means don't actually output the
   initial value (that will be done by the caller).   

References align_variable(), app_disable(), asan_protect_global(), asan_red_zone_size(), asm_out_file, assemble_noswitch_variable(), assemble_variable_contents(), assemble_zeros(), named_section::common, section::common, error(), section_common::flags, floor_log2(), get_variable_align(), get_variable_section(), globalize_decl(), layout_decl(), maybe_assemble_visibility(), named_section::name, section::named, notice_global_symbol(), output_addressed_constants(), output_constant_def_contents(), place_block_symbol(), set_mem_align(), switch_to_section(), targetm, tree_low_cst(), and valid_constant_size_p().

Referenced by dw2_output_indirect_constant_1(), and varpool_assemble_decl().

void assemble_vtv_preinit_initializer ( tree  )
Put the vtable verification constructor initialization function
   into the preinit array.   
bool bss_initializer_p ( const_tree  )
int compute_reloc_for_constant ( tree  )
This can be used to compute RELOC for the function above, when
   given a constant expression.   

Referenced by compute_reloc_for_constant(), get_constant_section(), and get_variable_section().

section* current_function_section ( void  )
int dbr_sequence_length ( void  )
Return the number of slots filled in the current
   delayed branch sequence (we don't count the insn needing the
   delay slot).   Zero if not in a delayed branch sequence.   

References final_sequence.

bool decl_readonly_section ( const_tree  ,
int   
)
Decide whether DECL needs to be in a writable section.
   RELOC is the same as for SELECT_SECTION.   

Referenced by default_select_section(), noce_mem_write_may_trap_or_fault_p(), and readonly_data_expr().

int decode_reg_name ( const char *  )
Decode an `asm' spec for a declaration as a register name.
   Return the register number, or -1 if nothing specified,
   or -2 if the ASMSPEC is not `cc' or `memory' and is not recognized,
   or -3 if ASMSPEC is `cc' and is not recognized,
   or -4 if ASMSPEC is `memory' and is not recognized.
   Accept an exact spelling or a decimal number.
   Prefixes such as % are optional.   

Referenced by handle_common_deferred_options(), and make_decl_rtl().

int decode_reg_name_and_count ( const char *  ,
int *   
)
Similar to decode_reg_name, but takes an extra parameter that is a
   pointer to the number of (internal) registers described by the
   external name.   

Referenced by decode_reg_name(), expand_asm_operands(), and fix_register().

int default_address_cost ( rtx  ,
enum  machine_mode,
addr_space_t  ,
bool   
)
void default_asm_declare_constant_name ( FILE *  file,
const char *  name,
const_tree  exp,
HOST_WIDE_INT  size 
)
The default implementation of ASM_DECLARE_CONSTANT_NAME.   

References assemble_label().

void default_asm_output_anchor ( rtx  )
void default_asm_output_source_filename ( FILE *  ,
const char *   
)
bool default_assemble_integer ( rtx  x,
unsigned int  size,
int  aligned_p 
)
The default implementation of the asm_out.integer target hook.   

References assemble_integer_with_op(), and integer_asm_op().

void default_assemble_visibility ( tree  decl,
int  vis 
)
Emit an assembler directive to set symbol for DECL visibility to
   the visibility type VIS, which must not be VISIBILITY_DEFAULT.   

References asm_out_file, assemble_name(), type(), and warning().

bool default_binds_local_p ( const_tree  )
bool default_binds_local_p_1 ( const_tree  ,
int   
)

Referenced by default_binds_local_p().

section* default_clone_table_section ( void  )
Provide a default for the tm_clone_table section.   

References get_named_section().

void default_coff_asm_named_section ( const char *  ,
unsigned  int,
tree   
)

References asm_out_file.

Referenced by default_pe_asm_named_section().

void default_ctor_section_asm_out_constructor ( rtx  ,
int   
)
void default_dtor_section_asm_out_destructor ( rtx  ,
int   
)
void default_elf_asm_named_section ( const char *  ,
unsigned  int,
tree   
)

References asm_out_file, and type().

void default_elf_asm_output_ascii ( FILE *  ,
const char *  ,
unsigned  int 
)
void default_elf_asm_output_external ( FILE *  file,
tree  decl,
const char *  name 
)
Emit text to declare externally defined symbols. It is needed to
   properly support non-default visibility.   

References maybe_assemble_visibility(), and targetm.

void default_elf_asm_output_limited_string ( FILE *  ,
const char *   
)
void default_elf_fini_array_asm_out_destructor ( rtx  ,
int   
)
void default_elf_init_array_asm_out_constructor ( rtx  ,
int   
)
void default_elf_internal_label ( FILE *  ,
const char *  ,
unsigned  long 
)
section* default_elf_select_rtx_section ( enum  machine_mode,
rtx  ,
unsigned  HOST_WIDE_INT 
)
void default_emit_except_table_label ( FILE *  )
void default_emit_unwind_label ( FILE *  stream,
tree  decl,
int  for_eh,
int  empty 
)
Default function to output a label for unwind information.  The
   default is to do nothing.  A target that needs nonlocal labels for
   unwind information must provide its own function to do this.   
void default_encode_section_info ( tree  ,
rtx  ,
int   
)
void default_file_start ( void  )
This is the default behavior at the beginning of a file.  It's
   controlled by two other target-hook toggles.   

References asm_out_file, output_file_directive(), and targetm.

void default_function_pro_epilogue ( FILE *  file,
HOST_WIDE_INT  size 
)
Default target function prologue and epilogue assembler output.   
Default target function prologue and epilogue assembler output.

   If not overridden for epilogue code, then the function body itself
   contains return instructions wherever needed.   

Referenced by final_start_function().

section* default_function_rodata_section ( tree  )
void default_function_switched_text_sections ( FILE *  ,
tree  ,
bool   
)
Default target function switched text sections.   
void default_generate_internal_label ( char *  buf,
const char *  prefix,
unsigned long  labelno 
)
This is how to output an internal numbered label where PREFIX is
   the class of label and LABELNO is the number within the class.   
void default_globalize_decl_name ( FILE *  ,
tree   
)
void default_globalize_label ( FILE *  ,
const char *   
)
void default_internal_label ( FILE *  stream,
const char *  prefix,
unsigned long  labelno 
)
This is how to output an internal numbered label where PREFIX is
   the class of label and LABELNO is the number within the class.   

References strlen().

void default_named_section_asm_out_constructor ( rtx  ,
int   
)
void default_named_section_asm_out_destructor ( rtx  ,
int   
)
section* default_no_function_rodata_section ( tree  )
void default_no_named_section ( const char *  name,
unsigned int  flags,
tree  decl 
)
Output assembly to switch to section NAME with attribute FLAGS.
   Four variants for common object file formats.   
void default_pe_asm_named_section ( const char *  ,
unsigned  int,
tree   
)
unsigned int default_section_type_flags ( tree  ,
const char *  ,
int   
)
section* default_select_rtx_section ( enum  machine_mode,
rtx  ,
unsigned  HOST_WIDE_INT 
)
section* default_select_section ( tree  decl,
int  reloc,
unsigned HOST_WIDE_INT  align 
)
The lame default section selector.   

References data_section, decl_readonly_section(), and readonly_data_section.

const char* default_strip_name_encoding ( const char *  )
void default_unique_section ( tree  ,
int   
)
bool default_use_anchors_for_symbol_p ( const_rtx  )
void do_assemble_alias ( tree  ,
tree   
)
void file_end_indicate_exec_stack ( void  )
void file_end_indicate_split_stack ( void  )
Emit a special section directive to indicate that this object file
   was compiled with -fsplit-stack.  This is used to let the linker
   detect calls between split-stack code and non-split-stack code, so
   that it can modify the split-stack code to allocate a sufficiently
   large stack.  We emit another special section if there are any
   functions in this file which have the no_split_stack attribute, to
   prevent the linker from warning about being unable to convert the
   functions if they call non-split-stack code.   

References get_section(), and switch_to_section().

void final ( rtx  ,
FILE *  ,
int   
)
Output assembler code for some insns: all or part of a function.   
void final_end_function ( void  )
Output assembler code for the end of a function.
   For clarity, args are same as those of `final_start_function'
   even though not all of them are needed.   

References app_disable(), asm_out_file, current_function_decl, debug_hooks, dwarf2_debug_info_emitted_p(), dwarf2out_do_frame(), dwarf2out_end_epilogue(), gcc_debug_hooks::end_epilogue, gcc_debug_hooks::end_function, get_frame_size(), high_function_linenum, last_filename, last_linenum, and targetm.

Referenced by rest_of_handle_final().

int final_forward_branch_p ( rtx  )
Return 1 if branch is a forward branch.
   Uses insn_shuid array, so it works only in the final pass.  May be used by
   output templates to add branch prediction hints, for example.   
rtx final_scan_insn ( rtx  insn,
FILE *  file,
int  optimize_p,
int  nopeepholes,
int *  seen 
)
The final scan for one insn, INSN.  Args are same as in `final', except
   that INSN is the insn being scanned.  Value returned is the next insn to
   be scanned.   
The final scan for one insn, INSN.
   Args are same as in `final', except that INSN
   is the insn being scanned.
   Value returned is the next insn to be scanned.

   NOPEEPHOLES is the flag to disallow peephole processing (currently
   used for within delayed branch sequence output).

   SEEN is used to track the end of the prologue, for emitting
   debug information.  We force the emission of a line note after
   both NOTE_INSN_PROLOGUE_END and NOTE_INSN_FUNCTION_BEG, or
   at the beginning of the second basic block, whichever comes
   first.   

References alter_cond(), alter_subreg(), app_disable(), app_enable(), asm_noperands(), asm_out_file, assemble_external(), gcc_debug_hooks::begin_block, gcc_debug_hooks::begin_epilogue, block_depth, block_nonartificial_location(), call_from_call_insn(), cc0_rtx, cc_status, cleanup_subreg_operands(), const_true_rtx, constrain_operands_cached(), current_function_decl, current_function_section(), current_insn_predicate, current_output_insn, DBX_DEBUG, debug_hooks, debug_insn, decode_asm_operands(), delete_insn(), DINFO_LEVEL_NORMAL, DINFO_LEVEL_VERBOSE, discriminator, dump_flags, dump_insn_slim(), DWARF2_DEBUG, dwarf2out_do_frame(), dwarf2out_emit_cfi(), dwarf2out_switch_text_section(), gcc_debug_hooks::end_block, gcc_debug_hooks::end_prologue, exact_log2(), expand_location(), final_scan_insn(), final_sequence, find_reg_note(), CC_STATUS::flags, force_source_line, get_insn_template(), high_block_linenum, in_cold_section_p, insn_code_number, insn_counter, insn_noperands, gcc_debug_hooks::label, last_discriminator, last_filename, last_ignored_compare, last_linenum, recog_data_d::n_operands, need_profile_function, debug_prefix_map::next, next_nonnote_insn(), notice_source_line(), recog_data_d::operand, output_alternate_entry_point(), output_asm_insn(), override_filename, override_linenum, pc_rtx, peephole(), prev_nonnote_insn(), print_rtl_single(), print_rtx_head, profile_after_prologue(), profile_function(), recog_data, recog_memoized(), rtx_equal_p(), SDB_DEBUG, SET, gcc_debug_hooks::source_line, gcc_debug_hooks::switch_text_section, switch_to_section(), targetm, this_is_asm_operands, try_split(), validate_change(), CC_STATUS::value1, CC_STATUS::value2, gcc_debug_hooks::var_location, VMS_AND_DWARF2_DEBUG, VMS_DEBUG, and volatile_refs_p().

Referenced by final(), and final_scan_insn().

void final_start_function ( rtx  first,
FILE *  file,
int  optimize_p 
)
Output assembler code for the start of a function,
   and initialize some of the variables in this file
   for the new function.  The label for the function and associated
   assembler pseudo-ops have already been output in
   `assemble_start_function'.   
Output assembler code for the start of a function,
   and initialize some of the variables in this file
   for the new function.  The label for the function and associated
   assembler pseudo-ops have already been output in `assemble_start_function'.

   FIRST is the first insn of the rtl for the function being compiled.
   FILE is the file to write assembler code to.
   OPTIMIZE_P is nonzero if we should eliminate redundant
     test and compare insns.   

References gcc_debug_hooks::begin_prologue, block_depth, current_function_decl, debug_hooks, default_function_pro_epilogue(), discriminator, dwarf2_debug_info_emitted_p(), dwarf2out_begin_prologue(), get_frame_size(), HAVE_prologue, high_block_linenum, high_function_linenum, last_discriminator, last_filename, last_linenum, leaf_renumber_regs(), need_profile_function, number_blocks(), profile_after_prologue(), profile_function(), prologue_location, reemit_insn_block_notes(), targetm, this_is_asm_operands, and warning().

Referenced by rest_of_handle_final().

void finish_tm_clone_pairs ( void  )
void fprint_ul ( FILE *  ,
unsigned  long 
)
void fprint_whex ( FILE *  ,
unsigned  HOST_WIDE_INT 
)
int get_attr_length ( rtx  )
Obtain the current length of an insn.  If branch shortening has been done,
   get its actual length.  Otherwise, get its maximum length.   
int get_attr_min_length ( rtx  )
Obtain the current length of an insn.  If branch shortening has been done,
   get its actual length.  Otherwise, get its minimum length.   
section* get_cdtor_priority_section ( int  ,
bool   
)
Return the numbered .ctors.N (if CONSTRUCTOR_P) or .dtors.N (if
   not) section for PRIORITY.   

Referenced by default_named_section_asm_out_constructor(), and default_named_section_asm_out_destructor().

const char* get_insn_template ( int  ,
rtx   
)
Locate the proper template for the given insn-code.   
section* get_named_text_section ( tree  decl,
const char *  text_section_name,
const char *  named_section_suffix 
)
Return section for TEXT_SECITON_NAME if DECL or DECL_SECTION_NAME (DECL)
   is NULL.   
Return section for TEXT_SECTION_NAME if DECL or DECL_SECTION_NAME (DECL)
   is NULL.

   When DECL_SECTION_NAME is non-NULL and it is implicit section and
   NAMED_SECTION_SUFFIX is non-NULL, then produce section called
   concatenate the name with NAMED_SECTION_SUFFIX.
   Otherwise produce "TEXT_SECTION_NAME.IMPLICIT_NAME".   

References buffer, get_named_section(), memcpy(), and targetm.

Referenced by default_function_section().

int get_pool_size ( void  )
Return the size of the constant pool.   
rtx get_section_anchor ( struct object_block block,
HOST_WIDE_INT  offset,
enum tls_model  model 
)
Return the anchor that should be used to address byte offset OFFSET
   from the first object in BLOCK.  MODEL is the TLS model used
   to access it.   

References anchor_labelno, object_block::anchors, create_block_symbol(), HOST_WIDE_INT, offset, ptr_mode, targetm, vec_safe_insert(), and vec_safe_length().

Referenced by use_anchored_address().

tree get_tm_clone_pair ( tree  )
section* get_unnamed_section ( unsigned int  flags,
void(*)(const void *)  callback,
const void *  data 
)
section* get_variable_section ( tree  ,
bool   
)
bool have_global_bss_p ( void  )
Return true if the target supports some form of global BSS,
   either through bss_noswitch_section, or by selecting a BSS
   section in TARGET_ASM_SELECT_SECTION.   

References targetm.

void init_final ( const char *  )
Initialize data in final at the beginning of a compilation.   
void init_insn_lengths ( void  )
Indicate that branch shortening hasn't yet been done.   

References free(), insn_lengths, insn_lengths_max_uid, uid_align, and uid_shuid.

Referenced by expand_thunk(), and rest_of_clean_state().

int insn_current_reference_address ( rtx  )
Compute a worst-case reference address of a branch so that it
   can be safely used in the presence of aligned labels.
   Defined in final.c.   
const char* integer_asm_op ( int  ,
int   
)
Return the assembler directive for creating a given kind of integer
   object.  SIZE is the number of bytes in the object and ALIGNED_P
   indicates whether it is known to be aligned.  Return NULL if the
   assembly dialect has no such directive.

   The returned string should be printed at the start of a new line and
   be followed immediately by the object's initial value.   

Referenced by default_assemble_integer(), dw2_asm_output_data(), and dw2_assemble_integer().

int label_to_alignment ( rtx  )
Find the alignment associated with a CODE_LABEL.
   Defined in final.c.   
int label_to_max_skip ( rtx  )
Find the alignment maximum skip associated with a CODE_LABEL.
   Defined in final.c.   
void int leaf_function_p ( void  )
Return nonzero if this function has no function calls.   

References get_insns().

Referenced by ira(), and rest_of_handle_check_leaf_regs().

void leaf_renumber_regs_insn ( rtx  )
Scan IN_RTX and its subexpressions, and renumber all regs into those
   available in leaf functions.   
void mark_symbol_refs_as_used ( rtx  )
Marks SYMBOL_REFs in x as referenced through use of assemble_external.   
section* mergeable_constant_section ( enum machine_mode  mode,
unsigned HOST_WIDE_INT  align,
unsigned int  flags 
)
Return the section to use for constant merging.   

References get_section(), readonly_data_section, strlen(), and targetm.

Referenced by default_elf_select_rtx_section(), and default_elf_select_section().

void no_asm_to_stream ( FILE *  )
Default target hook that outputs nothing to a stream.   
int only_leaf_regs_used ( void  )
Return 1 if this function uses only the registers that can be
   safely renumbered.   
On some machines, a function with no call insns
   can run faster if it doesn't create its own register window.
   When output, the leaf function should use only the "output"
   registers.  Ordinarily, the function would be compiled to use
   the "input" registers to find its arguments; it is a candidate
   for leaf treatment if it uses only the "input" registers.
   Leaf function treatment means renumbering so the function
   uses the "output" registers instead.   
Return 1 if this function uses only the registers that can be
   safely renumbered.   

References df_regs_ever_live_p(), and global_regs.

Referenced by rest_of_handle_check_leaf_regs().

void output_addr_const ( FILE *  ,
rtx   
)
Print an integer constant expression in assembler syntax.
   Addition and subtraction are the only arithmetic
   that may appear in these expressions.   
void output_address ( rtx  )
Print a memory reference operand for address X
   using machine-dependent assembler syntax.   
void output_asm_insn ( const char *  ,
rtx  
)
Output a string of assembler code, substituting insn operands.
   Defined in final.c.   
void output_asm_label ( rtx  )
Output a LABEL_REF, or a bare CODE_LABEL, as an assembler symbol.   
void output_constant ( tree  ,
unsigned  HOST_WIDE_INT,
unsigned  int 
)
Output assembler code for constant EXP to FILE, with no label.
   This includes the pseudo-op such as ".int" or ".byte", and a newline.
   Assumes output_addressed_constants has been done on EXP already.

   Generate exactly SIZE bytes of assembler data, padding at the end
   with zeros if necessary.  SIZE must always be specified.

   ALIGN is the alignment in bits that may be assumed for the data.   

Referenced by assemble_constant_contents(), assemble_variable_contents(), output_constant(), output_constructor_array_range(), and output_constructor_regular_field().

void output_file_directive ( FILE *  ,
const char *   
)

Referenced by default_file_start().

void output_object_blocks ( void  )
Output the definitions of all object_blocks.   

References object_block_htab, and output_object_block_htab().

Referenced by compile_file().

void output_operand ( rtx  ,
int   
)
Print an operand using machine-dependent assembler syntax.   
void output_operand_lossage ( const char *  ,
  ... 
)
Report inconsistency between the assembler template and the operands.
   In an `asm', it's the user's fault; otherwise, the compiler's fault.   
void output_quoted_string ( FILE *  ,
const char *   
)
void output_section_asm_op ( const void *  )

Referenced by init_varasm_once().

void output_shared_constant_pool ( void  )
Write the contents of the shared constant pool.   

References output_constant_pool_contents(), and shared_constant_pool.

Referenced by compile_file().

void output_stack_usage ( void  )
rtx peephole ( rtx  )

Referenced by final_scan_insn().

void record_tm_clone_pair ( tree  ,
tree   
)
void shorten_branches ( rtx  )
Make a pass over all insns and compute their actual lengths by shortening
   any branches of variable length if possible.   
int sprint_ul ( char *  ,
unsigned  long 
)
section* unlikely_text_section ( void  )
Tell assembler to switch to unlikely-to-be-executed text section.   

References current_function_decl, and function_section_1().

Referenced by assemble_end_function(), assemble_start_function(), and dwarf2out_begin_function().

bool unlikely_text_section_p ( section )
void weak_finish ( void  )
Functions in varasm.c.   
Emit any pending weak declarations.   
Emit any pending weak declarations.   

References asm_out_file, find_decl(), ultimate_transparent_alias_target(), weak_decls, and weak_finish_1().

Referenced by compile_file().


Variable Documentation

FILE* asm_out_file
File in which assembler code is being written.   

Referenced by app_disable(), app_enable(), asm_fprintf(), assemble_align(), assemble_asm(), assemble_constant_contents(), assemble_end_function(), assemble_external(), assemble_external_real(), assemble_integer_with_op(), assemble_start_function(), assemble_static_space(), assemble_string(), assemble_trampoline_template(), assemble_variable(), assemble_variable_contents(), assemble_zeros(), crash_signal(), dbxout_begin_block(), dbxout_begin_complex_stabs(), dbxout_begin_complex_stabs_noforcetext(), dbxout_begin_empty_stabs(), dbxout_begin_prologue(), dbxout_begin_simple_stabs(), dbxout_begin_simple_stabs_desc(), dbxout_begin_stabn(), dbxout_begin_stabn_sline(), dbxout_end_block(), dbxout_finish(), dbxout_finish_complex_stabs(), dbxout_function_end(), dbxout_init(), dbxout_int(), dbxout_source_line(), dbxout_stab_value_internal_label(), dbxout_stab_value_internal_label_diff(), dbxout_stab_value_label(), dbxout_stab_value_label_diff(), dbxout_stab_value_zero(), dbxout_stabd(), dbxout_symbol_location(), default_asm_output_anchor(), default_asm_output_ident_directive(), default_assemble_visibility(), default_coff_asm_named_section(), default_elf_asm_named_section(), default_external_libcall(), default_file_start(), default_pe_asm_named_section(), do_assemble_alias(), do_assembler_dialects(), dump_basic_block_info(), dw2_asm_output_addr(), dw2_asm_output_addr_rtx(), dw2_asm_output_data(), dw2_asm_output_data_raw(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_sleb128_raw(), dw2_asm_output_data_uleb128(), dw2_asm_output_data_uleb128_raw(), dw2_asm_output_delta(), dw2_asm_output_delta_sleb128(), dw2_asm_output_delta_uleb128(), dw2_asm_output_encoded_addr_rtx(), dw2_asm_output_nstring(), dw2_asm_output_offset(), dw2_asm_output_pcrel(), dw2_asm_output_vms_delta(), dw2_assemble_integer(), dwarf2out_assembly_start(), dwarf2out_begin_block(), dwarf2out_begin_function(), dwarf2out_begin_prologue(), dwarf2out_do_cfi_startproc(), dwarf2out_emit_cfi(), dwarf2out_end_block(), dwarf2out_end_epilogue(), dwarf2out_finish(), dwarf2out_init(), dwarf2out_source_line(), dwarf2out_switch_text_section(), dwarf2out_var_location(), dwarf2out_vms_begin_epilogue(), dwarf2out_vms_end_prologue(), elf_record_gcc_switches(), emit_bss(), emit_common(), emit_local(), emit_tls_common(), expand_thunk(), final_end_function(), final_scan_insn(), globalize_decl(), make_decl_rtl(), maybe_emit_file(), output_addr_table_entry(), output_address(), output_asm_insn(), output_asm_label(), output_asm_name(), output_asm_operand_names(), output_call_frame_info(), output_cfa_loc_raw(), output_cfi_directive(), output_comp_unit(), output_constant(), output_constant_def_contents(), output_constant_pool(), output_constant_pool_1(), output_constructor(), output_die(), output_die_symbol(), output_fde(), output_function_exception_table(), output_indirect_string(), output_line_info(), output_loc_list(), output_loc_operands(), output_loc_operands_raw(), output_loc_sequence_raw(), output_macinfo(), output_macinfo_op(), output_one_function_exception_table(), output_operand(), output_section_asm_op(), output_skeleton_debug_sections(), rest_of_decl_compilation(), rest_of_handle_final(), switch_to_eh_frame_section(), vmsdbgout_begin_block(), vmsdbgout_begin_epilogue(), vmsdbgout_begin_prologue(), vmsdbgout_end_block(), vmsdbgout_end_epilogue(), vmsdbgout_end_prologue(), vmsdbgout_finish(), vmsdbgout_write_source_line(), weak_finish(), weak_finish_1(), write_debug_addr(), write_debug_data1(), write_debug_data2(), write_debug_data4(), write_debug_data8(), write_debug_delta4(), write_debug_header(), write_debug_string(), write_pclines(), xcoffout_begin_block(), xcoffout_begin_prologue(), xcoffout_end_block(), xcoffout_end_epilogue(), xcoffout_end_function(), and xcoffout_source_line().

section* bss_noswitch_section
A SECTION_NOSWITCH section used for declaring global BSS variables.
   May be null.   

Referenced by get_variable_section().

section* bss_section
section* comm_section

Referenced by get_variable_section().

section* ctors_section
rtx current_insn_predicate
Nonnull if the insn currently being emitted was a COND_EXEC pattern.   

Referenced by final_scan_insn().

rtx current_output_insn
Last insn processed by final_scan_insn.   

Referenced by final_scan_insn().

section* dtors_section
section* eh_frame_section
The section that holds the DWARF2 frame unwind information, when known.
   The section is set either by the target's init_sections hook or by the
   first call to switch_to_eh_frame_section.   

Referenced by switch_to_eh_frame_section().

section* exception_section
The section that holds the main exception table, when known.  The section
   is set either by the target's init_sections hook or by the first call to
   switch_to_exception_section.   

Referenced by switch_to_exception_section().

rtx final_sequence
When outputting delayed branch sequences, this rtx holds the
   sequence being output.  It is null when no delayed branch
   sequence is being output, so it can be used as a test in the
   insn output code.

   This variable is defined  in final.c.   
If we are outputting an insn sequence, this contains the sequence rtx.
   Zero otherwise.   

Referenced by dbr_sequence_length(), final_scan_insn(), and init_final().

bool first_function_block_is_cold
The following global variable indicates if the first basic block
   in a function belongs to the cold partition or not.   

Referenced by assemble_start_function(), decide_function_section(), and dw2_output_call_site_table().

const char * first_global_object_name
The first global object in the file.   

Referenced by coverage_compute_profile_id(), get_file_function_name(), and notice_global_symbol().

bool in_cold_section_p
True if code for the current function is currently being directed
   at the cold section.   

Referenced by dwarf2out_switch_text_section(), dwarf2out_var_location(), final_scan_insn(), secname_for_decl(), and set_cur_line_info_table().

section* in_section
asm_out_file's current section.  This is NULL if no section has yet
   been selected or if we lose track of what the current section is.   

Referenced by assemble_end_function(), and lhd_begin_section().

tree last_assemble_variable_decl
The last decl for which assemble_variable was called,
   if it did ASM_DECLARE_OBJECT_NAME.
   If the last call to assemble_variable didn't do that,
   this holds 0.   

Referenced by rest_of_decl_compilation().

section* lcomm_section

Referenced by get_variable_section().

section* sbss_section
section* sdata_section
int sdb_begin_function_line
The line number of the beginning of the current function.  Various
   md code needs this so that it can output relative linenumbers.   
Line number of beginning of current function, minus one.
   Negative means not in a function or not using sdb.   
int size_directive_output
Carry information from ASM_DECLARE_OBJECT_NAME
   to ASM_FINISH_DECLARE_OBJECT.   
rtx this_is_asm_operands
Nonzero while outputting an `asm' with operands.
   This means that inconsistencies are the user's fault, so don't die.
   The precise value is the insn being output, to pass to error_for_asm.   

Referenced by crash_signal(), final_scan_insn(), final_start_function(), output_asm_insn(), and output_operand_lossage().

section* tls_comm_section
Various forms of common section.  All are guaranteed to be nonnull.   

Referenced by get_variable_section().

const char* user_label_prefix
User label prefix in effect for this compilation.   

Referenced by asm_fprintf(), crash_signal(), decl_assembler_name_equal(), decl_assembler_name_hash(), and default_mangle_assembler_name().

const char * weak_global_object_name
The first weak object in the file.   

Referenced by get_file_function_name(), and notice_global_symbol().