GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | section_common |
struct | named_section |
struct | unnamed_section |
struct | noswitch_section |
union | section |
Macros | |
#define | ATTRIBUTE_ASM_FPRINTF(m, n) |
#define | assemble_aligned_integer(SIZE, VALUE) |
#define | SECTION_STYLE(SECT) |
Typedefs | |
typedef void(* | unnamed_section_callback) (const char *) |
typedef bool(* | noswitch_section_callback) (tree decl, const char *name, unsigned HOST_WIDE_INT size, unsigned HOST_WIDE_INT rounded) |
#define assemble_aligned_integer | ( | SIZE, | |
VALUE ) |
An interface to assemble_integer for the common case in which a value is fully aligned and must be printed. VALUE is the value of the integer object and SIZE is the number of bytes it contains.
#define ATTRIBUTE_ASM_FPRINTF | ( | m, | |
n ) |
Output a string of assembler code, substituting numbers, strings and fixed syntactic prefixes.
#define SECTION_STYLE | ( | SECT | ) |
Return the style of section SECT.
Referenced by assemble_variable(), function_mergeable_rodata_prefix(), get_block_for_decl(), output_object_block(), and switch_to_section().
typedef bool(* noswitch_section_callback) (tree decl, const char *name, unsigned HOST_WIDE_INT size, unsigned HOST_WIDE_INT rounded) |
A callback that writes the assembly code for a decl in a SECTION_NOSWITCH section. DECL is the decl that should be assembled and NAME is the name of its SYMBOL_REF. SIZE is the size of the decl in bytes and ROUNDED is that size rounded up to the next BIGGEST_ALIGNMENT / BITS_PER_UNIT boundary. Return true if the callback used DECL_ALIGN to set the object's alignment. A false return value implies that we are relying on the rounded size to align the decl.
typedef void(* unnamed_section_callback) (const char *) |
A callback that writes the assembly code for switching to an unnamed section. The argument provides callback-specific data.
enum section_category |
A helper function for default_elf_select_section and default_elf_unique_section. Categorizes the DECL.
enum section_flag |
Flags controlling properties of a section.
Compute the alignment of variable specified by DECL. DONT_OUTPUT_DATA is from assemble_variable.
References BITS_PER_WORD, DECL_ALIGN, decl_binds_to_current_def_p(), DECL_INITIAL, DECL_SIZE, DECL_THREAD_LOCAL_P, DECL_USER_ALIGN, DECL_VIRTUAL_P, error(), error_mark_node, MAX, MAX_OFILE_ALIGNMENT, SET_DECL_ALIGN, targetm, TREE_CODE, TREE_TYPE, and TYPE_ALIGN.
Referenced by varpool_node::analyze(), assemble_variable(), build_constant_desc(), and get_block_for_decl().
Replace a SUBREG with a REG or a MEM, based on the thing it is a subreg of.
If X is a SUBREG, try to replace it with a REG or a MEM, based on the thing it is a subreg of. Do it anyway if FINAL_P.
References adjust_address, adjust_address_nv, byte_lowpart_offset(), gen_rtx_REG_offset(), GET_MODE, HARD_REGISTER_P, MEM_P, offset, paradoxical_subreg_p(), REG_P, simplify_subreg(), SUBREG_BYTE, subreg_lowpart_p(), SUBREG_REG, subreg_regno(), and y.
Referenced by alter_subregs(), cleanup_subreg_operands(), lra_eliminate_regs_1(), output_operand(), remove_pseudos(), simplify_operand_subreg(), and walk_alter_subreg().
|
extern |
Disable APP processing of subsequent output. Called from varasm.cc before most kinds of output.
References app_on, and asm_out_file.
Referenced by assemble_start_function(), assemble_variable(), final_end_function(), final_scan_insn_1(), and output_call_frame_info().
|
extern |
Enable APP processing of subsequent output. Used before the output from an `asm' statement.
References app_on, and asm_out_file.
Referenced by assemble_asm(), final_scan_insn_1(), and output_call_frame_info().
|
extern |
Write the address of the entity given by SYMBOL to SEC.
References assemble_align(), assemble_integer(), POINTER_SIZE, POINTER_SIZE_UNITS, and switch_to_section().
Referenced by default_elf_fini_array_asm_out_destructor(), default_elf_init_array_asm_out_constructor(), default_named_section_asm_out_constructor(), and default_named_section_asm_out_destructor().
|
extern |
Assemble an alignment pseudo op for an ALIGN-bit boundary.
References asm_out_file, and floor_log2().
Referenced by assemble_addr_to_section(), assemble_start_function(), default_print_patchable_function_entry(), dump_tm_clone_pairs(), dw2_asm_output_encoded_addr_rtx(), output_constant_pool_1(), output_object_block(), and output_one_function_exception_table().
|
extern |
Output a string of literal assembler code for an `asm' keyword used between functions.
References app_enable(), asm_out_file, TREE_CODE, TREE_OPERAND, and TREE_STRING_POINTER.
Referenced by cgraph_order_sort::process().
|
extern |
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, ASM_OUTPUT_LABEL, cold_function_name, CONSTANT_POOL_BEFORE_FUNCTION, crtl, first_function_block_is_cold, function_section(), IDENTIFIER_POINTER, in_section, NULL_TREE, output_constant_pool(), switch_to_section(), text_section, and unlikely_text_section().
Referenced by rest_of_handle_final().
|
extern |
Queue for outputting something to declare an external symbol to the assembler. (Most assemblers don't need this, so we normally output nothing.) Do nothing if DECL is not external.
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 hash_set< KeyId, Lazy, Traits >::add(), asm_out_file, DECL_ATTRIBUTES, DECL_EXTERNAL, DECL_P, DECL_WEAK, EXPANSION, FINISHED, gcc_assert, lookup_attribute(), NULL, NULL_TREE, pending_assemble_externals, TARGET_SUPPORTS_WEAK, tree_cons(), TREE_PUBLIC, TREE_STATIC, value_member(), and weak_decls.
Referenced by final_scan_insn_1(), mark_symbol_refs_as_used(), and output_addr_const().
|
extern |
Similar, for calling a library function FUN.
References gcc_assert, gen_rtx_EXPR_LIST(), get_identifier(), symtab_node::name(), pending_libcall_symbols, SYMBOL_REF_USED, targetm, and XSTR.
Referenced by emit_library_call_value_1(), output_call_frame_info(), output_function_exception_table(), and sjlj_emit_function_enter().
|
extern |
Finish outputting function label. Needs to be called when outputting function label without using assemble_function_label_raw ().
References asan_function_start(), cfun, first_function_block_is_cold, in_cold_section_p, and SANITIZE_ADDRESS.
Referenced by assemble_function_label_raw().
|
extern |
Output function label, possibly with accompanying metadata. No additional code or data is output after the label.
References ASM_OUTPUT_LABEL, assemble_function_label_final(), and symtab_node::name().
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. If FORCE is nonzero the constant must be outputable.
Referenced by dw2_asm_output_data(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw2_asm_output_encoded_addr_rtx(), dw2_asm_output_nstring(), dw2_assemble_integer(), dw2_output_indirect_constant_1(), output_ttype(), and profile_function().
|
extern |
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, fputc(), and output_addr_const().
Referenced by default_assemble_integer().
|
extern |
Assemble a label named NAME.
References ASM_OUTPUT_LABEL, and symtab_node::name().
Referenced by default_asm_declare_constant_name().
|
extern |
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(), assemble_name_resolve(), and symtab_node::name().
Referenced by default_assemble_visibility(), dw2_asm_output_delta_uleb128(), dw2_asm_output_symname_uleb128(), output_addr_const(), and output_asm_label().
|
extern |
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).
References ASM_OUTPUT_LABELREF, and symtab_node::name().
Referenced by assemble_name(), default_elf_asm_named_section(), and default_print_patchable_function_entry().
|
extern |
Return NAME that should actually be emitted, looking through transparent aliases. If NAME refers to an entity that is also represented as a tree (like a function or variable), mark the entity as referenced.
References gcc_assert, IDENTIFIER_POINTER, mark_referenced(), maybe_get_identifier(), symtab_node::name(), targetm, TREE_CHAIN, and ultimate_transparent_alias_target().
Referenced by assemble_name().
|
extern |
Assemble the floating-point constant D into an object of size MODE. ALIGN is the alignment of the constant in bits. If REVERSE is true, D is output in reverse storage order.
|
extern |
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 align_functions, app_disable(), asm_out_file, ASM_OUTPUT_FUNCTION_LABEL, ASM_OUTPUT_LABEL, assemble_align(), BB_PARTITION, gcc_debug_hooks::begin_function, cfun, cold_function_name, const_labelno, CONSTANT_POOL_BEFORE_FUNCTION, crtl, current_function_decl, debug_hooks, DECL_ATTRIBUTES, DECL_IGNORED_P, DECL_PRESERVE_P, DECL_USER_ALIGN, symtab_node::definition_alignment(), ENTRY_BLOCK_PTR_FOR_FN, first_function_block_is_cold, floor_log2(), function_section(), symtab_node::get(), ggc_strdup, globalize_decl(), in_cold_section_p, lookup_attribute(), MAX, maybe_assemble_visibility(), notice_global_symbol(), NULL, NULL_TREE, optimize_function_for_speed_p(), output_constant_pool(), saw_no_split_stack, switch_to_section(), targetm, text_section, TREE_PUBLIC, and unlikely_text_section().
Referenced by rest_of_handle_final().
|
extern |
Assemble a string constant with the specified C string as contents.
References asm_out_file, and ASM_OUTPUT_ASCII.
Referenced by lhd_append_data(), and output_constant().
|
extern |
Assemble everything that is needed for a variable declaration that has no definition in the current translation unit.
Write out assembly for the variable DECL, which is not defined in the current translation unit.
References asm_out_file, DECL_RTL, symtab_node::name(), targetm, XEXP, and XSTR.
Referenced by symbol_table::output_variables(), and cgraph_order_sort::process().
|
extern |
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, asan_red_zone_size(), asm_out_file, assemble_noswitch_variable(), assemble_variable_contents(), assemble_zeros(), section::common, DECL_ALIGN, DECL_EXTERNAL, DECL_IN_TEXT_SECTION, DECL_INITIAL, DECL_NAME, DECL_PRESERVE_P, DECL_RTL, DECL_RTL_SET_P, DECL_SIZE, DECL_SIZE_UNIT, DECL_THREAD_LOCAL_P, error(), error_mark_node, section_common::flags, floor_log2(), gcc_assert, gcc_checking_assert, GET_CODE, get_variable_align(), get_variable_section(), globalize_decl(), handle_vtv_comdat_section(), last_assemble_variable_decl, layout_decl(), MAX, maybe_assemble_visibility(), MEM_P, named_section::name, symtab_node::name(), section::named, notice_global_symbol(), output_addressed_constants(), output_constant_def_contents(), place_block_symbol(), REG_P, SANITIZE_ADDRESS, SECTION_CODE, SECTION_COMMON, SECTION_MERGE, SECTION_NAMED, SECTION_NOSWITCH, SECTION_STRINGS, SECTION_STYLE, SET_DECL_ALIGN, set_mem_align(), switch_to_section(), SYMBOL_REF_BLOCK, SYMBOL_REF_DECL, SYMBOL_REF_HAS_BLOCK_INFO_P, targetm, TREE_ASM_WRITTEN, TREE_CONSTANT_POOL_ADDRESS_P, TREE_PUBLIC, tree_to_uhwi(), valid_constant_size_p(), VAR_P, XEXP, and XSTR.
Referenced by varpool_node::assemble_decl(), and dw2_output_indirect_constant_1().
|
extern |
Assemble code to leave SIZE bytes of zeros.
References asm_out_file, assemble_integer(), section::common, const0_rtx, section_common::flags, i, in_section, and SECTION_CODE.
Referenced by assemble_variable(), assemble_variable_contents(), output_constant(), output_constant_def_contents(), output_constructor(), output_constructor_array_range(), output_constructor_bitfield(), output_constructor_regular_field(), and output_object_block().
|
extern |
Return true if DECL's initializer is suitable for a BSS section.
References DECL_COMMON, DECL_INITIAL, DECL_PERSISTENT_P, error_mark_node, initializer_zerop(), NULL, and TREE_READONLY.
Referenced by categorize_decl_for_section(), and get_variable_section().
|
extern |
References asan_protect_global(), bss_initializer_p(), CONST_CAST_TREE, DECL_INITIAL, DECL_MERGEABLE, DECL_THREAD_LOCAL_P, initializer_zerop(), NULL, SANITIZE_ADDRESS, 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, targetm, TREE_CODE, TREE_CONSTANT, TREE_READONLY, use_blocks_for_decl_p(), use_object_blocks_p(), and VAR_P.
Referenced by decl_readonly_section(), default_elf_select_section(), default_section_type_flags(), default_unique_section(), and get_section_name().
|
extern |
This can be used to compute RELOC for the function above, when given a constant expression.
Determine what kind of relocations EXP may need.
References CASE_CONVERT, compute_reloc_for_constant(), CONSTRUCTOR_ELTS, exp(), FOR_EACH_CONSTRUCTOR_VALUE, handled_component_p(), targetm, TREE_CODE, and TREE_OPERAND.
Referenced by compute_reloc_for_constant(), compute_reloc_for_var(), and get_constant_section().
|
extern |
This can be used to compute RELOC for get_variable_section.
Compute reloc for get_variable_section. The return value is a mask for which bit 1 indicates a global relocation, and bit 0 indicates a local relocation.
References compute_reloc_for_constant(), contains_pointers_p(), DECL_INITIAL, error_mark_node, and TREE_TYPE.
Referenced by get_variable_section().
|
extern |
|
extern |
Return the section for the current function, take IN_COLD_SECTION_P into account.
References current_function_decl, function_section_1(), and in_cold_section_p.
Referenced by dwarf2out_switch_text_section(), dwarf_file_hasher::equal(), final_scan_insn_1(), output_function_exception_table(), profile_function(), secname_for_decl(), and switch_to_other_text_partition().
|
extern |
Return the number of slots filled in the current delayed branch sequence (we don't count the insn needing the delay slot). Zero if not in a delayed branch sequence.
References final_sequence, and XVECLEN.
|
extern |
Decide whether DECL needs to be in a writable section. RELOC is the same as for SELECT_SECTION.
References categorize_decl_for_section(), and decl_readonly_section_1().
Referenced by default_select_section(), and readonly_data_expr().
|
extern |
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 count, and decode_reg_name_and_count().
Referenced by handle_common_deferred_options(), and make_decl_rtl().
|
extern |
Similar to decode_reg_name, but takes an extra parameter that is a pointer to the number of (internal) registers described by the external name.
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 i, symtab_node::name(), reg_names, strip_reg_name(), and table.
Referenced by decode_reg_name(), expand_asm_stmt(), and fix_register().
|
extern |
If the target doesn't override, compute the cost as with arithmetic.
References rtx_cost().
|
extern |
The default implementation of ASM_DECLARE_CONSTANT_NAME.
References assemble_label().
|
extern |
|
extern |
The default hook for TARGET_ASM_OUTPUT_SOURCE_FILENAME.
References output_quoted_string().
The default implementation of the asm_out.integer target hook.
References assemble_integer_with_op(), integer_asm_op(), and POINTER_SIZE_UNITS.
|
extern |
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(), DECL_ARTIFICIAL, DECL_ASSEMBLER_NAME, IDENTIFIER_POINTER, symtab_node::name(), NULL, type(), ultimate_transparent_alias_target(), and warning().
|
extern |
Assume ELF-ish defaults, since that's pretty much the most liberal wrt cross-module name binding.
References default_binds_local_p_3(), and exp().
|
extern |
References default_binds_local_p_3(), and exp().
|
extern |
Similar to default_binds_local_p, but common symbol may be local and extern protected data is non-local.
References default_binds_local_p_3(), and exp().
|
extern |
COMMON_LOCAL_P is true means that the linker can guarantee that an uninitialized common symbol in the executable will still be defined (through COPY relocation) in the executable.
References DECL_ATTRIBUTES, DECL_COMMON, DECL_EXTERNAL, DECL_INITIAL, DECL_P, DECL_VISIBILITY, DECL_VISIBILITY_SPECIFIED, DECL_WEAK, error_mark_node, exp(), cgraph_node::get(), symtab_node::get(), lookup_attribute(), NULL, resolution_local_p(), resolution_to_local_definition_p(), targetm, TREE_CODE, TREE_PUBLIC, VISIBILITY_DEFAULT, and VISIBILITY_PROTECTED.
Referenced by default_binds_local_p(), default_binds_local_p_1(), and default_binds_local_p_2().
|
extern |
Provide a default for the tm_clone_table section.
References get_named_section(), and NULL.
|
extern |
References asm_out_file, SECTION_CODE, and SECTION_WRITE.
Referenced by default_pe_asm_named_section().
|
extern |
|
extern |
|
extern |
References ASM_COMMENT_START, asm_out_file, assemble_name_raw(), current_function_funcdef_no, DECL_COMDAT_GROUP, gcc_assert, IDENTIFIER_POINTER, SECTION_BSS, SECTION_CODE, SECTION_DEBUG, SECTION_DECLARED, SECTION_ENTSIZE, SECTION_EXCLUDE, SECTION_LINK_ORDER, SECTION_LINKONCE, SECTION_MACH_DEP, SECTION_MERGE, SECTION_NOTYPE, SECTION_RETAIN, SECTION_SMALL, SECTION_STRINGS, SECTION_TLS, SECTION_WRITE, targetm, TLS_SECTION_ASM_FLAG, TREE_CODE, and type().
|
extern |
|
extern |
Emit text to declare externally defined symbols. It is needed to properly support non-default visibility.
References DECL_ASSEMBLER_NAME, DECL_VISIBILITY_SPECIFIED, maybe_assemble_visibility(), targetm, and TREE_SYMBOL_REFERENCED.
|
extern |
|
extern |
Use .fini_array section for destructors.
References assemble_addr_to_section(), and get_elf_initfini_array_priority_section().
|
extern |
Use .init_array section for constructors.
References assemble_addr_to_section(), and get_elf_initfini_array_priority_section().
|
extern |
Select a section based on the above categorization.
References bss_section, categorize_decl_for_section(), data_section, DECL_INITIAL, DECL_MODE, DECL_NOINIT_P, DECL_P, DECL_PERSISTENT_P, gcc_unreachable, 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.
|
extern |
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.
|
extern |
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.
Set the generally applicable flags on the SYMBOL_REF for EXP.
References DECL_EXTERNAL, DECL_P, DECL_THREAD_LOCAL_P, DECL_TLS_MODEL, GET_CODE, MEM_P, SYMBOL_FLAG_EXTERNAL, SYMBOL_FLAG_FUNCTION, SYMBOL_FLAG_HAS_BLOCK_INFO, SYMBOL_FLAG_LOCAL, SYMBOL_FLAG_SMALL, SYMBOL_FLAG_TLS_SHIFT, SYMBOL_REF_FLAGS, targetm, TREE_CODE, TREE_PUBLIC, VAR_P, and XEXP.
|
extern |
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.
|
extern |
Default target function prologue and epilogue assembler output.
Default target function prologue and epilogue assembler output. If not overridden for epilogue code, then the function body itself contains return instructions wherever needed.
Referenced by final_start_function_1().
Return the read-only or relocated read-only data section associated with function DECL.
References alloca, DECL_COMDAT_GROUP, DECL_SECTION_NAME, get_section(), symtab_node::name(), readonly_data_section, SECTION_LINKONCE, SECTION_RELRO, SECTION_WRITE, and startswith().
Default target function switched text sections.
|
extern |
This is how to output an internal numbered label where PREFIX is the class of label and LABELNO is the number within the class.
|
extern |
|
extern |
|
extern |
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 alloca, and ASM_OUTPUT_INTERNAL_LABEL.
|
extern |
|
extern |
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.
|
extern |
Output assembly to switch to section NAME with attribute FLAGS. Four variants for common object file formats.
References gcc_unreachable.
|
extern |
References asm_out_file, default_coff_asm_named_section(), SECTION_CODE, and SECTION_LINKONCE.
|
extern |
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_COMDAT_GROUP, DECL_P, decl_readonly_section_1(), DECL_THREAD_LOCAL_P, SECCAT_DATA_REL_RO, SECCAT_DATA_REL_RO_LOCAL, SECTION_BSS, SECTION_CODE, SECTION_ENTSIZE, SECTION_LINKONCE, SECTION_NOTYPE, SECTION_RELRO, SECTION_TLS, SECTION_WRITE, startswith(), TREE_CODE, and VAR_P.
References compute_reloc_for_rtx(), data_section, readonly_data_section, and targetm.
The lame default section selector.
References data_section, DECL_P, decl_readonly_section(), readonly_data_section, TREE_CODE, TREE_CONSTANT, and TREE_READONLY.
|
extern |
By default, we do nothing for encode_section_info, so we need not do anything but discard the '*' marker.
|
extern |
Construct a unique section name based on the decl name and the categorization performed above.
References categorize_decl_for_section(), DECL_ASSEMBLER_NAME, DECL_NOINIT_P, DECL_ONE_ONLY, DECL_P, DECL_PERSISTENT_P, gcc_unreachable, IDENTIFIER_POINTER, NULL, 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, set_decl_section_name(), targetm, and ultimate_transparent_alias_target().
The default implementation of TARGET_USE_ANCHORS_FOR_SYMBOL_P.
References section::common, decl_binds_to_current_def_p(), DECL_P, DECL_SIZE_UNIT, section_common::flags, gcc_checking_assert, NULL_TREE, SECTION_MERGE, SECTION_SMALL, SYMBOL_REF_BLOCK, SYMBOL_REF_DECL, targetm, tree_fits_uhwi_p(), TREE_PUBLIC, and tree_to_uhwi().
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, symtab_node::decl, DECL_ASSEMBLER_NAME, DECL_ATTRIBUTES, DECL_SOURCE_LOCATION, DECL_THREAD_LOCAL_P, error_at(), gcc_assert, gcc_checking_assert, cgraph_node::get(), globalize_decl(), IDENTIFIER_POINTER, IFUNC_ASM_TYPE, symtab_node::ifunc_resolver, lookup_attribute(), make_decl_rtl(), maybe_assemble_visibility(), symtab_node::name(), seen_error(), TARGET_SUPPORTS_ALIASES, TARGET_SUPPORTS_WEAK, targetm, TREE_ASM_WRITTEN, TREE_CHAIN, TREE_CODE, tree_cons(), TREE_PUBLIC, TREE_SYMBOL_REFERENCED, TREE_VALUE, ultimate_transparent_alias_target(), VAR_P, weak_decls, and weakref_targets.
Referenced by assemble_alias(), varpool_node::assemble_aliases(), cgraph_node::assemble_thunks_and_aliases(), and symbol_table::output_weakrefs().
Output .symver directive.
References asm_out_file, DECL_ASSEMBLER_NAME, error(), IDENTIFIER_POINTER, and ultimate_transparent_alias_target().
Referenced by varpool_node::assemble_aliases(), and cgraph_node::assemble_thunks_and_aliases().
|
extern |
References get_section(), NULL, SECTION_CODE, SECTION_DEBUG, switch_to_section(), and trampolines_created.
|
extern |
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(), NULL, saw_no_split_stack, SECTION_DEBUG, and switch_to_section().
|
extern |
Output assembler code for some insns: all or part of a function.
This is an exported final_1, callable without SEEN.
References final_1(), in_initial_view_p(), and NEXT_INSN().
|
extern |
Output assembler code for the end of a function. For clarity, args are same as those of `final_start_function' even though not all of them are needed.
References app_disable(), asm_out_file, current_function_decl, debug_hooks, DECL_IGNORED_P, dwarf2_debug_info_emitted_p(), dwarf2out_do_frame(), dwarf2out_end_epilogue(), gcc_debug_hooks::end_epilogue, gcc_debug_hooks::end_function, high_function_linenum, last_filename, last_linenum, some_local_dynamic_name, and targetm.
Referenced by rest_of_handle_final().
Return true if branch is a forward branch. Uses insn_shuid array, so it works only in the final pass. May be used by output templates to add branch prediction hints, for example.
Return true if branch is a forward branch. Uses insn_shuid array, so it works only in the final pass. May be used by output templates to customary add branch prediction hints.
References gcc_assert, INSN_SHUID, JUMP_LABEL, and uid_shuid.
|
extern |
The final scan for one insn, INSN. Args are same as in `final', except that INSN is the insn being scanned. Value returned is the next insn to be scanned.
This is a wrapper around final_scan_insn_1 that allows ports to call it recursively without a known value for SEEN. The value is saved at the outermost call, and recovered for recursive calls. Recursive calls MUST pass NULL, or the same pointer if they can otherwise get to it.
References final_scan_insn_1(), gcc_assert, and NULL.
Referenced by final_1(), final_scan_insn_1(), and final_start_function_1().
|
extern |
Output assembler code for the start of a function, and initialize some of the variables in this file for the new function. The label for the function and associated assembler pseudo-ops have already been output in `assemble_start_function'.
This is an exported final_start_function_1, callable without SEEN.
References final_start_function_1(), and gcc_assert.
|
extern |
References DECL_UID, dump_tm_clone_pairs(), FOR_EACH_HASH_TABLE_ELEMENT, map, NULL, tm_alias_pair_cmp(), tm_clone_hash, and vNULL.
Referenced by compile_file().
|
extern |
Write an unsigned long as decimal to a file, fast.
References i, and sprint_ul_rev().
|
extern |
Write a HOST_WIDE_INT number in hex form 0x1234, fast.
References CHAR_BIT.
Referenced by dw2_asm_output_data(), dw2_asm_output_data_uleb128(), and dw2_assemble_integer().
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.cc at least.
References first_function_block_is_cold, and function_section_1().
Referenced by assemble_end_function(), assemble_start_function(), dwarf2out_begin_prologue(), find_empty_loc_ranges_at_text_label(), and output_fde().
|
extern |
Obtain the current length of an insn. If branch shortening has been done, get its actual length. Otherwise, get its maximum length.
References get_attr_length_1().
Referenced by output_asm_name().
|
extern |
Obtain the current length of an insn. If branch shortening has been done, get its actual length. Otherwise, get its minimum length.
References get_attr_length_1().
Referenced by can_dup_for_shrink_wrapping(), copy_bb_p(), get_uncond_jump_length(), maybe_duplicate_computed_goto(), and maybe_reset_location_view().
Return the numbered .ctors.N (if CONSTRUCTOR_P) or .dtors.N (if not) section for PRIORITY.
References get_section(), MAX_INIT_PRIORITY, NULL, and SECTION_WRITE.
Referenced by default_named_section_asm_out_constructor(), and default_named_section_asm_out_destructor().
|
extern |
Get the function's name from a decl, as described by its RTL.
Get the function's name, as described by its RTL. This may be different from the DECL_NAME name used in the source file.
References DECL_RTL, gcc_assert, GET_CODE, MEM_P, XEXP, and XSTR.
Referenced by output_function_exception_table(), and rest_of_handle_final().
|
extern |
Locate the proper template for the given insn-code.
References insn_data_d::function, gcc_assert, gcc_unreachable, insn_data, INSN_OUTPUT_FORMAT_FUNCTION, INSN_OUTPUT_FORMAT_MULTI, INSN_OUTPUT_FORMAT_SINGLE, insn_data_d::multi, recog_data_d::operand, insn_data_d::output, recog_data, insn_data_d::single, and which_alternative.
Referenced by default_print_patchable_function_entry(), and final_scan_insn_1().
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 DECL_P, DECL_SECTION_NAME, gcc_assert, get_section(), NULL, and targetm.
Referenced by default_clone_table_section(), default_elf_select_rtx_section(), default_elf_select_section(), function_section_1(), get_named_text_section(), get_variable_section(), and hot_function_section().
|
extern |
Return section for TEXT_SECITON_NAME if DECL or DECL_SECTION_NAME (DECL) is NULL.
Return section for TEXT_SECTION_NAME if DECL or DECL_SECTION_NAME (DECL) is NULL. When DECL_SECTION_NAME is non-NULL and it is implicit section and NAMED_SECTION_SUFFIX is non-NULL, then produce section called concatenate the name with NAMED_SECTION_SUFFIX. Otherwise produce "TEXT_SECTION_NAME.IMPLICIT_NAME".
References alloca, DECL_ASSEMBLER_NAME, DECL_COMDAT_GROUP, DECL_SECTION_NAME, symtab_node::get(), get_named_section(), IDENTIFIER_POINTER, NULL, and targetm.
Referenced by default_function_section().
|
extern |
Return the named section structure associated with NAME. Create a new section with the given fields if no such structure exists. When NOT_EXISTING, then fail if the section already exists. Return the existing section if the SECTION_RETAIN bit doesn't match. Set the SECTION_WRITE | SECTION_RELRO bits on the existing section if one of the section flags is SECTION_WRITE | SECTION_RELRO and the other has none of these flags in named sections and either the section hasn't been declared yet or has been declared as writable.
References named_section::common, section::common, named_section::decl, DECL_ATTRIBUTES, DECL_P, DECL_SOURCE_LOCATION, error(), section_common::flags, ggc_alloc(), ggc_strdup, inform(), internal_error(), lookup_attribute(), named_section::name, section::named, NULL, SECTION_BSS, SECTION_CODE, SECTION_DECLARED, SECTION_ENTSIZE, section_htab, SECTION_LINKONCE, SECTION_NAMED, SECTION_NOTYPE, SECTION_OVERRIDE, SECTION_RELRO, SECTION_RETAIN, SECTION_TLS, and SECTION_WRITE.
Referenced by build_gcov_info_var_registration(), default_elf_select_rtx_section(), default_function_rodata_section(), default_named_section_asm_out_constructor(), default_named_section_asm_out_destructor(), default_print_patchable_function_entry(), elf_record_gcc_switches(), file_end_indicate_exec_stack(), file_end_indicate_split_stack(), get_cdtor_priority_section(), get_elf_initfini_array_priority_section(), get_named_section(), init_btf_sections(), init_ctf_sections(), lhd_begin_section(), mergeable_constant_section(), mergeable_string_section(), output_comdat_type_unit(), output_comp_unit(), switch_to_eh_frame_section(), switch_to_exception_section(), and switch_to_frame_table_section().
|
extern |
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, begin(), create_block_symbol(), end(), GET_MODE_BITSIZE(), ggc_strdup, HOST_WIDE_INT_1U, offset, ptr_mode, SYMBOL_FLAG_ANCHOR, SYMBOL_FLAG_LOCAL, SYMBOL_FLAG_TLS_SHIFT, SYMBOL_REF_BLOCK_OFFSET, SYMBOL_REF_FLAGS, SYMBOL_REF_TLS_MODEL, targetm, vec_safe_insert(), and vec_safe_length().
Referenced by use_anchored_address().
const char * get_some_local_dynamic_name | ( | ) |
Locate some local-dynamic symbol still in use by this function so that we can print its name in local-dynamic base patterns. Return null if there are no local-dynamic references.
References ALL, CONSTANT_POOL_ADDRESS_P, FOR_EACH_SUBRTX, GET_CODE, get_insns(), get_pool_constant(), NEXT_INSN(), NONDEBUG_INSN_P, PATTERN(), some_local_dynamic_name, SYMBOL_REF_TLS_MODEL, TLS_MODEL_LOCAL_DYNAMIC, and XSTR.
References NULL_TREE, and tm_clone_hash.
Referenced by ipa_tm_insert_gettmclone_call().
|
extern |
Return a new unnamed section with the given fields.
References unnamed_section::callback, unnamed_section::common, unnamed_section::data, section_common::flags, ggc_alloc(), unnamed_section::next, SECTION_UNNAMED, section::unnamed, and unnamed_sections.
Referenced by init_varasm_once().
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 ADDR_SPACE_GENERIC, ADDR_SPACE_GENERIC_P, asan_protect_global(), bss_initializer_p(), bss_noswitch_section, comm_section, section::common, compute_reloc_for_var(), symtab_node::decl, DECL_ATTRIBUTES, DECL_COMMON, DECL_INITIAL, DECL_NOINIT_P, DECL_SECTION_NAME, DECL_SOURCE_LOCATION, DECL_THREAD_LOCAL_P, error_at(), error_mark_node, section_common::flags, gcc_assert, varpool_node::get(), varpool_node::get_constructor(), get_named_section(), get_variable_align(), IN_NAMED_SECTION, lcomm_section, lookup_attribute(), named_section::name, section::named, NULL, resolve_unique_section(), SANITIZE_ADDRESS, SECTION_BSS, targetm, tls_comm_section, TREE_PUBLIC, TREE_TYPE, TYPE_ADDR_SPACE, and varpool_node::ultimate_alias_target().
Referenced by assemble_variable(), varpool_node::finalize_named_section_flags(), get_block_for_decl(), and write_symbol_extension_info().
|
extern |
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 bss_noswitch_section, and targetm.
|
extern |
Declarations for insn-output.cc and other code to write to asm_out_file. These functions are defined in final.cc, and varasm.cc. Copyright (C) 1987-2024 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/>.
Initialize data in final at the beginning of a compilation.
Initialize data in final at the beginning of a compilation.
References app_on, and final_sequence.
Referenced by do_compile().
|
extern |
Indicate that branch shortening hasn't yet been done.
References free(), INSN_ADDRESSES_FREE, insn_lengths, insn_lengths_max_uid, uid_align, and uid_shuid.
Referenced by expand_thunk(), and rest_of_clean_state().
|
extern |
Compute a worst-case reference address of a branch so that it can be safely used in the presence of aligned labels. Defined in final.cc.
Compute a worst-case reference address of a branch so that it can be safely used in the presence of aligned labels. Since the size of the branch itself is unknown, the size of the branch is not included in the range. I.e. for a forward branch, the reference address is the end address of the branch as known from the previous branch shortening pass, minus a value to account for possible size increase due to alignment. For a backward branch, it is the start address of the branch as known from the current pass, plus a value to account for possible size increase due to alignment. NB.: Therefore, the maximum offset allowed for backward branches needs to exclude the branch size.
References align_fuzz(), INSN_ADDRESSES_SET_P, insn_current_address, insn_last_address, insn_lengths, INSN_SHUID, INSN_UID(), JUMP_LABEL, jump_to_label_p(), length_unit_log, NEXT_INSN(), and PREV_INSN().
|
extern |
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, NULL, asm_int_op::pdi, asm_int_op::psi, asm_int_op::pti, asm_int_op::si, targetm, and asm_int_op::ti.
Referenced by default_assemble_integer(), default_print_patchable_function_entry(), dw2_asm_output_data(), and dw2_assemble_integer().
|
extern |
Find the alignment associated with a CODE_LABEL. Defined in final.cc.
For the benefit of port specific code do this also as a function.
References CODE_LABEL_NUMBER, LABEL_TO_ALIGNMENT, and max_labelno.
|
extern |
Return true if this function has no function calls.
References CALL_P, crtl, FAKE_CALL_P, gcc_assert, GET_CODE, get_insns(), in_sequence_p(), NEXT_INSN(), NONJUMP_INSN_P, PATTERN(), SIBLING_CALL_P, targetm, and XVECEXP.
Referenced by gen_call_used_regs_seq(), ira(), ira_setup_eliminable_regset(), and rest_of_handle_check_leaf_regs().
|
extern |
Scan IN_RTX and its subexpressions, and renumber all regs into those available in leaf functions.
|
extern |
Marks SYMBOL_REFs in x as referenced through use of assemble_external.
References ALL, assemble_external(), FOR_EACH_SUBRTX, GET_CODE, and SYMBOL_REF_DECL.
Referenced by output_operand().
A helper function to call assemble_visibility when needed for a decl.
References DECL_VISIBILITY, targetm, and VISIBILITY_DEFAULT.
Referenced by assemble_start_function(), assemble_variable(), default_elf_asm_output_external(), and do_assemble_alias().
|
extern |
Return the section to use for constant merging.
References alloca, function_mergeable_rodata_prefix(), GET_MODE_BITSIZE(), get_section(), known_le, symtab_node::name(), NULL, readonly_data_section, and SECTION_MERGE.
Referenced by default_elf_select_rtx_section(), and default_elf_select_section().
|
extern |
Default target hook that outputs nothing to a stream.
|
extern |
Return true if this function uses only the registers that can be safely renumbered.
Referenced by rest_of_handle_check_leaf_regs().
|
extern |
Print an integer constant expression in assembler syntax. Addition and subtraction are the only arithmetic that may appear in these expressions.
References assemble_external(), assemble_name(), CODE_LABEL_NUMBER, CONST_DOUBLE_AS_INT_P, CONST_DOUBLE_HIGH, CONST_DOUBLE_LOW, CONST_FIXED_VALUE_LOW, CONST_INT_P, CONST_WIDE_INT_ELT, CONST_WIDE_INT_NUNITS, wide_int_storage::from_array(), GET_CODE, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_PRINT_DEC, HOST_WIDE_INT_PRINT_DOUBLE_HEX, HOST_WIDE_INT_PRINT_HEX, INTVAL, label_ref_label(), output_addr_const(), output_operand_lossage(), print_decs(), simplify_subtraction(), SYMBOL_REF_DECL, targetm, XEXP, and XSTR.
Referenced by assemble_integer_with_op(), dw2_assemble_integer(), dwarf2out_do_cfi_startproc(), output_addr_const(), and output_asm_insn().
|
extern |
Print a memory reference operand for address X with access mode MODE using machine-dependent assembler syntax.
Print a memory reference operand for address X using machine-dependent assembler syntax.
References asm_out_file, changed, targetm, and walk_alter_subreg().
Referenced by output_asm_insn().
|
extern |
Output a string of assembler code, substituting insn operands. Defined in final.cc.
Output text from TEMPLATE to the assembler output file, obeying %-directions to substitute operands taken from the vector OPERANDS. %N (for N a digit) means print operand N in usual manner. %lN means require operand N to be a CODE_LABEL or LABEL_REF and print the label name with no punctuation. %cN means require operand N to be a constant and print the constant expression with no punctuation. %aN means expect operand N to be a memory address (not a memory reference!) and print a reference to that address. %nN means expect operand N to be a constant and print a constant expression for minus the value of the operand, with no other punctuation.
References asm_out_file, CONST_INT_P, CONSTANT_ADDRESS_P, HOST_WIDE_INT_PRINT_DEC, insn_counter, insn_noperands, INTVAL, NULL_RTX, output_addr_const(), output_address(), output_asm_label(), output_asm_name(), output_asm_operand_names(), output_operand(), output_operand_lossage(), targetm, and this_is_asm_operands.
Referenced by default_print_patchable_function_entry(), and final_scan_insn_1().
|
extern |
Output a LABEL_REF, or a bare CODE_LABEL, as an assembler symbol.
References asm_out_file, assemble_name(), CODE_LABEL_NUMBER, GET_CODE, LABEL_P, label_ref_label(), NOTE_KIND, NOTE_P, and output_operand_lossage().
Referenced by output_asm_insn().
|
extern |
Output a file name in the form wanted by System V.
References NULL, remap_debug_filename(), and targetm.
Referenced by default_file_start().
|
extern |
Output the definitions of all object_blocks.
References FOR_EACH_HASH_TABLE_ELEMENT, FOR_EACH_VEC_ELT, i, object_block_htab, output_object_block(), and output_object_block_compare().
Referenced by compile_file().
|
extern |
Print an operand using machine-dependent assembler syntax.
Print operand X using machine-dependent assembler syntax. CODE is a non-digit that preceded the operand-number in the % spec, such as 'z' if the spec was `%z3'. CODE is 0 if there was no char between the % and the digits. When CODE is a non-letter, X is 0. The meanings of the letters are machine-dependent and controlled by TARGET_PRINT_OPERAND.
References alter_subreg(), asm_out_file, gcc_assert, GET_CODE, mark_symbol_refs_as_used(), NULL_RTX, REG_P, REGNO, and targetm.
Referenced by output_asm_insn().
|
extern |
Report inconsistency between the assembler template and the operands. In an `asm', it's the user's fault; otherwise, the compiler's fault.
References _, ap, error_for_asm(), free(), internal_error(), and this_is_asm_operands.
Referenced by crash_signal(), output_addr_const(), output_asm_insn(), and output_asm_label().
|
extern |
Output a quoted string.
Referenced by default_asm_output_source_filename(), and generic_type_p().
|
extern |
Output DIRECTIVE (a C string) followed by a newline. This is used as a get_unnamed_section callback.
References asm_out_file.
Referenced by init_varasm_once().
|
extern |
Write the contents of the shared constant pool.
References optimize_constant_pool(), output_constant_pool_contents(), shared_constant_pool, and TARGET_SUPPORTS_ALIASES.
Referenced by compile_file().
|
extern |
Stack usage.
Output stack usage and callgraph info, as requested.
References callgraph_info_file, dump_final_node_vcg(), NULL, and output_stack_usage_1().
Referenced by rest_of_handle_thread_prologue_and_epilogue().
Referenced by final_scan_insn_1().
|
extern |
If block symbol SYMBOL has not yet been assigned an offset, place it at the end of its block.
References symtab_node::alias, constant_descriptor_rtx::align, object_block::alignment, asan_protect_global(), ASAN_RED_ZONE_SIZE, asan_red_zone_size(), CONSTANT_POOL_ADDRESS_P, symtab_node::decl, DECL_ALIGN, DECL_IN_CONSTANT_POOL, DECL_INITIAL, DECL_RTL, DECL_SIZE_UNIT, gcc_assert, gcc_checking_assert, symtab_node::get(), GET_CODE, get_constant_size(), GET_MODE_SIZE(), get_variable_align(), MAX, MEM_P, constant_descriptor_rtx::mode, object_block::objects, offset, place_block_symbol(), SANITIZE_ADDRESS, object_block::size, SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET, SYMBOL_REF_CONSTANT, SYMBOL_REF_DECL, SYMBOL_REF_HAS_BLOCK_INFO_P, TREE_CODE, TREE_CONSTANT_POOL_ADDRESS_P, tree_to_uhwi(), symtab_node::ultimate_alias_target(), vec_safe_push(), and XEXP.
Referenced by assemble_variable(), output_constant_def_contents(), output_constant_pool_contents(), place_block_symbol(), and use_anchored_address().
References hash_table< Descriptor, Lazy, Allocator >::create_ggc(), ggc_alloc(), NULL, and tm_clone_hash.
Referenced by ipa_tm_create_version(), ipa_tm_create_version_alias(), and ipa_tm_execute().
|
extern |
Make a pass over all insns and compute their actual lengths by shortening any branches of variable length if possible.
Make a pass over all insns and compute their actual lengths by shortening any branches of variable length if possible.
shorten_branches might be called multiple times: for example, the SH port splits out-of-range conditional branches in MACHINE_DEPENDENT_REORG. In order to do this, it needs proper length information, which it obtains by calling shorten_branches. This cannot be collapsed with shorten_branches itself into a single pass unless we also want to integrate reorg.cc, since the branch splitting exposes new instructions with delay slots.
References ADDR_DIFF_VEC_FLAGS, ADDR_VEC_ALIGN, align_fuzz(), as_a(), asm_insn_count(), asm_noperands(), BARRIER_P, addr_diff_vec_flags::base_after_vec, crtl, DEBUG_INSN_P, rtx_insn::deleted(), dyn_cast(), fatal_insn, free(), gcc_assert, gcc_checking_assert, GET_CODE, get_insns(), get_last_insn(), get_max_uid(), GET_MODE_SIZE(), grow_label_align(), i, rtx_sequence::insn(), INSN_ADDRESSES, INSN_ADDRESSES_ALLOC, insn_current_address, insn_current_align, insn_last_address, INSN_LENGTH_ALIGNMENT, insn_lengths, insn_lengths_max_uid, INSN_P, INSN_SHUID, INSN_UID(), JUMP_TABLE_DATA_P, jump_table_for_label(), JUMP_TABLES_IN_TEXT_SECTION, LABEL_ALIGN, LABEL_ALIGN_AFTER_BARRIER, LABEL_P, LABEL_TO_ALIGNMENT, rtx_sequence::len(), log(), align_flags::max(), addr_diff_vec_flags::max_after_base, addr_diff_vec_flags::max_after_vec, MAX_CODE_ALIGN, max_label_num(), max_labelno, max_uid, addr_diff_vec_flags::min_after_base, addr_diff_vec_flags::min_after_vec, addr_diff_vec_flags::min_align, min_align(), NEXT_INSN(), NONJUMP_INSN_P, NOTE_P, NULL_RTX, PATTERN(), PREV_INSN(), PUT_MODE(), readonly_data_section, safe_as_a(), table, text_section, uid_align, uid_shuid, XEXP, XVECEXP, and XVECLEN.
Referenced by rest_of_handle_shorten_branches().
|
extern |
Write an unsigned long as decimal to a string, fast. s must be wide enough to not overflow, at least 21 chars. Returns the length of the string (without terminating '\0').
References sprint_ul_rev().
|
extern |
Switch to the other function partition (if inside of hot section into cold section, otherwise into the hot section).
References current_function_section(), in_cold_section_p, and 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, DECL_ATTRIBUTES, DECL_P, DECL_SOURCE_LOCATION, section_common::flags, gcc_unreachable, in_section, inform(), lookup_attribute(), named_section::name, section::named, SECTION_DECLARED, SECTION_NAMED, SECTION_NOSWITCH, SECTION_RETAIN, SECTION_STYLE, SECTION_UNNAMED, targetm, section::unnamed, and warning().
Referenced by assemble_addr_to_section(), assemble_end_function(), assemble_start_function(), assemble_trampoline_template(), assemble_variable(), symbol_table::compile(), default_print_patchable_function_entry(), dump_tm_clone_pairs(), dwarf2out_begin_prologue(), dwarf2out_switch_text_section(), elf_record_gcc_switches(), dwarf_file_hasher::equal(), file_end_indicate_exec_stack(), file_end_indicate_split_stack(), final_scan_insn_1(), find_empty_loc_ranges_at_text_label(), lhd_begin_section(), lhd_end_section(), output_btf_header(), output_comdat_type_unit(), output_comp_unit(), output_constant_def_contents(), output_constant_pool_contents(), output_ctf_header(), output_fde(), output_function_exception_table(), output_object_block(), output_pubtables(), output_ranges(), output_rnglists(), output_skeleton_debug_sections(), profile_function(), run_rtl_passes(), switch_to_comdat_section(), switch_to_eh_frame_section(), switch_to_exception_section(), switch_to_frame_table_section(), and switch_to_other_text_partition().
|
extern |
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 find_empty_loc_ranges_at_text_label().
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().
|
extern |
Functions in varasm.cc.
Emit any pending weak declarations.
Emit any pending weak declarations.
References asm_out_file, build_decl(), DECL_ARTIFICIAL, DECL_ASSEMBLER_NAME, DECL_EXTERNAL, DECL_SOURCE_LOCATION, find_decl(), IDENTIFIER_POINTER, NULL_TREE, TREE_CHAIN, TREE_CODE, TREE_NOTHROW, TREE_PUBLIC, TREE_PURPOSE, TREE_SYMBOL_REFERENCED, TREE_TYPE, TREE_USED, TREE_VALUE, ultimate_transparent_alias_target(), weak_decls, weak_finish_1(), and weakref_targets.
Referenced by compile_file().
|
extern |
A SECTION_NOSWITCH section used for declaring global BSS variables. May be null.
Referenced by get_variable_section(), have_global_bss_p(), and init_varasm_once().
|
extern |
Referenced by default_elf_select_section(), and init_varasm_once().
|
extern |
Referenced by get_variable_section(), and init_varasm_once().
|
extern |
Referenced by init_varasm_once().
|
extern |
Nonnull if the insn currently being emitted was a COND_EXEC pattern.
Referenced by final_scan_insn_1().
|
extern |
Last insn processed by final_scan_insn.
Referenced by final_scan_insn_1().
|
extern |
|
extern |
Referenced by init_varasm_once().
|
extern |
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().
|
extern |
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().
|
extern |
When outputting delayed branch sequences, this rtx holds the sequence being output. It is null when no delayed branch sequence is being output, so it can be used as a test in the insn output code. This variable is defined in final.cc.
If we are outputting an insn sequence, this contains the sequence rtx. Zero otherwise.
Referenced by dbr_sequence_length(), final_scan_insn_1(), and init_final().
|
extern |
The following global variable indicates if the first basic block in a function belongs to the cold partition or not.
Referenced by assemble_end_function(), assemble_function_label_final(), assemble_start_function(), decide_function_section(), dw2_output_call_site_table(), dw_loc_list(), and function_section().
|
extern |
File in which assembler code is being written.
The first global object in the file.
Output variables, constants and external declarations, for GNU compiler. Copyright (C) 1987-2024 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.
Referenced by coverage_compute_profile_id(), get_file_function_name(), and notice_global_symbol().
|
extern |
True if code for the current function is currently being directed at the cold section.
Referenced by assemble_function_label_final(), assemble_start_function(), current_function_section(), decide_function_section(), dw_loc_list(), dwarf2out_switch_text_section(), final_scan_insn_1(), secname_for_decl(), and switch_to_other_text_partition().
|
extern |
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(), assemble_zeros(), default_print_patchable_function_entry(), lhd_begin_section(), output_constant_pool_1(), switch_to_comdat_section(), and switch_to_section().
|
extern |
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 assemble_variable(), assemble_variable_contents(), and rest_of_decl_compilation().
|
extern |
Referenced by get_variable_section(), and init_varasm_once().
|
extern |
Referenced by assemble_trampoline_template(), default_elf_select_section(), default_function_rodata_section(), default_no_function_rodata_section(), default_select_rtx_section(), default_select_section(), init_varasm_once(), mergeable_constant_section(), mergeable_string_section(), shorten_branches(), switch_to_eh_frame_section(), and switch_to_exception_section().
|
extern |
Referenced by init_varasm_once().
|
extern |
Referenced by init_varasm_once().
|
extern |
Carry information from ASM_DECLARE_OBJECT_NAME to ASM_FINISH_DECLARE_OBJECT.
|
extern |
Special well-known sections.
Well-known sections, each one associated with some sort of *_ASM_OP.
Referenced by assemble_end_function(), assemble_start_function(), symbol_table::compile(), dwarf2out_begin_prologue(), dwarf2out_switch_text_section(), find_empty_loc_ranges_at_text_label(), hot_function_section(), init_varasm_once(), lhd_begin_section(), run_rtl_passes(), and shorten_branches().
|
extern |
Nonzero while outputting an `asm' with operands. This means that inconsistencies are the user's fault, so don't die. The precise value is the insn being output, to pass to error_for_asm.
Referenced by crash_signal(), final_scan_insn_1(), final_start_function_1(), output_asm_insn(), and output_operand_lossage().
|
extern |
Various forms of common section. All are guaranteed to be nonnull.
Referenced by get_variable_section(), and init_varasm_once().
|
extern |
User label prefix in effect for this compilation.
The user symbol prefix after having resolved same.
Referenced by asm_fprintf(), symbol_table::assembler_names_equal_p(), symbol_table::decl_assembler_name_hash(), default_mangle_assembler_name(), and process_options().
|
extern |
The first weak object in the file.
Referenced by get_file_function_name(), and notice_global_symbol().