GCC Middle and Back End API Reference
varasm.c File Reference

Data Structures

struct  addr_const
struct  rtx_constant_pool
struct  constant_descriptor_rtx
struct  oc_outer_state
struct  oc_local_state
struct  tm_alias_pair

Typedefs

typedef struct tm_alias_pair tm_alias_pair

Functions

static const char * strip_reg_name (const char *)
static int contains_pointers_p (tree)
static bool incorporeal_function_p (tree)
static void decode_addr_const (tree, struct addr_const *)
static hashval_t const_desc_hash (const void *)
static int const_desc_eq (const void *, const void *)
static hashval_t const_hash_1 (const tree)
static int compare_constant (const tree, const tree)
static tree copy_constant (tree)
static void output_constant_def_contents (rtx)
static void output_addressed_constants (tree)
static unsigned HOST_WIDE_INT array_size_for_constructor (tree)
static unsigned min_align (unsigned, unsigned)
static void globalize_decl (tree)
static bool decl_readonly_section_1 (enum section_category)
static void asm_output_aligned_bss (FILE *, tree, const char *, unsigned HOST_WIDE_INT, int)
static void mark_weak (tree)
static void output_constant_pool (const char *, tree)
static int section_entry_eq ()
static hashval_t section_entry_hash ()
static hashval_t hash_section ()
static int object_block_entry_eq ()
static hashval_t object_block_entry_hash ()
sectionget_unnamed_section (unsigned int flags, void(*callback)(const void *), const void *data)
static sectionget_noswitch_section ()
sectionget_section ()
static bool use_object_blocks_p ()
static struct object_blockget_block_for_section ()
static rtx create_block_symbol (const char *label, struct object_block *block, HOST_WIDE_INT offset)
sectionget_named_section ()
void resolve_unique_section (tree decl, int reloc, int flag_function_or_data_sections)
static sectionhot_function_section ()
sectionget_named_text_section (tree decl, const char *text_section_name, const char *named_section_suffix)
sectiondefault_function_section (tree decl, enum node_frequency freq, bool startup, bool exit)
static sectionfunction_section_1 ()
sectionfunction_section ()
sectioncurrent_function_section ()
sectionunlikely_text_section ()
bool unlikely_text_section_p ()
sectiondefault_function_rodata_section ()
sectiondefault_no_function_rodata_section ()
static sectionmergeable_string_section (tree decl, unsigned HOST_WIDE_INT align, unsigned int flags)
sectionmergeable_constant_section (enum machine_mode mode, unsigned HOST_WIDE_INT align, unsigned int flags)
static const char * strip_reg_name ()
void set_user_assembler_name ()
int decode_reg_name_and_count ()
int decode_reg_name ()
bool bss_initializer_p ()
void align_variable ()
static unsigned int get_variable_align ()
sectionget_variable_section ()
static struct object_blockget_block_for_decl ()
static void change_symbol_block ()
static bool use_blocks_for_decl_p ()
void make_decl_rtl ()
rtx make_decl_rtl_for_debug ()
void assemble_asm ()
void assemble_addr_to_section ()
sectionget_cdtor_priority_section ()
void default_named_section_asm_out_destructor ()
void default_dtor_section_asm_out_destructor (rtx symbol, int priority)
void default_named_section_asm_out_constructor ()
void default_ctor_section_asm_out_constructor (rtx symbol, int priority)
void notice_global_symbol ()
void decide_function_section ()
void assemble_start_function ()
void assemble_end_function ()
void assemble_zeros ()
void assemble_align ()
void assemble_string ()
static bool emit_local (tree decl, const char *name, unsigned HOST_WIDE_INT size, unsigned HOST_WIDE_INT rounded)
static bool emit_bss (tree decl, const char *name, unsigned HOST_WIDE_INT size, unsigned HOST_WIDE_INT rounded)
static bool emit_common (tree decl, const char *name, unsigned HOST_WIDE_INT size, unsigned HOST_WIDE_INT rounded)
static bool emit_tls_common (tree decl, const char *name, unsigned HOST_WIDE_INT size, unsigned HOST_WIDE_INT rounded)
static void assemble_noswitch_variable (tree decl, const char *name, section *sect, unsigned int align)
static void assemble_variable_contents (tree decl, const char *name, bool dont_output_data)
void assemble_variable (tree decl, int top_level, int at_end, int dont_output_data)
void assemble_vtv_preinit_initializer ()
static int contains_pointers_p ()
static bool incorporeal_function_p ()
static void assemble_external_real ()
void process_pending_assemble_externals ()
void assemble_external ()
void assemble_external_libcall ()
void assemble_label ()
void mark_referenced ()
void mark_decl_referenced ()
static tree ultimate_transparent_alias_target ()
void assemble_name_raw ()
void assemble_name ()
rtx assemble_static_space ()
rtx assemble_trampoline_template ()
static unsigned min_align ()
const char * integer_asm_op ()
void assemble_integer_with_op ()
bool default_assemble_integer (rtx x, unsigned int size, int aligned_p)
bool assemble_integer ()
void assemble_real ()
static void decode_addr_const ()
static void maybe_output_constant_def_contents (struct constant_descriptor_tree *, int)
htab_t constant_pool_htab ()
static hashval_t const_desc_hash ()
static hashval_t const_hash_1 ()
static int const_desc_eq ()
static int compare_constant ()
static tree copy_constant ()
static sectionget_constant_section ()
static HOST_WIDE_INT get_constant_size ()
static struct
constant_descriptor_tree
build_constant_desc ()
rtx output_constant_def ()
static void assemble_constant_contents ()
static void output_constant_def_contents ()
rtx lookup_constant_def ()
tree tree_output_constant_def ()
static hashval_t const_desc_rtx_hash ()
static int const_desc_rtx_eq ()
static int const_rtx_hash_1 ()
static hashval_t const_rtx_hash ()
static struct rtx_constant_poolcreate_constant_pool ()
void init_varasm_status ()
rtx simplify_subtraction ()
rtx force_const_mem ()
rtx get_pool_constant ()
rtx get_pool_constant_mark ()
enum machine_mode get_pool_mode ()
int get_pool_size ()
static void output_constant_pool_2 ()
static void output_constant_pool_1 (struct constant_descriptor_rtx *desc, unsigned int align)
static int mark_constant ()
static void mark_constants ()
static void mark_constant_pool ()
static void output_constant_pool_contents ()
void output_shared_constant_pool ()
int compute_reloc_for_constant ()
static void output_addressed_constants ()
bool constructor_static_from_elts_p ()
static tree initializer_constant_valid_p_1 (tree value, tree endtype, tree *cache)
static tree narrowing_initializer_constant_valid_p ()
static tree initializer_constant_valid_p_1 ()
tree initializer_constant_valid_p ()
bool initializer_constant_valid_for_bitfield_p ()
static unsigned HOST_WIDE_INT output_constructor (tree, unsigned HOST_WIDE_INT, unsigned int, oc_outer_state *)
void output_constant ()
static unsigned HOST_WIDE_INT array_size_for_constructor ()
static void output_constructor_array_range ()
static void output_constructor_regular_field ()
static void output_constructor_bitfield ()
static void mark_weak ()
void merge_weak ()
void declare_weak ()
static void weak_finish_1 ()
static tree find_decl ()
void weak_finish ()
static void globalize_decl ()
void do_assemble_alias ()
void assemble_alias ()
void record_tm_clone_pair ()
tree get_tm_clone_pair ()
static int dump_tm_clone_to_vec ()
static void dump_tm_clone_pairs ()
sectiondefault_clone_table_section ()
static int tm_alias_pair_cmp ()
void finish_tm_clone_pairs ()
void default_assemble_visibility (tree decl, int vis)
int maybe_assemble_visibility ()
int supports_one_only ()
void make_decl_one_only ()
void init_varasm_once ()
enum tls_model decl_default_tls_model ()
unsigned int default_section_type_flags ()
bool have_global_bss_p ()
void default_no_named_section (const char *name, unsigned int flags, tree decl)
void default_elf_asm_named_section (const char *name, unsigned int flags, tree decl)
void default_coff_asm_named_section (const char *name, unsigned int flags, tree decl)
void default_pe_asm_named_section (const char *name, unsigned int flags, tree decl)
sectiondefault_select_section (tree decl, int reloc, unsigned HOST_WIDE_INT align)
enum section_category categorize_decl_for_section ()
static bool decl_readonly_section_1 ()
bool decl_readonly_section ()
sectiondefault_elf_select_section (tree decl, int reloc, unsigned HOST_WIDE_INT align)
void default_unique_section ()
static int compute_reloc_for_rtx_1 ()
static int compute_reloc_for_rtx ()
sectiondefault_select_rtx_section (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT align)
sectiondefault_elf_select_rtx_section (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT align)
void default_encode_section_info ()
const char * default_strip_name_encoding ()
void default_asm_output_anchor ()
bool default_use_anchors_for_symbol_p ()
static bool resolution_to_local_definition_p ()
static bool resolution_local_p ()
bool default_binds_local_p ()
bool default_binds_local_p_1 ()
bool decl_binds_to_current_def_p ()
bool decl_replaceable_p ()
void default_globalize_label ()
void default_globalize_decl_name ()
void default_emit_unwind_label (FILE *stream, tree decl, int for_eh, int empty)
void default_emit_except_table_label ()
void default_generate_internal_label (char *buf, const char *prefix, unsigned long labelno)
void default_internal_label (FILE *stream, const char *prefix, unsigned long labelno)
void default_asm_declare_constant_name (FILE *file, const char *name, const_tree exp, HOST_WIDE_INT size)
void default_file_start ()
void file_end_indicate_exec_stack ()
void file_end_indicate_split_stack ()
void output_section_asm_op ()
void switch_to_section ()
void place_block_symbol ()
rtx get_section_anchor (struct object_block *block, HOST_WIDE_INT offset, enum tls_model model)
static void output_object_block ()
static int output_object_block_htab ()
void output_object_blocks ()
int elf_record_gcc_switches ()
void default_elf_asm_output_external (FILE *file, tree decl, const char *name)
void default_asm_output_source_filename ()
void output_file_directive ()
rtx make_debug_expr_from_rtl ()
void default_elf_asm_output_limited_string ()
void default_elf_asm_output_ascii ()
static sectionget_elf_initfini_array_priority_section (int priority, bool constructor_p)
void default_elf_init_array_asm_out_constructor ()
void default_elf_fini_array_asm_out_destructor ()
void default_asm_output_ident_directive ()

