GCC Middle and Back End API 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 |
typedef struct tm_alias_pair tm_alias_pair |
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 |
Referenced by output_constructor_regular_field().
|
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 |
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_alias | ( | ) |
Emit an assembler directive to make the symbol for DECL an alias to the symbol for TARGET.
References symtab_node_base::alias, alias_pairs, cgraph_get_create_node(), cgraph_global_info_ready, CGRAPH_STATE_EXPANSION, do_assemble_alias(), error(), error_at(), find_decl(), lookup_attribute(), cgraph_node::symbol, varpool_node::symbol, ultimate_transparent_alias_target(), varpool_node_for_decl(), and vec_safe_push().
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 |
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 |
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 |
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 | ( | ) |
References assemble_integer(), min_align(), and real_to_target().
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 |
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().
|
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().
enum section_category categorize_decl_for_section | ( | ) |
References asan_protect_global(), bss_initializer_p(), initializer_zerop(), SECCAT_BSS, SECCAT_DATA, SECCAT_DATA_REL, SECCAT_DATA_REL_LOCAL, SECCAT_DATA_REL_RO, SECCAT_DATA_REL_RO_LOCAL, SECCAT_RODATA, SECCAT_RODATA_MERGE_CONST, SECCAT_RODATA_MERGE_STR, SECCAT_RODATA_MERGE_STR_INIT, SECCAT_SBSS, SECCAT_SDATA, SECCAT_SRODATA, SECCAT_TBSS, SECCAT_TDATA, SECCAT_TEXT, and targetm.
|
static |
Make sure block symbol SYMBOL is in block BLOCK.
Referenced by make_decl_rtl().
Referenced by compare_constant(), and const_desc_eq().
|
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 |
References compute_reloc_for_rtx_1(), and for_each_rtx().
Referenced by default_elf_select_rtx_section(), and default_select_rtx_section().
|
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 |
Referenced by init_varasm_once().
|
static |
Wrapper of compare_constant, for the htab interface.
References compare_constant(), constant_descriptor_tree::hash, and constant_descriptor_tree::value.
|
static |
Referenced by init_varasm_once().
|
static |
Compute a hash code for a constant expression.
|
static |
References constant_descriptor_rtx::constant, constant_descriptor_rtx::mode, and rtx_equal_p().
Referenced by create_constant_pool().
|
static |
Hash and compare functions for const_rtx_htab.
References constant_descriptor_rtx::hash.
Referenced by create_constant_pool().
|
static |
Referenced by const_hash_1(), lookup_constant_def(), output_constant_def(), and tree_output_constant_def().
|
static |
References addr_const::base, const_hash_1(), decode_addr_const(), fixed_hash(), int_size_in_bytes(), len, addr_const::offset, and real_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 |
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 | ) |
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 |
Referenced by contains_pointers_p(), and get_variable_section().
|
static |
Return 1 if type TYPE contains any pointers.
References contains_pointers_p().
Referenced by build_constant_desc(), and 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 |
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().
|
staticread |
Create and return a new rtx constant pool.
References const_desc_rtx_eq(), const_desc_rtx_hash(), rtx_constant_pool::const_rtx_htab, rtx_constant_pool::first, rtx_constant_pool::last, and rtx_constant_pool::offset.
Referenced by init_varasm_once(), and init_varasm_status().
section* current_function_section | ( | void | ) |
Return the section for the current function, take IN_COLD_SECTION_P into account.
References current_function_decl, and function_section_1().
Referenced by dwarf2out_begin_block(), dwarf2out_end_block(), dwarf2out_note_section_used(), dwarf2out_source_line(), dwarf2out_switch_text_section(), final_scan_insn(), output_function_exception_table(), profile_function(), and sdbout_one_type().
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().
enum tls_model decl_default_tls_model | ( | ) |
References targetm, TLS_MODEL_GLOBAL_DYNAMIC, TLS_MODEL_INITIAL_EXEC, TLS_MODEL_LOCAL_DYNAMIC, and TLS_MODEL_LOCAL_EXEC.
bool decl_readonly_section | ( | ) |
References categorize_decl_for_section(), and decl_readonly_section_1().
|
static |
Referenced by decl_readonly_section(), and default_section_type_flags().
|
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 |
Referenced by compare_constant(), and const_hash_1().
|
static |
int decode_reg_name | ( | ) |
References count, and decode_reg_name_and_count().
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().
bool 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 | ||
) |
References assemble_addr_to_section().
void default_dtor_section_asm_out_destructor | ( | rtx | symbol, |
int | priority | ||
) |
References assemble_addr_to_section().
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 | ||
) |
References compute_reloc_for_rtx(), get_named_section(), mergeable_constant_section(), and targetm.
section* default_elf_select_section | ( | tree | decl, |
int | reloc, | ||
unsigned HOST_WIDE_INT | align | ||
) |
Select a section based on the above categorization.
References bss_section, categorize_decl_for_section(), data_section, get_named_section(), mergeable_constant_section(), mergeable_string_section(), readonly_data_section, SECCAT_BSS, SECCAT_DATA, SECCAT_DATA_REL, SECCAT_DATA_REL_LOCAL, SECCAT_DATA_REL_RO, SECCAT_DATA_REL_RO_LOCAL, SECCAT_RODATA, SECCAT_RODATA_MERGE_CONST, SECCAT_RODATA_MERGE_STR, SECCAT_RODATA_MERGE_STR_INIT, SECCAT_SBSS, SECCAT_SDATA, SECCAT_SRODATA, SECCAT_TBSS, SECCAT_TDATA, and SECCAT_TEXT.
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 | ( | ) |
References assemble_addr_to_section(), get_cdtor_priority_section(), and get_section().
void default_named_section_asm_out_destructor | ( | ) |
References assemble_addr_to_section(), get_cdtor_priority_section(), and get_section().
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 | ||
) |
References asm_out_file, and default_coff_asm_named_section().
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 | ||
) |
References compute_reloc_for_rtx(), readonly_data_section, and targetm.
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.
void default_unique_section | ( | ) |
Construct a unique section name based on the decl name and the categorization performed above.
References build_string(), categorize_decl_for_section(), SECCAT_BSS, SECCAT_DATA, SECCAT_DATA_REL, SECCAT_DATA_REL_LOCAL, SECCAT_DATA_REL_RO, SECCAT_DATA_REL_RO_LOCAL, SECCAT_RODATA, SECCAT_RODATA_MERGE_CONST, SECCAT_RODATA_MERGE_STR, SECCAT_RODATA_MERGE_STR_INIT, SECCAT_SBSS, SECCAT_SDATA, SECCAT_SRODATA, SECCAT_TBSS, SECCAT_TDATA, SECCAT_TEXT, strlen(), and targetm.
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 |
Dump the actual pairs to the .tm_clone_table section.
References assemble_align(), assemble_integer(), cgraph_get_node(), symtab_node_base::definition, tm_alias_pair::from, switch_to_section(), cgraph_node::symbol, targetm, and tm_alias_pair::to.
Referenced by finish_tm_clone_pairs().
|
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 |
A noswitch_section_callback for bss_noswitch_section.
References asm_out_file, and get_variable_align().
Referenced by init_varasm_once().
|
static |
A noswitch_section_callback for comm_section.
References asm_out_file, and get_variable_align().
Referenced by init_varasm_once().
|
static |
A noswitch_section_callback for lcomm_section.
References asm_out_file.
Referenced by init_varasm_once().
|
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 | ) |
References get_section(), switch_to_section(), and trampolines_created.
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 |
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 | ) |
References dump_tm_clone_pairs(), dump_tm_clone_to_vec(), tm_alias_pair_cmp(), tm_clone_hash, and vNULL.
Referenced by compile_file().
rtx force_const_mem | ( | ) |
Given a constant rtx X, make (or find) a memory constant for its value and return a MEM rtx to refer to it in memory.
References constant_descriptor_rtx::align, const_labelno, const_rtx_hash(), rtx_constant_pool::const_rtx_htab, constant_descriptor_rtx::constant, copy_rtx(), create_block_symbol(), rtx_constant_pool::first, gen_const_mem(), get_block_for_section(), constant_descriptor_rtx::hash, constant_descriptor_rtx::labelno, rtx_constant_pool::last, make_tree(), constant_descriptor_rtx::mark, constant_descriptor_rtx::mem, constant_descriptor_rtx::mode, constant_descriptor_rtx::next, rtx_constant_pool::offset, constant_descriptor_rtx::offset, set_mem_align(), set_mem_attributes(), shared_constant_pool, constant_descriptor_rtx::sym, targetm, lang_hooks_for_types::type_for_mode, lang_hooks::types, use_object_blocks_p(), and word_mode.
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 |
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().
|
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().
|
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 |
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 |
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 |
References elf_fini_array_section, elf_init_array_section, and get_section().
Referenced by default_elf_fini_array_asm_out_destructor(), and default_elf_init_array_asm_out_constructor().
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 |
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().
tree get_tm_clone_pair | ( | ) |
References tree_map::base, tree_map_base::from, tree_map::hash, tm_clone_hash, and tree_map::to.
section* get_unnamed_section | ( | unsigned int | flags, |
void(*)(const void *) | callback, | ||
const void * | data | ||
) |
Return a new unnamed section with the given fields.
References unnamed_section::callback, unnamed_section::common, unnamed_section::data, section_common::flags, unnamed_section::next, object_block::sect, section::unnamed, and unnamed_sections.
Referenced by init_varasm_once().
|
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 |
Referenced by assemble_start_function(), assemble_variable(), and do_assemble_alias().
|
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 |
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 |
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 |
Referenced by assemble_external_real().
|
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_once | ( | void | ) |
In varasm.c
References const_desc_eq(), const_desc_hash(), const_desc_htab, create_constant_pool(), emit_bss(), emit_common(), emit_local(), emit_tls_common(), get_noswitch_section(), get_unnamed_section(), new_alias_set(), object_block_entry_eq(), object_block_entry_hash(), object_block_htab, output_section_asm_op(), pointer_set_create(), section_entry_eq(), section_entry_hash(), section_htab, shared_constant_pool, targetm, and text_section.
Referenced by backend_init().
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 |
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 |
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 |
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 |
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 | ( | ) |
Set the symbol_referenced flag for DECL and notify callgraph.
References cgraph_get_create_node(), cgraph_mark_force_output_node(), symtab_node_base::definition, symtab_node_base::force_output, cgraph_node::symbol, varpool_node::symbol, and varpool_node_for_decl().
void mark_referenced | ( | ) |
Set the symbol_referenced flag for ID.
|
static |
Referenced by declare_weak(), and merge_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 |
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 |
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 |
|
inlinestatic |
A and B are either alignments or offsets. Return the minimum alignment that may be assumed after adding the two together.
|
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 |
Helper routines for maintaining object_block_htab.
References object_block::sect.
Referenced by init_varasm_once().
|
static |
References hash_section(), and object_block::sect.
Referenced by init_varasm_once().
|
static |
Referenced by assemble_variable(), output_addressed_constants(), and output_constant_def_contents().
|
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 |
Referenced by assemble_variable(), mark_constant(), and maybe_output_constant_def_contents().
|
static |
We must output the constant data referred to by SYMBOL; do so.
References asan_protect_global(), asan_red_zone_size(), asm_out_file, assemble_constant_contents(), assemble_zeros(), exp(), floor_log2(), get_constant_section(), get_constant_size(), mudflap_enqueue_constant(), output_addressed_constants(), place_block_symbol(), and switch_to_section().
|
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 |
Worker function for output_constant_pool. Emit constant DESC, giving it ALIGN bits of alignment.
References asm_out_file, assemble_align(), section::common, constant_descriptor_rtx::constant, section_common::flags, constant_descriptor_rtx::labelno, constant_descriptor_rtx::mode, output_constant_pool_2(), and targetm.
Referenced by output_constant_pool_contents(), and output_object_block().
|
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 |
Write all the constants in POOL.
References constant_descriptor_rtx::align, constant_descriptor_rtx::constant, rtx_constant_pool::first, constant_descriptor_rtx::mark, constant_descriptor_rtx::mode, constant_descriptor_rtx::next, output_constant_pool_1(), place_block_symbol(), switch_to_section(), constant_descriptor_rtx::sym, and targetm.
Referenced by output_constant_pool(), and output_shared_constant_pool().
|
static |
Subroutine of output_constant, used for CONSTRUCTORs (aggregate constants). Generate at least SIZE bytes, padding if necessary. OUTER designates the caller output state of relevance in recursive invocations.
References oc_local_state::align, asm_out_file, assemble_integer(), assemble_zeros(), oc_outer_state::bit_offset, build_nonstandard_integer_type(), oc_outer_state::byte, oc_local_state::byte, oc_local_state::byte_buffer_in_use, exp(), oc_local_state::exp, oc_local_state::field, HOST_BITS_PER_WIDE_INT, constructor_elt_d::index, oc_local_state::index, oc_local_state::last_relative_index, oc_local_state::min_index, output_constructor_array_range(), output_constructor_bitfield(), output_constructor_regular_field(), oc_local_state::size, oc_local_state::total_bytes, oc_local_state::type, oc_local_state::val, constructor_elt_d::value, and vec_safe_iterate().
Referenced by output_constant(), and output_constructor_bitfield().
|
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 |
Helper for output_constructor. From the LOCAL state, output an element that is a true bitfield or part of an outer one. BIT_OFFSET is the offset from the start of a possibly ongoing outer byte buffer.
References assemble_integer(), assemble_zeros(), oc_outer_state::bit_offset, oc_outer_state::byte, oc_local_state::byte, oc_local_state::byte_buffer_in_use, error(), oc_local_state::field, HOST_BITS_PER_WIDE_INT, oc_local_state::index, int_bit_position(), oc_local_state::last_relative_index, oc_local_state::min_index, output_constructor(), shift, oc_local_state::total_bytes, tree_low_cst(), oc_local_state::type, and oc_local_state::val.
Referenced by output_constructor().
|
static |
Helper for output_constructor. From the current LOCAL state, output a field element that is not true bitfield or part of an outer one.
References oc_local_state::align, array_size_for_constructor(), assemble_integer(), assemble_zeros(), oc_local_state::byte, oc_local_state::byte_buffer_in_use, oc_local_state::field, oc_local_state::index, int_byte_position(), int_size_in_bytes(), double_int::low, min_align(), oc_local_state::min_index, output_constant(), double_int::sext(), oc_local_state::total_bytes, tree_low_cst(), tree_to_double_int(), oc_local_state::type, and oc_local_state::val.
Referenced by output_constructor().
void output_file_directive | ( | ) |
Output a file name in the form wanted by System V.
References len, remap_debug_filename(), strlen(), and targetm.
|
static |
Output the objects in BLOCK.
References object_block::alignment, object_block::anchors, asan_protect_global(), asan_red_zone_size(), assemble_align(), assemble_constant_contents(), assemble_variable_contents(), assemble_zeros(), get_constant_size(), constant_descriptor_rtx::mode, object_block::objects, offset, output_constant_pool_1(), object_block::sect, switch_to_section(), targetm, and tree_low_cst().
Referenced by 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 | ( | ) |
If block symbol SYMBOL has not yet been assigned an offset, place it at the end of its block.
References constant_descriptor_rtx::align, object_block::alignment, asan_protect_global(), asan_red_zone_size(), get_constant_size(), get_variable_align(), constant_descriptor_rtx::mode, object_block::objects, offset, object_block::size, tree_low_cst(), and vec_safe_push().
void process_pending_assemble_externals | ( | void | ) |
References assemble_external_real(), and pointer_set_destroy().
Referenced by compile_file().
void record_tm_clone_pair | ( | ) |
References tree_map::base, tree_map_base::from, tree_map::hash, tree_map::to, and tree_map_hash().
|
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 |
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 |
Helper routines for maintaining section_htab.
References named_section::name, and section::named.
Referenced by init_varasm_once().
|
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 |
Referenced by decode_reg_name_and_count().
|
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 |
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().
|
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 |
Return true if it is possible to put DECL in an object_block.
References lookup_attribute(), and targetm.
Referenced by make_decl_rtl().
|
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 |
References asm_out_file, and warning().
Referenced by weak_finish().
vec<alias_pair, va_gc>* alias_pairs |
Define gc'd vector type.
Referenced by assemble_alias(), free_lang_data_in_cgraph(), function_and_variable_visibility(), handle_alias_pairs(), ipa_lower_emutls(), and produce_asm_for_decls().
|
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 |
Referenced by default_elf_select_section().
section* comm_section |
Referenced by get_variable_section().
|
static |
We give all constants their own alias set. Perhaps redundant with MEM_READONLY_P, but pre-dates it.
|
static |
|
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* data_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().
|
static |
Referenced by get_elf_initfini_array_priority_section().
|
static |
Referenced by get_elf_initfini_array_priority_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().
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().
|
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().
|
static |
A table of object_blocks, indexed by section.
Referenced by get_block_for_section(), init_varasm_once(), and output_object_blocks().
|
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.
|
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.
|
static |
Avoid O(external_decls**2) lookups in the pending_assemble_externals TREE_LIST in assemble_external.
section* readonly_data_section |
|
static |
Whether we saw any functions with no_split_stack.
section* sbss_section |
section* sdata_section |
|
static |
Hash table of named sections.
Referenced by get_section(), and init_varasm_once().
|
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* text_section |
Well-known sections, each one associated with some sort of *_ASM_OP.
Referenced by dbxout_finish(), dbxout_init(), dbxout_source_file(), dwarf2out_begin_function(), dwarf2out_begin_prologue(), dwarf2out_finish(), dwarf2out_init(), dwarf2out_note_section_used(), dwarf2out_switch_text_section(), hot_function_section(), init_varasm_once(), lhd_begin_section(), set_cur_line_info_table(), shorten_branches(), and vmsdbgout_finish().
section* tls_comm_section |
Various forms of common section. All are guaranteed to be nonnull.
Referenced by get_variable_section().
|
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().
|
static |
A linked list of all the unnamed sections.
Referenced by get_unnamed_section().
|
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 |
|
static |
This TREE_LIST contains weakref targets.
Referenced by do_assemble_alias(), and globalize_decl().