Variables

const char * first_global_object_name
const char * weak_global_object_name
static int const_labelno
int size_directive_output
tree last_assemble_variable_decl
bool first_function_block_is_cold
static alias_set_type const_alias_set
static bool saw_no_split_stack
sectiontext_section
sectiondata_section
sectionreadonly_data_section
sectionsdata_section
sectionctors_section
sectiondtors_section
sectionbss_section
sectionsbss_section
sectiontls_comm_section
sectioncomm_section
sectionlcomm_section
sectionbss_noswitch_section
sectionexception_section
sectioneh_frame_section
sectionin_section
bool in_cold_section_p
static sectionunnamed_sections
static htab_t section_htab
static htab_t object_block_htab
static int anchor_labelno
static struct rtx_constant_poolshared_constant_pool
static tree pending_assemble_externals
static bool pending_assemble_externals_processed
static struct pointer_set_tpending_assemble_externals_set
static tree weak_decls
static rtx initial_trampoline
static htab_t const_desc_htab
static tree weakref_targets
vec< alias_pair, va_gc > * alias_pairs
static htab_t tm_clone_hash
int trampolines_created
static sectionelf_init_array_section
static sectionelf_fini_array_section

Typedef Documentation

typedef struct tm_alias_pair tm_alias_pair

Function Documentation

void align_variable ( )
Compute the alignment of variable specified by DECL.
   DONT_OUTPUT_DATA is from assemble_variable.   

References decl_binds_to_current_def_p(), and warning().

static unsigned HOST_WIDE_INT array_size_for_constructor ( tree  )
static
static unsigned HOST_WIDE_INT array_size_for_constructor ( )
static
Subroutine of output_constructor, used for computing the size of
   arrays of unspecified length.  VAL must be a CONSTRUCTOR of an array
   type with an unspecified upper bound.   

References double_int::fits_uhwi(), double_int::low, tree_int_cst_lt(), and tree_to_double_int().

static void asm_output_aligned_bss ( FILE *  file,
tree  decl,
const char *  name,
unsigned HOST_WIDE_INT  size,
int  align 
)
static
Utility function for targets to use in implementing
   ASM_OUTPUT_ALIGNED_BSS.
   ??? It is believed that this function will work in most cases so such
   support is localized here.   

References floor_log2(), and switch_to_section().

void assemble_addr_to_section ( )
Write the address of the entity given by SYMBOL to SEC.   

References assemble_align(), assemble_integer(), and switch_to_section().

void assemble_align ( )
Assemble an alignment pseudo op for an ALIGN-bit boundary.   

References asm_out_file, and floor_log2().

void assemble_asm ( )
Output a string of literal assembler code
   for an `asm' keyword used between functions.   

References app_enable(), and asm_out_file.

static void assemble_constant_contents ( )
static
Subroutine of output_constant_def_contents.  Output the definition
   of constant EXP, which is pointed to by label LABEL.  ALIGN is the
   constant's alignment in bits.   

References asm_out_file, get_constant_size(), output_constant(), and targetm.

Referenced by output_constant_def_contents(), and output_object_block().

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

References asm_out_file, function_section(), in_section, output_constant_pool(), switch_to_section(), and unlikely_text_section().

void assemble_external ( )
Output something to declare an external symbol to the assembler,
   and qualifiers such as weakness.  (Most assemblers don't need
   extern declaration, so we normally output nothing.)  Do nothing if
   DECL is not external.   

References asm_out_file, assemble_external_real(), CGRAPH_STATE_EXPANSION, CGRAPH_STATE_FINISHED, lookup_attribute(), pointer_set_insert(), and value_member().

void assemble_external_libcall ( )
Similar, for calling a library function FUN.   

References targetm.

static void assemble_external_real ( )
static
Actually do the tests to determine if this is necessary, and invoke
   ASM_OUTPUT_EXTERNAL.   

References asm_out_file, and incorporeal_function_p().

Referenced by assemble_external(), and process_pending_assemble_externals().

bool assemble_integer ( )
Assemble the integer constant X into an object of SIZE bytes.  ALIGN is
   the alignment of the integer in bits.  Return 1 if we were able to output
   the constant, otherwise 0.  We must be able to output the constant,
   if FORCE is nonzero.   

References assemble_integer(), mode_for_size(), simplify_subreg(), and targetm.

void assemble_integer_with_op ( )
Use directive OP to assemble an integer object X.  Print OP at the
   start of the line, followed immediately by the value of X.   

References asm_out_file, and output_addr_const().

void assemble_label ( )
Assemble a label named NAME.   
void assemble_name ( )
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.   

References assemble_name_raw(), mark_referenced(), maybe_get_identifier(), targetm, and ultimate_transparent_alias_target().

void assemble_name_raw ( )
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).   
static void assemble_noswitch_variable ( tree  decl,
const char *  name,
section sect,
unsigned int  align 
)
static
Assemble DECL given that it belongs in SECTION_NOSWITCH section SECT.
   NAME is the name of DECL's SYMBOL_REF.   

References asan_protect_global(), asan_red_zone_size(), noswitch_section::callback, HOST_WIDE_INT, section::noswitch, tree_low_cst(), and warning().

Referenced by assemble_variable().

void assemble_real ( )
void assemble_start_function ( )
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.   

References app_disable(), asm_out_file, assemble_align(), gcc_debug_hooks::begin_function, cfun, current_function_decl, debug_hooks, first_function_block_is_cold, floor_log2(), function_section(), globalize_decl(), function::is_thunk, lookup_attribute(), maybe_assemble_visibility(), notice_global_symbol(), optimize_function_for_speed_p(), output_constant_pool(), switch_to_section(), targetm, and unlikely_text_section().

rtx assemble_static_space ( )
Allocate SIZE bytes writable static space with a gensym name
   and return an RTX to refer to its address.   

References asm_out_file, and const_labelno.

void assemble_string ( )
Assemble a string constant with the specified C string as contents.   

References asm_out_file.

rtx assemble_trampoline_template ( void  )
Assemble the static constant template for function entry trampolines.   

References asm_out_file, floor_log2(), gen_const_mem(), initial_trampoline, set_mem_align(), set_mem_size(), switch_to_section(), and targetm.

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().

static void assemble_variable_contents ( tree  decl,
const char *  name,
bool  dont_output_data 
)
static
A subroutine of assemble_variable.  Output the label and contents of
   DECL, whose address is a SYMBOL_REF with name NAME.  DONT_OUTPUT_DATA
   is as for assemble_variable.   

References asm_out_file, assemble_zeros(), get_variable_align(), initializer_zerop(), output_constant(), and tree_low_cst().

Referenced by assemble_variable(), and output_object_block().

void assemble_vtv_preinit_initializer ( )
Given a function declaration (FN_DECL), this function assembles the
   function into the .preinit_array section.   

References assemble_addr_to_section(), get_section(), and switch_to_section().

void assemble_zeros ( )
Assemble code to leave SIZE bytes of zeros.   

References asm_out_file, assemble_integer(), section::common, and section_common::flags.

bool bss_initializer_p ( )
Return true if DECL's initializer is suitable for a BSS section.   

References initializer_zerop().

static struct constant_descriptor_tree* build_constant_desc ( )
staticread
Subroutine of output_constant_def:
   No constant equal to EXP is known to have been output.
   Make a constant descriptor to enter EXP in the hash table.
   Assign the label number and construct RTL to refer to the
   constant's location in memory.
   Caller is responsible for updating the hash table.   

References align_variable(), copy_constant(), create_block_symbol(), gen_const_mem(), get_block_for_section(), get_constant_section(), get_identifier(), mf_mark(), mf_marked_p(), constant_descriptor_tree::rtl, set_mem_alias_set(), set_mem_attributes(), targetm, use_object_blocks_p(), and constant_descriptor_tree::value.

Referenced by output_constant_def(), and tree_output_constant_def().

static void change_symbol_block ( )
static
Make sure block symbol SYMBOL is in block BLOCK.   

Referenced by make_decl_rtl().

static int compare_constant ( const tree  ,
const tree   
)
static

Referenced by compare_constant(), and const_desc_eq().

static int compare_constant ( )
static
Compare t1 and t2, and return 1 only if they are known to result in
   the same bit pattern on output.   

References addr_const::base, compare_constant(), decode_addr_const(), FIXED_VALUES_IDENTICAL, constructor_elt_d::index, int_size_in_bytes(), addr_const::offset, tree_int_cst_equal(), constructor_elt_d::value, and vec_safe_length().

int compute_reloc_for_constant ( )
Determine what kind of relocations EXP may need.   

References compute_reloc_for_constant(), and handled_component_p().

static int compute_reloc_for_rtx ( )
static
static int compute_reloc_for_rtx_1 ( )
static
Like compute_reloc_for_constant, except for an RTX.  The return value
   is a mask for which bit 1 indicates a global relocation, and bit 0
   indicates a local relocation.   

Referenced by compute_reloc_for_rtx().

static int const_desc_eq ( const void *  ,
const void *   
)
static

Referenced by init_varasm_once().

static int const_desc_eq ( )
static
Wrapper of compare_constant, for the htab interface.   

References compare_constant(), constant_descriptor_tree::hash, and constant_descriptor_tree::value.

static hashval_t const_desc_hash ( const void *  )
static

Referenced by init_varasm_once().

static hashval_t const_desc_hash ( )
static
Compute a hash code for a constant expression.   
static int const_desc_rtx_eq ( )
static
static hashval_t const_desc_rtx_hash ( )
static
Hash and compare functions for const_rtx_htab.   

References constant_descriptor_rtx::hash.

Referenced by create_constant_pool().

static hashval_t const_hash_1 ( const tree  )
static
static hashval_t const_rtx_hash ( )
static
Compute a hash value for X, which should be a constant.   

References const_rtx_hash_1(), and for_each_rtx().

Referenced by force_const_mem().

static int const_rtx_hash_1 ( )
static
This is the worker function for const_rtx_hash, called via for_each_rtx.   

References fixed_hash(), HOST_WIDE_INT, constant_descriptor_rtx::mode, real_hash(), and shift.

Referenced by const_rtx_hash().

htab_t constant_pool_htab ( void  )
Constant pool accessor function.   

References const_desc_htab.

Referenced by asan_finish_file().

bool constructor_static_from_elts_p ( )
Whether a constructor CTOR is a valid static constant initializer if all
   its elements are.  This used to be internal to initializer_constant_valid_p
   and has been exposed to let other functions like categorize_ctor_elements
   evaluate the property while walking a constructor for other purposes.   
static int contains_pointers_p ( tree  )
static
static int contains_pointers_p ( )
static
Return 1 if type TYPE contains any pointers.   

References contains_pointers_p().

static tree copy_constant ( tree  )
static
static tree copy_constant ( )
static
Make a copy of the whole tree structure for a constant.  This
   handles the same types of nodes that compare_constant handles.   

References build_complex(), copy(), copy_constant(), copy_node(), vec_alloc(), and vec_safe_length().

static rtx create_block_symbol ( const char *  label,
struct object_block block,
HOST_WIDE_INT  offset 
)
static
Create a symbol with label LABEL and place it at byte offset
   OFFSET in BLOCK.  OFFSET can be negative if the symbol's offset
   is not yet known.  LABEL must be a garbage-collected string.   

References block_symbol::block, memset(), offset, and object_block::size.

Referenced by build_constant_desc(), force_const_mem(), get_section_anchor(), and make_decl_rtl().

static struct rtx_constant_pool* create_constant_pool ( )
staticread
section* current_function_section ( void  )
void decide_function_section ( )
If not using flag_reorder_blocks_and_partition, decide early whether the
   current function goes into the cold section, so that targets can use
   current_function_section during RTL expansion.  DECL describes the
   function.   

References cgraph_get_node(), current_function_decl, first_function_block_is_cold, and NODE_FREQUENCY_UNLIKELY_EXECUTED.

bool decl_binds_to_current_def_p ( )
Return true when references to DECL must bind to current definition in
   final executable.

   The condition is usually equivalent to whether the function binds to the
   current module (shared library or executable), that is to binds_local_p.
   We use this fact to avoid need for another target hook and implement
   the logic using binds_local_p and just special cases where
   decl_binds_to_current_def_p is stronger than binds_local_p.  In particular
   the weak definitions (that can be overwritten at linktime by other
   definition from different object file) and when resolution info is available
   we simply use the knowledge passed to us by linker plugin.   

References cgraph_get_node(), resolution_to_local_definition_p(), cgraph_node::symbol, varpool_node::symbol, targetm, and varpool_get_node().

bool decl_readonly_section ( )
static bool decl_readonly_section_1 ( enum  section_category)
static
static bool decl_readonly_section_1 ( )
static
bool decl_replaceable_p ( )
A replaceable function or variable is one which may be replaced
   at link-time with an entirely different definition, provided that the
   replacement has the same type.  For example, functions declared
   with __attribute__((weak)) on most systems are replaceable.

   COMDAT functions are not replaceable, since all definitions of the
   function must be equivalent.  It is important that COMDAT functions
   not be treated as replaceable so that use of C++ template
   instantiations is not penalized.   

References decl_binds_to_current_def_p().

void declare_weak ( )
Declare DECL to be a weak symbol.   

References error(), get_identifier(), lookup_attribute(), mark_weak(), and warning().

static void decode_addr_const ( tree  ,
struct addr_const  
)
static

Referenced by compare_constant(), and const_hash_1().

int decode_reg_name ( )
int decode_reg_name_and_count ( )
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.   

References strip_reg_name(), strlen(), and table.

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 ( )
The default implementation of TARGET_ASM_OUTPUT_ANCHOR.  Define the
   anchor relative to ".", the current section position.   

References asm_out_file, buffer, and HOST_WIDE_INT_PRINT_DEC.

void default_asm_output_ident_directive ( )
Default TARGET_ASM_OUTPUT_IDENT hook.

   This is a bit of a cheat.  The real default is a no-op, but this
   hook is the default for all targets with a .ident directive.   

References add_asm_node(), asm_out_file, build_string(), CGRAPH_STATE_PARSING, and strlen().

void default_asm_output_source_filename ( )
The default hook for TARGET_ASM_OUTPUT_SOURCE_FILENAME.   

References output_quoted_string().

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 ( )
Assume ELF-ish defaults, since that's pretty much the most liberal
   wrt cross-module name binding.   

References default_binds_local_p_1().

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 *  name,
unsigned int  flags,
tree  decl 
)

References asm_out_file.

Referenced by default_pe_asm_named_section().

void default_ctor_section_asm_out_constructor ( rtx  symbol,
int  priority 
)
void default_dtor_section_asm_out_destructor ( rtx  symbol,
int  priority 
)
void default_elf_asm_named_section ( const char *  name,
unsigned int  flags,
tree  decl 
)

References asm_out_file, and type().

void default_elf_asm_output_ascii ( )
Default ASM_OUTPUT_ASCII for ELF targets.   

References default_elf_asm_output_limited_string(), len, and limit.

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 ( )
Default ASM_OUTPUT_LIMITED_STRING for ELF targets.   
void default_elf_fini_array_asm_out_destructor ( )
Use .fini_array section for destructors.  

References assemble_addr_to_section(), and get_elf_initfini_array_priority_section().

void default_elf_init_array_asm_out_constructor ( )
Use .init_array section for constructors.  

References assemble_addr_to_section(), and get_elf_initfini_array_priority_section().

section* default_elf_select_rtx_section ( enum machine_mode  mode,
rtx  x,
unsigned HOST_WIDE_INT  align 
)
void default_emit_except_table_label ( )
Default function to output a label to divide up the exception table.
   The default is to do nothing.  A target that needs/wants to divide
   up the table must provide it's own function to do this.   
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 ( )
Set the generally applicable flags on the SYMBOL_REF for EXP.   

References targetm.

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.

section* default_function_rodata_section ( )
Return the read-only data section associated with function DECL.   

References get_section(), len, memcpy(), readonly_data_section, and strlen().

section* default_function_section ( tree  decl,
enum node_frequency  freq,
bool  startup,
bool  exit 
)
Choose named function section based on its frequency.   

References get_named_text_section(), NODE_FREQUENCY_HOT, and NODE_FREQUENCY_UNLIKELY_EXECUTED.

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 ( )
Default function to output code that will globalize a declaration.   

References targetm.

void default_globalize_label ( )
Default function to output code that will globalize a label.  A
   target must define GLOBAL_ASM_OP or provide its own function to
   globalize a label.   

References assemble_name().

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 ( )
void default_named_section_asm_out_destructor ( )
section* default_no_function_rodata_section ( )
Return the read-only data section associated with function DECL
   for targets where that section should be always the single
   readonly data section.   

References readonly_data_section.

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 *  name,
unsigned int  flags,
tree  decl 
)
unsigned int default_section_type_flags ( )
Select a set of attributes for section NAME based on the properties
   of DECL and whether or not RELOC indicates that DECL's initializer
   might contain runtime relocations.

   We make the section read-only and executable for a function decl,
   read-only for a const data decl, and writable for a non-const data decl.   

References categorize_decl_for_section(), decl_readonly_section_1(), SECCAT_DATA_REL_RO, and SECCAT_DATA_REL_RO_LOCAL.

section* default_select_rtx_section ( enum machine_mode  mode,
rtx  x,
unsigned HOST_WIDE_INT  align 
)
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 ( )
By default, we do nothing for encode_section_info, so we need not
   do anything but discard the '*' marker.   
bool default_use_anchors_for_symbol_p ( )
The default implementation of TARGET_USE_ANCHORS_FOR_SYMBOL_P.   

References section::common, decl_binds_to_current_def_p(), section_common::flags, and targetm.

void do_assemble_alias ( )
Output the assembler code for a define (equate) using ASM_OUTPUT_DEF
   or ASM_OUTPUT_DEF_FROM_DECLS.  The function defines the symbol whose
   tree node is DECL to have the value of the tree node TARGET.   

References asm_out_file, error_at(), globalize_decl(), lookup_attribute(), make_decl_rtl(), maybe_assemble_visibility(), targetm, ultimate_transparent_alias_target(), weak_decls, and weakref_targets.

static void dump_tm_clone_pairs ( )
static
static int dump_tm_clone_to_vec ( )
static
Helper function for finish_tm_clone_pairs.  Dump a hash table entry
   into a VEC in INFO.   

References tree_map::base, tree_map_base::from, map, and tree_map::to.

Referenced by finish_tm_clone_pairs().

int elf_record_gcc_switches ( )
This function provides a possible implementation of the
   TARGET_ASM_RECORD_GCC_SWITCHES target hook for ELF targets.  When triggered
   by -frecord-gcc-switches it creates a new mergeable, string section in the
   assembler output file called TARGET_ASM_RECORD_GCC_SWITCHES_SECTION which
   contains the switches in ASCII format.

   FIXME: This code does not correctly handle double quote characters
   that appear inside strings, (it strips them rather than preserving them).
   FIXME: ASM_OUTPUT_ASCII, as defined in config/elfos.h will not emit NUL
   characters - instead it treats them as sub-string separators.  Since
   we want to emit NUL strings terminators into the object file we have to use
   ASM_OUTPUT_SKIP.   

References asm_out_file, get_section(), strlen(), switch_to_section(), SWITCH_TYPE_DESCRIPTIVE, SWITCH_TYPE_PASSED, and targetm.

static bool emit_bss ( tree  decl,
const char *  name,
unsigned HOST_WIDE_INT  size,
unsigned HOST_WIDE_INT  rounded 
)
static
A noswitch_section_callback for bss_noswitch_section.   

References asm_out_file, and get_variable_align().

Referenced by init_varasm_once().

static bool emit_common ( tree  decl,
const char *  name,
unsigned HOST_WIDE_INT  size,
unsigned HOST_WIDE_INT  rounded 
)
static
A noswitch_section_callback for comm_section.   

References asm_out_file, and get_variable_align().

Referenced by init_varasm_once().

static bool emit_local ( tree  decl,
const char *  name,
unsigned HOST_WIDE_INT  size,
unsigned HOST_WIDE_INT  rounded 
)
static
A noswitch_section_callback for lcomm_section.   

References asm_out_file.

Referenced by init_varasm_once().

static bool emit_tls_common ( tree  decl,
const char *  name,
unsigned HOST_WIDE_INT  size,
unsigned HOST_WIDE_INT  rounded 
)
static
A noswitch_section_callback for tls_comm_section.   

References asm_out_file, and sorry().

Referenced by init_varasm_once().

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().

static tree find_decl ( )
static
Fiven an assembly name, find the decl it is associated with.   

References symtab_node_for_asm().

Referenced by assemble_alias(), and weak_finish().

void finish_tm_clone_pairs ( void  )
section* function_section ( )
Return the section for function DECL.

   If DECL is NULL_TREE, return the text section.  We can be passed
   NULL_TREE under some circumstances by dbxout.c at least.   

References function_section_1().

static section* function_section_1 ( )
static
Return the section for function DECL.

   If DECL is NULL_TREE, return the text section.  We can be passed
   NULL_TREE under some circumstances by dbxout.c at least.

   If FORCE_COLD is true, return cold function section ignoring
   the frequency info of cgraph_node.   

References cgraph_get_node(), get_named_section(), hot_function_section(), NODE_FREQUENCY_NORMAL, NODE_FREQUENCY_UNLIKELY_EXECUTED, cgraph_node::only_called_at_exit, cgraph_node::only_called_at_startup, and targetm.

Referenced by current_function_section(), function_section(), unlikely_text_section(), and unlikely_text_section_p().

static struct object_block* get_block_for_decl ( )
staticread
Return the block into which object_block DECL should be placed.   

References align_variable(), get_block_for_section(), get_variable_section(), host_integerp(), and object_block::sect.

Referenced by make_decl_rtl().

static struct object_block* get_block_for_section ( )
staticread
Return the object_block structure for section SECT.  Create a new
   structure if we haven't created one already.  Return null if SECT
   itself is null.   

References hash_section(), object_block_htab, and object_block::sect.

Referenced by build_constant_desc(), force_const_mem(), and get_block_for_decl().

section* get_cdtor_priority_section ( )
Return the numbered .ctors.N (if CONSTRUCTOR_P) or .dtors.N (if
   not) section for PRIORITY.   

References get_section().

static section* get_constant_section ( )
static
Return the section into which constant EXP should be placed.   

References compute_reloc_for_constant(), and targetm.

Referenced by build_constant_desc(), and output_constant_def_contents().

static HOST_WIDE_INT get_constant_size ( )
static
Return the size of constant EXP in bytes.   

References int_size_in_bytes().

Referenced by assemble_constant_contents(), output_constant_def_contents(), output_object_block(), and place_block_symbol().

static section* get_elf_initfini_array_priority_section ( int  priority,
bool  constructor_p 
)
static
section* get_named_section ( )
Return a section with a particular name and with whatever SECTION_*
   flags section_type_flags deems appropriate.  The name of the section
   is taken from NAME if nonnull, otherwise it is taken from DECL's
   DECL_SECTION_NAME.  DECL is the decl associated with the section
   (see the section comment for details) and RELOC is as for
   section_type_flags.   

References get_section(), and targetm.

section* get_named_text_section ( tree  decl,
const char *  text_section_name,
const char *  named_section_suffix 
)
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().

static section* get_noswitch_section ( )
static
Return a SECTION_NOSWITCH section with the given fields.   

References noswitch_section::callback, noswitch_section::common, section_common::flags, section::noswitch, and object_block::sect.

Referenced by init_varasm_once().

rtx get_pool_constant ( )
Given a constant pool SYMBOL_REF, return the corresponding constant.   
rtx get_pool_constant_mark ( )
Given a constant pool SYMBOL_REF, return the corresponding constant
   and whether it has been output or not.   

References constant_descriptor_rtx::constant, and constant_descriptor_rtx::mark.

enum machine_mode get_pool_mode ( )
Similar, return the mode.   
int get_pool_size ( void  )
Return the size of the constant pool.   
section* get_section ( )
Return the named section structure associated with NAME.  Create
   a new section with the given fields if no such structure exists.   

References named_section::common, section::common, named_section::decl, error(), section_common::flags, inform(), named_section::name, section::named, object_block::sect, and section_htab.

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().

section* get_unnamed_section ( unsigned int  flags,
void(*)(const void *)  callback,
const void *  data 
)
static unsigned int get_variable_align ( )
static
Return DECL_ALIGN (decl), possibly increased for optimization purposes
   beyond what align_variable returned.   

References decl_binds_to_current_def_p().

Referenced by assemble_variable(), assemble_variable_contents(), emit_bss(), emit_common(), get_variable_section(), and place_block_symbol().

section* get_variable_section ( )
Return the section into which the given VAR_DECL or CONST_DECL
   should be placed.  PREFER_NOSWITCH_P is true if a noswitch
   section should be used wherever possible.   

References asan_protect_global(), bss_initializer_p(), bss_noswitch_section, comm_section, compute_reloc_for_constant(), contains_pointers_p(), get_named_section(), get_variable_align(), lcomm_section, resolve_unique_section(), targetm, and tls_comm_section.

static void globalize_decl ( tree  )
static
static void globalize_decl ( )
static
Emit the assembly bits to indicate that DECL is globally visible.   

References asm_out_file, targetm, ultimate_transparent_alias_target(), weak_decls, and weakref_targets.

static hashval_t hash_section ( )
static
Return a hash value for section SECT.   

References section::common, section_common::flags, named_section::name, and section::named.

Referenced by get_block_for_section(), and object_block_entry_hash().

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.

static section* hot_function_section ( )
static
Return the hot section for function DECL.  Return text_section for
   null DECLs.   

References get_named_section(), and text_section.

Referenced by function_section_1().

static bool incorporeal_function_p ( tree  )
static

Referenced by assemble_external_real().

static bool incorporeal_function_p ( )
static
True if DECL is a function decl for which no out-of-line copy exists.
   It is assumed that DECL's assembler name has been set.   

References BUILT_IN_NORMAL.

void init_varasm_status ( void  )
Initialize constant pool hashing for a new function.   

References create_constant_pool().

Referenced by prepare_function_start().

bool initializer_constant_valid_for_bitfield_p ( )
Return true if VALUE is a valid constant-valued expression
   for use in initializing a static bit-field; one that can be
   an element of a "constant" initializer.   

References initializer_constant_valid_for_bitfield_p().

tree initializer_constant_valid_p ( )
Return nonzero if VALUE is a valid constant-valued expression
   for use in initializing a static variable; one that can be an
   element of a "constant" initializer.

   Return null_pointer_node if the value is absolute;
   if it is relocatable, return the variable that determines the relocation.
   We assume that VALUE has been folded as much as possible;
   therefore, we do not need to check for such things as
   arithmetic-combinations of integers.   

References initializer_constant_valid_p_1().

static tree initializer_constant_valid_p_1 ( tree  value,
tree  endtype,
tree cache 
)
static
static tree initializer_constant_valid_p_1 ( )
static
Helper function of initializer_constant_valid_p.
   Return nonzero if VALUE is a valid constant-valued expression
   for use in initializing a static variable; one that can be an
   element of a "constant" initializer.

   Return null_pointer_node if the value is absolute;
   if it is relocatable, return the variable that determines the relocation.
   We assume that VALUE has been folded as much as possible;
   therefore, we do not need to check for such things as
   arithmetic-combinations of integers.

   Use CACHE (pointer to 2 tree values) for caching if non-NULL.   

References constructor_static_from_elts_p(), initializer_constant_valid_p_1(), integer_zerop(), narrowing_initializer_constant_valid_p(), operand_equal_p(), and staticp().

const char* integer_asm_op ( )
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.   

References asm_int_op::di, asm_int_op::hi, asm_int_op::si, targetm, and asm_int_op::ti.

rtx lookup_constant_def ( )
Look up EXP in the table of constant descriptors.  Return the rtl
   if it has been emitted, else null.   

References const_desc_htab, const_hash_1(), exp(), constant_descriptor_tree::hash, constant_descriptor_tree::rtl, and constant_descriptor_tree::value.

rtx make_debug_expr_from_rtl ( )
Create a DEBUG_EXPR_DECL / DEBUG_EXPR pair from RTL expression
   EXP.   

References constant_descriptor_rtx::mode, type(), lang_hooks_for_types::type_for_mode, and lang_hooks::types.

void make_decl_one_only ( )
Set up DECL as a public symbol that can be defined in multiple
   translation units without generating a linker error.   
void make_decl_rtl ( )
Create the DECL_RTL for a VAR_DECL or FUNCTION_DECL.  DECL should
   have static storage duration.  In other words, it should not be an
   automatic variable, including PARM_DECLs.

   There is, however, one exception: this function handles variables
   explicitly placed in a particular register by the user.

   This is never called for PARM_DECL nodes.   

References asm_out_file, change_symbol_block(), create_block_symbol(), decode_reg_name(), error(), gen_rtx_MEM(), get_block_for_decl(), globalize_reg(), in_hard_reg_set_p(), mudflap_enqueue_decl(), output_constant_def(), set_mem_attributes(), strlen(), targetm, use_blocks_for_decl_p(), use_object_blocks_p(), and warning().

rtx make_decl_rtl_for_debug ( )
Like make_decl_rtl, but inhibit creation of new alias sets when
   calling make_decl_rtl.  Also, reset DECL_RTL before returning the
   rtl.   
static int mark_constant ( )
static
Given a SYMBOL_REF CURRENT_RTX, mark it and all constants it refers
   to as used.  Emit referenced deferred strings.  This function can
   be used with for_each_rtx to mark all SYMBOL_REFs in an rtx.   

References constant_descriptor_rtx::constant, for_each_rtx(), constant_descriptor_rtx::mark, and output_constant_def_contents().

Referenced by mark_constants().

static void mark_constant_pool ( )
static
Look through the instructions for this function, and mark all the
   entries in POOL which are actually being used.  Emit deferred constants
   which have indeed been used.   

References get_insns(), and mark_constants().

Referenced by output_constant_pool().

static void mark_constants ( )
static
Look through appropriate parts of INSN, marking all entries in the
   constant pool which are actually being used.  Entries that are only
   referenced by other constants are also marked as used.  Emit
   deferred strings that are used.   

References for_each_rtx(), and mark_constant().

Referenced by mark_constant_pool().

void mark_decl_referenced ( )
void mark_referenced ( )
Set the symbol_referenced flag for ID.   
static void mark_weak ( tree  )
static

Referenced by declare_weak(), and merge_weak().

static void mark_weak ( )
static
Mark DECL as weak.   
int maybe_assemble_visibility ( )
A helper function to call assemble_visibility when needed for a decl.   

References targetm, and VISIBILITY_DEFAULT.

static void maybe_output_constant_def_contents ( struct constant_descriptor_tree desc,
int  defer 
)
static
Subroutine of output_constant_def: Decide whether or not we need to
   output the constant DESC now, and if so, do it.   

References cfun, exp(), output_constant_def_contents(), constant_descriptor_tree::rtl, and constant_descriptor_tree::value.

Referenced by output_constant_def().

void merge_weak ( )
Merge weak status between NEWDECL and OLDDECL.   

References mark_weak(), and weak_decls.

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().

static section* mergeable_string_section ( tree  decl,
unsigned HOST_WIDE_INT  align,
unsigned int  flags 
)
static
Return the section to use for string merging.   

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

Referenced by default_elf_select_section().

static unsigned min_align ( )
inlinestatic
A and B are either alignments or offsets.  Return the minimum alignment
   that may be assumed after adding the two together.   
static tree narrowing_initializer_constant_valid_p ( )
static
A subroutine of initializer_constant_valid_p.  VALUE is a MINUS_EXPR,
   PLUS_EXPR or POINTER_PLUS_EXPR.  This looks for cases of VALUE
   which are valid when ENDTYPE is an integer of any size; in
   particular, this does not accept a pointer minus a constant.  This
   returns null_pointer_node if the VALUE is an absolute constant
   which can be used to initialize a static variable.  Otherwise it
   returns NULL.   

References initializer_constant_valid_p_1(), and operand_equal_p().

Referenced by initializer_constant_valid_p_1().

void notice_global_symbol ( )
DECL is an object (either VAR_DECL or FUNCTION_DECL) which is going
   to be output to assembler.
   Set first_global_object_name and weak_global_object_name as appropriate.   

References first_global_object_name, targetm, and weak_global_object_name.

static int object_block_entry_eq ( )
static
Helper routines for maintaining object_block_htab.   

References object_block::sect.

Referenced by init_varasm_once().

static hashval_t object_block_entry_hash ( )
static

References hash_section(), and object_block::sect.

Referenced by init_varasm_once().

static void output_addressed_constants ( tree  )
static
static void output_addressed_constants ( )
static
Find all the constants whose addresses are referenced inside of EXP,
   and make sure assembler code with a label has been output for each one.
   Indicate whether an ADDR_EXPR has been encountered.   

References handled_component_p(), output_addressed_constants(), and output_constant_def().

void output_constant ( )
Output assembler code for constant EXP, 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.

   SIZE is important for structure constructors,
   since trailing members may have been omitted from the constructor.
   It is also important for initialization of arrays from string constants
   since the full length of the string constant might not be wanted.
   It is also needed for initialization of unions, where the initializer's
   type is just one member, and that may not be as long as the union.

   There a case in which we would fail to output exactly SIZE bytes:
   for a structure constructor that wants to produce more than SIZE bytes.
   But such constructors will never be generated for any possible input.

   ALIGN is the alignment of the data in bits.   

References asm_out_file, assemble_integer(), assemble_real(), assemble_string(), assemble_zeros(), build_int_cst_wide(), error(), expand_expr(), EXPAND_INITIALIZER, int_size_in_bytes(), min_align(), output_constant(), output_constructor(), targetm, tree_low_cst(), and vec_safe_is_empty().

rtx output_constant_def ( )
Return an rtx representing a reference to constant data in memory
   for the constant expression EXP.

   If assembler code for such a constant has already been output,
   return an rtx to refer to it.
   Otherwise, output such a constant in memory
   and generate an rtx for it.

   If DEFER is nonzero, this constant can be deferred and output only
   if referenced in the function after all optimizations.

   `const_desc_table' records which constants already have label strings.   

References build_constant_desc(), const_desc_htab, const_hash_1(), exp(), constant_descriptor_tree::hash, maybe_output_constant_def_contents(), constant_descriptor_tree::rtl, and constant_descriptor_tree::value.

static void output_constant_def_contents ( rtx  )
static
static void output_constant_pool ( const char *  fnname,
tree  fndecl 
)
static
Mark all constants that are used in the current function, then write
   out the function's private constant pool.   

References asm_out_file, mark_constant_pool(), rtx_constant_pool::offset, and output_constant_pool_contents().

Referenced by assemble_end_function(), and assemble_start_function().

static void output_constant_pool_1 ( struct constant_descriptor_rtx desc,
unsigned int  align 
)
static
static void output_constant_pool_2 ( )
static
Worker function for output_constant_pool_1.  Emit assembly for X
   in MODE with known alignment ALIGN.   

References assemble_integer(), and assemble_real().

Referenced by output_constant_pool_1().

static void output_constructor_array_range ( )
static
Helper for output_constructor.  From the current LOCAL state, output a
   RANGE_EXPR element.   

References oc_local_state::align, assemble_zeros(), oc_local_state::index, int_size_in_bytes(), min_align(), output_constant(), oc_local_state::total_bytes, tree_low_cst(), oc_local_state::type, and oc_local_state::val.

Referenced by output_constructor().

static void output_constructor_bitfield ( )
static
void output_file_directive ( )
Output a file name in the form wanted by System V.   

References len, remap_debug_filename(), strlen(), and targetm.

static int output_object_block_htab ( )
static
A htab_traverse callback used to call output_object_block for
   each member of object_block_htab.   

References output_object_block().

Referenced by output_object_blocks().

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_section_asm_op ( )
Output DIRECTIVE (a C string) followed by a newline.  This is used as
   a get_unnamed_section callback.   

References asm_out_file.

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 place_block_symbol ( )
void process_pending_assemble_externals ( void  )
void record_tm_clone_pair ( )
static bool resolution_local_p ( )
static
Return true when RESOLUTION indicate that symbol will be bound locally
   within current executable or DSO.   

Referenced by default_binds_local_p_1().

static bool resolution_to_local_definition_p ( )
static
Return true when RESOLUTION indicate that symbol will be bound to the
   definition provided by current .o file.   

Referenced by decl_binds_to_current_def_p(), and default_binds_local_p_1().

void resolve_unique_section ( tree  decl,
int  reloc,
int  flag_function_or_data_sections 
)
If required, set DECL_SECTION_NAME to a unique name.   

References targetm.

Referenced by expand_thunk(), get_variable_section(), and gimple_expand_cfg().

static int section_entry_eq ( )
static
Helper routines for maintaining section_htab.   

References named_section::name, and section::named.

Referenced by init_varasm_once().

static hashval_t section_entry_hash ( )
static

References named_section::name, and section::named.

Referenced by init_varasm_once().

void set_user_assembler_name ( )
The user has asked for a DECL to have a particular name.  Set (or
   change) it in such a way that we don't prefix an underscore to
   it.   

References change_decl_assembler_name(), get_identifier(), and strlen().

rtx simplify_subtraction ( )
Given a MINUS expression, simplify it if both sides
   include the same symbol.   

References simplify_rtx().

static const char* strip_reg_name ( const char *  )
static
static const char* strip_reg_name ( )
static
Given NAME, a putative register name, discard any customary prefixes.   

References strlen().

int supports_one_only ( void  )
Returns 1 if the target configuration supports defining public symbols
   so that one of them will be chosen at link time instead of generating a
   multiply-defined symbol error, whether through the use of weak symbols or
   a target-specific mechanism for having duplicates discarded.   
void switch_to_section ( )
Emit assembly code to switch to section NEW_SECTION.  Do nothing if
   the current section is NEW_SECTION.   

References unnamed_section::callback, named_section::common, section::common, unnamed_section::data, named_section::decl, section_common::flags, named_section::name, section::named, targetm, and section::unnamed.

static int tm_alias_pair_cmp ( )
static
Helper comparison function for qsorting by the DECL_UID stored in
   alias_pair->emitted_diags.   

References tm_alias_pair::uid.

Referenced by finish_tm_clone_pairs().

tree tree_output_constant_def ( )
Return a tree representing a reference to constant data in memory
   for the constant expression EXP.

   This is the counterpart of output_constant_def at the Tree level.   

References build_constant_desc(), const_desc_htab, const_hash_1(), exp(), constant_descriptor_tree::hash, constant_descriptor_tree::rtl, constant_descriptor_tree::value, and varpool_finalize_decl().

static tree ultimate_transparent_alias_target ( )
inlinestatic
Follow the IDENTIFIER_TRANSPARENT_ALIAS chain starting at *ALIAS
   until we find an identifier that is not itself a transparent alias.
   Modify the alias passed to it by reference (and all aliases on the
   way to the ultimate target), such that they do not have to be
   followed again, and return the ultimate target of the alias
   chain.   

Referenced by assemble_alias(), assemble_name(), do_assemble_alias(), globalize_decl(), and weak_finish().

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 ( )
When called within a function context, return true if the function
   has been assigned a cold text section and if SECT is that section.
   When called outside a function context, return true if SECT is the
   default cold section.   

References current_function_decl, and function_section_1().

static bool use_blocks_for_decl_p ( )
static
Return true if it is possible to put DECL in an object_block.   

References lookup_attribute(), and targetm.

Referenced by make_decl_rtl().

static bool use_object_blocks_p ( )
static
Return true if the current compilation mode benefits from having
   objects grouped into blocks.   

Referenced by build_constant_desc(), force_const_mem(), and make_decl_rtl().

void weak_finish ( void  )
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().

static void weak_finish_1 ( )
static

References asm_out_file, and warning().

Referenced by weak_finish().


Variable Documentation

int anchor_labelno
static
The next number to use for internal anchor labels.   

Referenced by get_section_anchor().

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().

alias_set_type const_alias_set
static
We give all constants their own alias set.  Perhaps redundant with
   MEM_READONLY_P, but pre-dates it.   
int const_labelno
static
Number for making the label on the next
   constant that is stored in memory.   

Referenced by assemble_static_space(), and force_const_mem().

section* ctors_section
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* elf_fini_array_section
static
section* elf_init_array_section
static
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().

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
@verbatim Output variables, constants and external declarations, for GNU compiler.

Copyright (C) 1987-2013 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

This file handles generation of all the assembler code
   *except* the instructions of a function.
   This includes declarations of variables and their initial values.

   We also output the assembler code for constants stored in memory
   and are responsible for combining constants with the same value.   
The (assembler) name of the first globally-visible object output.   
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().

rtx initial_trampoline
static
Assemble the static constant template for function entry trampolines.
   This is done at most once per compilation.
   Returns an RTX for the address of the template.   

Referenced by assemble_trampoline_template().

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().

htab_t object_block_htab
static
A table of object_blocks, indexed by section.   

Referenced by get_block_for_section(), init_varasm_once(), and output_object_blocks().

tree pending_assemble_externals
static
We delay assemble_external processing until
   the compilation unit is finalized.  This is the best we can do for
   right now (i.e. stage 3 of GCC 4.0) - the right thing is to delay
   it all the way to final.  See PR 17982 for further discussion.   
bool pending_assemble_externals_processed
static
Some targets delay some output to final using TARGET_ASM_FILE_END.
   As a result, assemble_external can be called after the list of externals
   is processed and the pointer set destroyed.   
struct pointer_set_t* pending_assemble_externals_set
static
Avoid O(external_decls**2) lookups in the pending_assemble_externals
   TREE_LIST in assemble_external.   
bool saw_no_split_stack
static
Whether we saw any functions with no_split_stack.   
section* sbss_section
section* sdata_section
htab_t section_htab
static
Hash table of named sections.   

Referenced by get_section(), and init_varasm_once().

struct rtx_constant_pool* shared_constant_pool
static
A pool of constants that can be shared between functions.   

Referenced by force_const_mem(), init_varasm_once(), and output_shared_constant_pool().

int size_directive_output
Carry information from ASM_DECLARE_OBJECT_NAME
   to ASM_FINISH_DECLARE_OBJECT.   
section* tls_comm_section
Various forms of common section.  All are guaranteed to be nonnull.   

Referenced by get_variable_section().

htab_t tm_clone_hash
static
Record and output a table of translations from original function
   to its transaction aware clone.  Note that tm_pure functions are
   considered to be their own clone.   

Referenced by finish_tm_clone_pairs(), and get_tm_clone_pair().

int trampolines_created
This is a generic routine suitable for use as TARGET_ASM_FILE_END
   which emits a special section directive used to indicate whether or
   not this object file needs an executable stack.  This is primarily
   a GNU extension to ELF but could be used on other targets.   

Referenced by expand_builtin_init_trampoline(), and file_end_indicate_exec_stack().

section* unnamed_sections
static
A linked list of all the unnamed sections.   

Referenced by get_unnamed_section().

tree weak_decls
static
This TREE_LIST contains any weak symbol declarations waiting
   to be emitted.   

Referenced by do_assemble_alias(), globalize_decl(), merge_weak(), and weak_finish().

const char* weak_global_object_name
tree weakref_targets
static
This TREE_LIST contains weakref targets.   

Referenced by do_assemble_alias(), and globalize_decl().