GCC Middle and Back End API Reference
|
#include "expr.h"
Data Structures | |
struct | dw_cfi_row_struct |
struct | reg_saved_in_data_struct |
struct | dw_trace_info |
struct | trace_info_hasher |
struct | queued_reg_save |
Typedefs | |
typedef struct dw_cfi_row_struct | dw_cfi_row |
typedef struct reg_saved_in_data_struct | reg_saved_in_data |
typedef dw_trace_info * | dw_trace_info_ref |
Variables | |
static vec< dw_trace_info > | trace_info |
static vec< dw_trace_info_ref > | trace_work_list |
static hash_table < trace_info_hasher > | trace_index |
cfi_vec | cie_cfi_vec |
static dw_cfi_row * | cie_cfi_row |
static reg_saved_in_data * | cie_return_save |
static unsigned long | dwarf2out_cfi_label_num |
static rtx | add_cfi_insn |
static cfi_vec * | add_cfi_vec |
static dw_trace_info * | cur_trace |
static dw_cfi_row * | cur_row |
static dw_cfa_location * | cur_cfa |
static vec< queued_reg_save > | queued_reg_saves |
static bool | any_cfis_emitted |
static unsigned | dw_stack_pointer_regnum |
static unsigned | dw_frame_pointer_regnum |
static signed char | saved_do_cfi_asm = 0 |
typedef struct dw_cfi_row_struct dw_cfi_row |
A collected description of an entire row of the abstract CFI table.
typedef dw_trace_info* dw_trace_info_ref |
typedef struct reg_saved_in_data_struct reg_saved_in_data |
The caller's ORIG_REG is saved in SAVED_IN_REG.
|
static |
Add CFI either to the current insn stream or to a vector, or both.
References add_cfi_insn, add_cfi_vec, emit_note_after(), and vec_safe_push().
Referenced by add_cfi_args_size(), add_cfi_restore(), change_cfi_row(), connect_traces(), def_cfa_1(), dwarf2out_frame_debug_cfa_expression(), dwarf2out_frame_debug_cfa_window_save(), and reg_save().
|
static |
References add_cfi(), dw_cfi_oprnd_struct::dw_cfi_offset, dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, and new_cfi().
Referenced by connect_traces(), and notice_eh_throw().
|
static |
References add_cfi(), dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_oprnd_struct::dw_cfi_reg_num, and new_cfi().
Referenced by change_cfi_row(), and dwarf2out_frame_debug_cfa_restore().
|
static |
Walk the function, looking for NOTE_INSN_CFI notes. Add the CFIs to the function's FDE, adding CFI labels and set_loc/advance_loc opcodes as necessary.
References active_insn_p(), cfi_label_required_p(), cfun, dw_cfi_oprnd_struct::dw_cfi_addr, dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_fde_struct::dw_fde_cfi, dw_fde_struct::dw_fde_switch_cfi_index, dwarf2out_cfi_label(), dwarf2out_cfi_label_num, emit_note_before(), function::fde, first, get_insns(), new_cfi(), vec_safe_length(), and vec_safe_push().
Referenced by execute_dwarf2_frame().
|
static |
Return the insn before the first NOTE_INSN_CFI after START.
Referenced by connect_traces().
bool cfa_equal_p | ( | ) |
Determine if two dw_cfa_location structures define the same data.
References cfa_loc::base_offset, cfa_loc::indirect, cfa_loc::offset, and cfa_loc::reg.
Referenced by cfi_row_equal_p(), convert_cfa_to_fb_loc_list(), and def_cfa_0().
|
static |
Determine if two CFI entries are identical.
References cfi_oprnd_equal_p(), dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_oprnd1_desc(), dw_cfi_struct::dw_cfi_oprnd2, and dw_cfi_oprnd2_desc().
Referenced by cfi_row_equal_p(), and change_cfi_row().
|
static |
Examine CFI and return true if a cfi label and set_loc is needed beforehand. Even when generating CFI assembler instructions, we still have to add the cfi to the list so that lookup_cfa_1 works later on. When -g2 and above we even need to force emitting of CFI labels and add to list a DW_CFA_set_loc for convert_cfa_to_fb_loc_list purposes. If we're generating DWARF3 output we use DW_OP_call_frame_cfa and so don't use convert_cfa_to_fb_loc_list.
References DINFO_LEVEL_TERSE, dw_cfi_struct::dw_cfi_opc, DWARF2_DEBUG, dwarf2out_do_cfi_asm(), and VMS_AND_DWARF2_DEBUG.
Referenced by add_cfis_to_fde().
|
static |
Determine if two CFI operands are identical.
References dw_cfi_oprnd_struct::dw_cfi_addr, dw_cfi_oprnd_struct::dw_cfi_loc, dw_cfi_oprnd_struct::dw_cfi_offset, dw_cfi_oprnd_addr, dw_cfi_oprnd_loc, dw_cfi_oprnd_offset, dw_cfi_oprnd_reg_num, dw_cfi_oprnd_unused, dw_cfi_oprnd_struct::dw_cfi_reg_num, and loc_descr_equal_p().
Referenced by cfi_equal_p().
|
static |
Determine if two CFI_ROW structures are identical.
References dw_cfi_row_struct::cfa, dw_cfi_row_struct::cfa_cfi, cfa_equal_p(), cfi_equal_p(), dw_cfi_row_struct::reg_save, and vec_safe_length().
Referenced by connect_traces(), and maybe_record_trace_start().
|
static |
Emit CFI info to change the state from OLD_ROW to NEW_ROW.
References add_cfi(), add_cfi_restore(), dw_cfi_row_struct::cfa, dw_cfi_row_struct::cfa_cfi, cfi_equal_p(), def_cfa_0(), dw_cfi_row_struct::reg_save, and vec_safe_length().
Referenced by connect_traces().
|
static |
Does INSN clobber any register which QUEUED_REG_SAVES lists a saved location for? Or, does it clobber a register which we've previously said that some other register is saved in, and for which we now have a new location for?
References compare_reg_or_pc(), cur_trace, modified_in_p(), reg_saved_in_data_struct::orig_reg, queued_reg_save::reg, dw_trace_info::regs_saved_in_regs, and reg_saved_in_data_struct::saved_in_reg.
Referenced by dwarf2out_frame_debug(), and scan_trace().
|
static |
Compare X and Y for equivalence. The inputs may be REGs or PC_RTX.
Referenced by clobbers_queued_reg_save(), queue_reg_save(), and record_reg_saved_in_reg().
|
static |
Insert CFI notes between traces to properly change state between them.
References add_cfi(), add_cfi_args_size(), add_cfi_insn, dw_trace_info::args_size_undefined, before_next_cfi_note(), dw_trace_info::beg_delay_args_size, dw_trace_info::beg_row, cfi_row_equal_p(), cfun, change_cfi_row(), cie_cfi_row, dump_file, dw_cfi_struct::dw_cfi_opc, function::eh, dw_trace_info::eh_head, dw_trace_info::end_delay_args_size, dw_trace_info::end_row, dw_trace_info::head, HOST_WIDE_INT, dw_trace_info::id, eh_status::lp_array, new_cfi(), output_cfi_directive(), and dw_trace_info::switch_sections.
Referenced by execute_dwarf2_frame().
|
static |
Return a copy of an existing CFI row.
References dw_cfi_row_struct::reg_save, and vec_safe_copy().
Referenced by maybe_record_trace_start(), and scan_trace().
|
static |
Scan the function and create the initial set of CFI notes.
References scan_trace().
Referenced by execute_dwarf2_frame().
|
static |
References add_cfi_vec, cie_cfi_row, cie_cfi_vec, cie_return_save, cur_row, cur_trace, def_cfa_1(), dw_stack_pointer_regnum, initial_return_save(), memset(), new_cfi_row(), cfa_loc::offset, cfa_loc::reg, dw_trace_info::regs_saved_in_regs, targetm, and UI_DWARF2.
Referenced by execute_dwarf2_frame().
|
static |
Set up the pseudo-cfg of instruction traces, as described at the block comment at the top of the file.
References dw_trace_info::beg_row, dw_cfi_row_struct::cfa, dw_trace_info::cfa_store, dw_trace_info::cfa_temp, cie_cfi_row, cie_return_save, hash_table< Descriptor, Allocator >::create(), dump_file, hash_table< Descriptor, Allocator >::find_slot_with_hash(), get_insns(), dw_trace_info::head, dw_trace_info::id, memset(), cfa_loc::reg, dw_trace_info::regs_saved_in_regs, rtx_name, save_point_p(), and dw_trace_info::switch_sections.
Referenced by execute_dwarf2_frame().
|
static |
Propagate CUR_TRACE state to the destinations implied by INSN.
??? Sadly, this is in large part a duplicate of make_edges.
References can_nonlocal_goto(), function::can_throw_non_call_exceptions, cfun, computed_jump_p(), extract_asm_operands(), find_reg_note(), get_eh_landing_pad_from_rtx(), eh_landing_pad_d::landing_pad, maybe_record_trace_start(), maybe_record_trace_start_abnormal(), returnjump_p(), and tablejump_p().
Referenced by scan_trace().
void debug_cfi_row | ( | dw_cfi_row * | row | ) |
void debug_cfi_row | ( | ) |
References dump_cfi_row().
|
static |
The CFA is now calculated from NEW_CFA. Consider OLD_CFA in determining what opcode to emit. Returns the CFI opcode to effect the change, or NULL if NEW_CFA == OLD_CFA.
References build_cfa_loc(), cfa_equal_p(), dw_cfi_oprnd_struct::dw_cfi_loc, dw_cfi_oprnd_struct::dw_cfi_offset, dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_struct::dw_cfi_oprnd2, dw_cfi_oprnd_struct::dw_cfi_reg_num, cfa_loc::indirect, new_cfi(), cfa_loc::offset, and cfa_loc::reg.
Referenced by change_cfi_row(), def_cfa_1(), and dump_cfi_row().
|
static |
Similarly, but take OLD_CFA from CUR_ROW, and update it after the fact.
References add_cfi(), dw_cfi_row_struct::cfa, dw_cfi_row_struct::cfa_cfi, dw_trace_info::cfa_store, cur_row, cur_trace, def_cfa_0(), dw_cfi_struct::dw_cfi_opc, cfa_loc::indirect, cfa_loc::offset, and cfa_loc::reg.
Referenced by create_cie_data(), and scan_trace().
|
inlinestatic |
Divide OFF by DWARF_CIE_DATA_ALIGNMENT, asserting no remainder.
References HOST_WIDE_INT.
Referenced by output_cfi().
|
static |
References dw_cfi_row_struct::cfa, dw_cfi_row_struct::cfa_cfi, def_cfa_0(), memset(), output_cfi_directive(), cfa_loc::reg, and dw_cfi_row_struct::reg_save.
Referenced by debug_cfi_row().
|
static |
Generate a new label for the CFI info to refer to.
References dwarf2out_cfi_label_num.
Referenced by add_cfis_to_fde().
bool dwarf2out_do_cfi_asm | ( | void | ) |
Decide whether to emit frame unwind via assembler directives.
References dwarf2out_do_frame(), saved_do_cfi_asm, and UI_DWARF2.
Referenced by cfi_label_required_p(), dwarf2out_assembly_start(), dwarf2out_begin_prologue(), dwarf2out_emit_cfi(), dwarf2out_end_epilogue(), dwarf2out_switch_text_section(), and output_call_frame_info().
bool dwarf2out_do_frame | ( | void | ) |
Decide whether we want to emit frame unwind information for the current translation unit.
References DWARF2_DEBUG, targetm, UI_DWARF2, and VMS_AND_DWARF2_DEBUG.
Referenced by compile_file(), dwarf2out_begin_prologue(), dwarf2out_do_cfi_asm(), final_end_function(), final_scan_insn(), and gate_dwarf2_frame().
void dwarf2out_emit_cfi | ( | ) |
References asm_out_file, dwarf2out_do_cfi_asm(), and output_cfi_directive().
Referenced by final_scan_insn().
|
static |
Output all the entries in QUEUED_REG_SAVES.
References queued_reg_save::cfa_offset, dwf_regno(), pc_rtx, record_reg_saved_in_reg(), queued_reg_save::reg, reg_save(), and queued_reg_save::saved_reg.
Referenced by dwarf2out_frame_debug(), dwarf2out_frame_debug_expr(), and scan_trace().
|
static |
Record call frame debugging information for INSN, which either sets SP or FP (adjusting how we calculate the frame address) or saves a register to the stack.
References cfun, clobbers_queued_reg_save(), dwarf2out_flush_queued_reg_saves(), dwarf2out_frame_debug_adjust_cfa(), dwarf2out_frame_debug_cfa_expression(), dwarf2out_frame_debug_cfa_offset(), dwarf2out_frame_debug_cfa_register(), dwarf2out_frame_debug_cfa_restore(), dwarf2out_frame_debug_cfa_window_save(), dwarf2out_frame_debug_def_cfa(), dwarf2out_frame_debug_expr(), dwf_regno(), function::fde, and dw_fde_struct::vdrap_reg.
Referenced by scan_insn_after().
|
static |
A subroutine of dwarf2out_frame_debug, process a REG_ADJUST_CFA note.
References cur_cfa, dwf_regno(), cfa_loc::indirect, cfa_loc::offset, cfa_loc::reg, and SET.
Referenced by dwarf2out_frame_debug().
|
static |
A subroutine of dwarf2out_frame_debug, process a REG_CFA_EXPRESSION note.
References add_cfi(), cur_row, dw_cfi_oprnd_struct::dw_cfi_loc, dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_struct::dw_cfi_oprnd2, dw_cfi_oprnd_struct::dw_cfi_reg_num, dwf_regno(), get_address_mode(), mem_loc_descriptor(), new_cfi(), targetm, update_row_reg_save(), and VAR_INIT_STATUS_INITIALIZED.
Referenced by dwarf2out_frame_debug().
|
static |
A subroutine of dwarf2out_frame_debug, process a REG_CFA_OFFSET note.
References cur_cfa, dwf_regno(), HOST_WIDE_INT, limit, cfa_loc::offset, offset, pc_rtx, cfa_loc::reg, reg_save(), and targetm.
Referenced by dwarf2out_frame_debug().
|
static |
A subroutine of dwarf2out_frame_debug, process a REG_CFA_REGISTER note.
References dwf_regno(), pc_rtx, record_reg_saved_in_reg(), and reg_save().
Referenced by dwarf2out_frame_debug().
|
static |
A subroutine of dwarf2out_frame_debug, process a REG_CFA_RESTORE note.
References add_cfi_restore(), cur_row, dwf_regno(), and update_row_reg_save().
Referenced by dwarf2out_frame_debug().
|
static |
A subroutine of dwarf2out_frame_debug, process a REG_CFA_WINDOW_SAVE. ??? Perhaps we should note in the CIE where windows are saved (instead of assuming 0(cfa)) and what registers are in the window.
References add_cfi(), dw_cfi_struct::dw_cfi_opc, and new_cfi().
Referenced by dwarf2out_frame_debug().
|
static |
A subroutine of dwarf2out_frame_debug, process a REG_DEF_CFA note.
References cfa_loc::base_offset, cur_cfa, dwf_regno(), cfa_loc::indirect, memset(), cfa_loc::offset, and cfa_loc::reg.
Referenced by dwarf2out_frame_debug().
|
static |
Record call frame debugging information for an expression EXPR, which either sets SP or FP (adjusting how we calculate the frame address) or saves a register to the stack or another register. LABEL indicates the address of EXPR. This function encodes a state machine mapping rtxes to actions on cfa, cfa_store, and cfa_temp.reg. We describe these rules so users need not read the source code. The High-Level Picture Changes in the register we use to calculate the CFA: Currently we assume that if you copy the CFA register into another register, we should take the other one as the new CFA register; this seems to work pretty well. If it's wrong for some target, it's simple enough not to set RTX_FRAME_RELATED_P on the insn in question. Changes in the register we use for saving registers to the stack: This is usually SP, but not always. Again, we deduce that if you copy SP into another register (and SP is not the CFA register), then the new register is the one we will be using for register saves. This also seems to work. Register saves: There's not much guesswork about this one; if RTX_FRAME_RELATED_P is set on an insn which modifies memory, it's a register save, and the register used to calculate the destination had better be the one we think we're using for this purpose. It's also assumed that a copy from a call-saved register to another register is saving that register if RTX_FRAME_RELATED_P is set on that instruction. If the copy is from a call-saved register to the *same* register, that means that the register is now the same value as in the caller. Except: If the register being saved is the CFA register, and the offset is nonzero, we are saving the CFA, so we assume we have to use DW_CFA_def_cfa_expression. If the offset is 0, we assume that the intent is to save the value of SP from the previous frame. In addition, if a register has previously been saved to a different register, Invariants / Summaries of Rules cfa current rule for calculating the CFA. It usually consists of a register and an offset. This is actually stored in *cur_cfa, but abbreviated for the purposes of this documentation. cfa_store register used by prologue code to save things to the stack cfa_store.offset is the offset from the value of cfa_store.reg to the actual CFA cfa_temp register holding an integral value. cfa_temp.offset stores the value, which will be used to adjust the stack pointer. cfa_temp is also used like cfa_store, to track stores to the stack via fp or a temp reg. Rules 1- 4: Setting a register's value to cfa.reg or an expression with cfa.reg as the first operand changes the cfa.reg and its cfa.offset. Rule 1 and 4 also set cfa_temp.reg and cfa_temp.offset. Rules 6- 9: Set a non-cfa.reg register value to a constant or an expression yielding a constant. This sets cfa_temp.reg and cfa_temp.offset. Rule 5: Create a new register cfa_store used to save items to the stack. Rules 10-14: Save a register to the stack. Define offset as the difference of the original location and cfa_store's location (or cfa_temp's location if cfa_temp is used). Rules 16-20: If AND operation happens on sp in prologue, we assume stack is realigned. We will use a group of DW_OP_XXX expressions to represent the location of the stored register instead of CFA+offset. The Rules "{a,b}" indicates a choice of a xor b. "<reg>:cfa.reg" indicates that <reg> must equal cfa.reg. Rule 1: (set <reg1> <reg2>:cfa.reg) effects: cfa.reg = <reg1> cfa.offset unchanged cfa_temp.reg = <reg1> cfa_temp.offset = cfa.offset Rule 2: (set sp ({minus,plus,losum} {sp,fp}:cfa.reg {<const_int>,<reg>:cfa_temp.reg})) effects: cfa.reg = sp if fp used cfa.offset += {+/- <const_int>, cfa_temp.offset} if cfa.reg==sp cfa_store.offset += {+/- <const_int>, cfa_temp.offset} if cfa_store.reg==sp Rule 3: (set fp ({minus,plus,losum} <reg>:cfa.reg <const_int>)) effects: cfa.reg = fp cfa_offset += +/- <const_int> Rule 4: (set <reg1> ({plus,losum} <reg2>:cfa.reg <const_int>)) constraints: <reg1> != fp <reg1> != sp effects: cfa.reg = <reg1> cfa_temp.reg = <reg1> cfa_temp.offset = cfa.offset Rule 5: (set <reg1> (plus <reg2>:cfa_temp.reg sp:cfa.reg)) constraints: <reg1> != fp <reg1> != sp effects: cfa_store.reg = <reg1> cfa_store.offset = cfa.offset - cfa_temp.offset Rule 6: (set <reg> <const_int>) effects: cfa_temp.reg = <reg> cfa_temp.offset = <const_int> Rule 7: (set <reg1>:cfa_temp.reg (ior <reg2>:cfa_temp.reg <const_int>)) effects: cfa_temp.reg = <reg1> cfa_temp.offset |= <const_int> Rule 8: (set <reg> (high <exp>)) effects: none Rule 9: (set <reg> (lo_sum <exp> <const_int>)) effects: cfa_temp.reg = <reg> cfa_temp.offset = <const_int> Rule 10: (set (mem ({pre,post}_modify sp:cfa_store (???? <reg1> <const_int>))) <reg2>) effects: cfa_store.offset -= <const_int> cfa.offset = cfa_store.offset if cfa.reg == sp cfa.reg = sp cfa.base_offset = -cfa_store.offset Rule 11: (set (mem ({pre_inc,pre_dec,post_dec} sp:cfa_store.reg)) <reg>) effects: cfa_store.offset += -/+ mode_size(mem) cfa.offset = cfa_store.offset if cfa.reg == sp cfa.reg = sp cfa.base_offset = -cfa_store.offset Rule 12: (set (mem ({minus,plus,losum} <reg1>:{cfa_store,cfa_temp} <const_int>)) <reg2>) effects: cfa.reg = <reg1> cfa.base_offset = -/+ <const_int> - {cfa_store,cfa_temp}.offset Rule 13: (set (mem <reg1>:{cfa_store,cfa_temp}) <reg2>) effects: cfa.reg = <reg1> cfa.base_offset = -{cfa_store,cfa_temp}.offset Rule 14: (set (mem (post_inc <reg1>:cfa_temp <const_int>)) <reg2>) effects: cfa.reg = <reg1> cfa.base_offset = -cfa_temp.offset cfa_temp.offset -= mode_size(mem) Rule 15: (set <reg> {unspec, unspec_volatile}) effects: target-dependent Rule 16: (set sp (and: sp <const_int>)) constraints: cfa_store.reg == sp effects: cfun->fde.stack_realign = 1 cfa_store.offset = 0 fde->drap_reg = cfa.reg if cfa.reg != sp and cfa.reg != fp Rule 17: (set (mem ({pre_inc, pre_dec} sp)) (mem (plus (cfa.reg) (const_int)))) effects: cfa_store.offset += -/+ mode_size(mem) Rule 18: (set (mem ({pre_inc, pre_dec} sp)) fp) constraints: fde->stack_realign == 1 effects: cfa_store.offset = 0 cfa.reg != HARD_FRAME_POINTER_REGNUM Rule 19: (set (mem ({pre_inc, pre_dec} sp)) cfa.reg) constraints: fde->stack_realign == 1 && cfa.offset == 0 && cfa.indirect == 0 && cfa.reg != HARD_FRAME_POINTER_REGNUM effects: Use DW_CFA_def_cfa_expression to define cfa cfa.reg == fde->drap_reg
References cfa_loc::base_offset, dw_trace_info::cfa_store, dw_trace_info::cfa_temp, cfun, cur_cfa, cur_trace, dw_fde_struct::drap_reg, dw_fde_struct::drap_reg_saved, dw_frame_pointer_regnum, dw_stack_pointer_regnum, dwarf2out_flush_queued_reg_saves(), dwf_regno(), function::fde, HOST_WIDE_INT, cfa_loc::indirect, limit, cfa_loc::offset, offset, queue_reg_save(), cfa_loc::reg, reg_saved_in(), SET, dw_fde_struct::stack_realign, dw_fde_struct::stack_realignment, and targetm.
Referenced by dwarf2out_frame_debug().
|
static |
Convert a DWARF call frame info. operation to its string name
Referenced by output_cfi().
|
inlinestatic |
Short-hand inline for the very common D_F_R (REGNO (x)) operation.
??? This ought to go into dwarf2out.h, except that dwarf2out.h is used in places where rtl is prohibited.
Referenced by dwarf2out_flush_queued_reg_saves(), dwarf2out_frame_debug(), dwarf2out_frame_debug_adjust_cfa(), dwarf2out_frame_debug_cfa_expression(), dwarf2out_frame_debug_cfa_offset(), dwarf2out_frame_debug_cfa_register(), dwarf2out_frame_debug_cfa_restore(), dwarf2out_frame_debug_def_cfa(), dwarf2out_frame_debug_expr(), and initial_return_save().
|
static |
Annotate the function with NOTE_INSN_CFI notes to record the CFI state at each location within the function. These notes will be emitted during pass_final.
References add_cfis_to_fde(), connect_traces(), create_cfi_notes(), create_cie_data(), create_pseudo_cfg(), hash_table< Descriptor, Allocator >::dispose(), dwarf2out_alloc_current_fde(), and dw_trace_info::regs_saved_in_regs.
rtx expand_builtin_dwarf_sp_column | ( | void | ) |
Hook used by __throw.
Referenced by expand_builtin().
void expand_builtin_init_dwarf_reg_sizes | ( | ) |
Generate code to initialize the register size table.
References choose_hard_reg_mode(), emit_move_insn(), expand_normal(), gen_int_mode(), gen_rtx_MEM(), HOST_WIDE_INT, init_return_column_size(), offset, and targetm.
Referenced by expand_builtin().
|
static |
References dwarf2out_do_frame().
|
static |
This function fills in aa dw_cfa_location structure from a dwarf location descriptor sequence.
References cfa_loc::base_offset, dw_loc_descr_struct::dw_loc_next, dw_loc_descr_struct::dw_loc_oprnd1, dw_loc_descr_struct::dw_loc_oprnd2, cfa_loc::indirect, cfa_loc::offset, cfa_loc::reg, dw_val_struct::v, dw_val_struct::dw_val_struct_union::val_int, and dw_val_struct::dw_val_struct_union::val_unsigned.
Referenced by lookup_cfa_1().
|
static |
References hash_table< Descriptor, Allocator >::find_with_hash(), and dw_trace_info::head.
Referenced by maybe_record_trace_start().
|
static |
MEM is a memory reference for the register size table, each element of which has mode MODE. Initialize column C as a return address column.
References emit_move_insn(), HOST_WIDE_INT, and offset.
Referenced by expand_builtin_init_dwarf_reg_sizes().
|
static |
Record the initial position of the return address. RTL is INCOMING_RETURN_ADDR_RTX.
References dw_cfi_row_struct::cfa, cur_row, dwf_regno(), HOST_WIDE_INT, cfa_loc::offset, offset, pc_rtx, record_reg_saved_in_reg(), and reg_save().
Referenced by create_cie_data().
void lookup_cfa_1 | ( | ) |
Find the previous value for the CFA, iteratively. CFI is the opcode to interpret, *LOC will be updated as necessary, *REMEMBER is used for one level of remember/restore state processing.
References dw_cfi_oprnd_struct::dw_cfi_loc, dw_cfi_oprnd_struct::dw_cfi_offset, dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_struct::dw_cfi_oprnd2, dw_cfi_oprnd_struct::dw_cfi_reg_num, get_cfa_from_loc_descr(), cfa_loc::in_use, cfa_loc::offset, and cfa_loc::reg.
Referenced by convert_cfa_to_fb_loc_list().
rtl_opt_pass* make_pass_dwarf2_frame | ( | ) |
|
static |
If LABEL is the start of a trace, then initialize the state of that trace from CUR_TRACE and CUR_ROW.
References dw_trace_info::args_size_undefined, dw_trace_info::beg_row, dw_trace_info::beg_true_args_size, dw_trace_info::cfa_store, dw_trace_info::cfa_temp, cfi_row_equal_p(), copy_cfi_row(), cur_row, cur_trace, dump_file, dw_trace_info::end_true_args_size, get_trace_info(), HOST_WIDE_INT, dw_trace_info::id, dw_trace_info::regs_saved_in_regs, and rtx_name.
Referenced by create_trace_edges(), maybe_record_trace_start_abnormal(), and scan_trace().
|
static |
Similarly, but handle the args_size and CFA reset across EH and non-local goto edges.
References dw_cfi_row_struct::cfa, cur_row, cur_trace, dw_trace_info::end_true_args_size, HOST_WIDE_INT, maybe_record_trace_start(), cfa_loc::offset, and cfa_loc::reg.
Referenced by create_trace_edges().
|
inlinestatic |
Return true if we need a signed version of a given opcode (e.g. DW_CFA_offset_extended_sf vs DW_CFA_offset_extended).
Referenced by reg_save().
|
inlinestatic |
Return a pointer to a newly allocated Call Frame Instruction.
References dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_struct::dw_cfi_oprnd2, and dw_cfi_oprnd_struct::dw_cfi_reg_num.
Referenced by add_cfi_args_size(), add_cfi_restore(), add_cfis_to_fde(), connect_traces(), def_cfa_0(), dwarf2out_frame_debug_cfa_expression(), dwarf2out_frame_debug_cfa_window_save(), and reg_save().
|
static |
Return a newly allocated CFI row, with no defined data.
References dw_cfi_row_struct::cfa, and cfa_loc::reg.
Referenced by create_cie_data().
|
static |
A subroutine of scan_trace. Check INSN for a REG_ARGS_SIZE note and adjust data structures to match.
References cur_cfa, cur_trace, dw_trace_info::end_true_args_size, find_reg_note(), HOST_WIDE_INT, cfa_loc::indirect, cfa_loc::offset, and cfa_loc::reg.
Referenced by scan_insn_after().
|
static |
A subroutine of scan_trace. INSN is can_throw_internal. Update the data within the trace related to EH insns and args_size.
References add_cfi_args_size(), dw_trace_info::beg_delay_args_size, cur_trace, dw_trace_info::eh_head, dw_trace_info::end_delay_args_size, dw_trace_info::end_true_args_size, and HOST_WIDE_INT.
Referenced by scan_trace().
|
static |
This routine will generate the correct assembly data for a location description based on a cfi entry with a complex address.
References dw2_asm_output_data(), dw2_asm_output_data_uleb128(), dw_cfi_oprnd_struct::dw_cfi_loc, dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_struct::dw_cfi_oprnd2, dw_cfi_oprnd_struct::dw_cfi_reg_num, output_loc_sequence(), and size_of_locs().
Referenced by output_cfi().
|
static |
Similar, but used for .cfi_escape.
References asm_out_file, dw2_asm_output_data_uleb128_raw(), dw_cfi_oprnd_struct::dw_cfi_loc, dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_struct::dw_cfi_oprnd2, dw_cfi_oprnd_struct::dw_cfi_reg_num, output_loc_sequence_raw(), and size_of_locs().
Referenced by output_cfi_directive().
void output_cfi | ( | ) |
Output a Call Frame Information opcode and its operand(s).
References div_data_align(), dw2_asm_output_addr(), dw2_asm_output_data(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), dw2_asm_output_encoded_addr_rtx(), dw_cfi_oprnd_struct::dw_cfi_addr, dw_cfi_oprnd_struct::dw_cfi_offset, dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_struct::dw_cfi_oprnd2, dw_cfi_oprnd_struct::dw_cfi_reg_num, dw_fde_struct::dw_fde_current_label, dwarf_cfi_name(), HOST_WIDE_INT, HOST_WIDE_INT_PRINT_HEX, and output_cfa_loc().
Referenced by output_call_frame_info(), and output_fde().
void output_cfi_directive | ( | ) |
Similar, but do it via assembler directives instead.
References asm_out_file, dw2_asm_output_data_uleb128_raw(), dw_cfi_oprnd_struct::dw_cfi_offset, dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_struct::dw_cfi_oprnd2, dw_cfi_oprnd_struct::dw_cfi_reg_num, HOST_WIDE_INT_PRINT_DEC, and output_cfa_loc_raw().
Referenced by connect_traces(), dump_cfi_row(), dwarf2out_emit_cfi(), and print_rtx().
|
static |
Add an entry to QUEUED_REG_SAVES saying that REG is now saved at SREG, or if SREG is NULL then it is saved at OFFSET to the CFA.
References compare_reg_or_pc(), and queued_reg_save::reg.
Referenced by dwarf2out_frame_debug_expr().
|
static |
Record SRC as being saved in DEST. DEST may be null to delete an existing entry. SRC may be a register or PC_RTX.
References compare_reg_or_pc(), cur_trace, reg_saved_in_data_struct::orig_reg, dw_trace_info::regs_saved_in_regs, and reg_saved_in_data_struct::saved_in_reg.
Referenced by dwarf2out_flush_queued_reg_saves(), dwarf2out_frame_debug_cfa_register(), and initial_return_save().
|
static |
Add the CFI for saving a register. REG is the CFA column number. If SREG is -1, the register is saved at OFFSET from the CFA; otherwise it is saved in SREG.
References add_cfi(), build_cfa_aligned_loc(), dw_cfi_row_struct::cfa, cfun, cur_row, dw_cfi_oprnd_struct::dw_cfi_loc, dw_cfi_oprnd_struct::dw_cfi_offset, dw_cfi_struct::dw_cfi_opc, dw_cfi_struct::dw_cfi_oprnd1, dw_cfi_struct::dw_cfi_oprnd2, dw_cfi_oprnd_struct::dw_cfi_reg_num, function::fde, need_data_align_sf_opcode(), new_cfi(), offset, dw_fde_struct::stack_realign, dw_fde_struct::stack_realignment, and update_row_reg_save().
Referenced by dwarf2out_flush_queued_reg_saves(), dwarf2out_frame_debug_cfa_offset(), dwarf2out_frame_debug_cfa_register(), and initial_return_save().
|
static |
What register, if any, is currently saved in REG?
References cur_trace, reg_saved_in_data_struct::orig_reg, queued_reg_save::reg, dw_trace_info::regs_saved_in_regs, reg_saved_in_data_struct::saved_in_reg, and queued_reg_save::saved_reg.
Referenced by dwarf2out_frame_debug_expr().
|
static |
References inside_basic_block_p().
Referenced by create_pseudo_cfg(), and scan_trace().
|
static |
A subroutine of scan_trace. Do what needs to be done "after" INSN.
References dwarf2out_frame_debug(), and notice_args_size().
Referenced by scan_trace().
|
static |
Scan the trace beginning at INSN and create the CFI notes for the instructions therein.
References add_cfi_insn, dw_trace_info::beg_row, dw_trace_info::beg_true_args_size, can_throw_internal(), dw_cfi_row_struct::cfa, clobbers_queued_reg_save(), copy_cfi_row(), create_trace_edges(), cur_cfa, cur_row, cur_trace, def_cfa_1(), dump_file, dwarf2out_flush_queued_reg_saves(), dw_trace_info::end_row, dw_trace_info::end_true_args_size, find_reg_note(), dw_trace_info::head, HOST_WIDE_INT, dw_trace_info::id, inside_basic_block_p(), maybe_record_trace_start(), notice_eh_throw(), dw_cfi_row_struct::reg_save, rtx_name, save_point_p(), scan_insn_after(), and vec_safe_copy().
Referenced by create_cfi_notes().
|
static |
Perform ROW->REG_SAVE[COLUMN] = CFI. CFI may be null, indicating that the register column is no longer saved.
References dw_cfi_row_struct::reg_save, vec_safe_grow_cleared(), and vec_safe_length().
Referenced by dwarf2out_frame_debug_cfa_expression(), dwarf2out_frame_debug_cfa_restore(), and reg_save().
|
static |
The insn after which a new CFI note should be emitted.
Referenced by add_cfi(), connect_traces(), and scan_trace().
|
static |
When non-null, add_cfi will add the CFI to this vector.
Referenced by add_cfi(), and create_cie_data().
|
static |
True if any CFI directives were emitted at the current insn.
|
static |
The state of the first row of the FDE table, which includes the state provided by the CIE.
Referenced by connect_traces(), create_cie_data(), and create_pseudo_cfg().
cfi_vec cie_cfi_vec |
A vector of call frame insns for the CIE.
Referenced by convert_cfa_to_fb_loc_list(), create_cie_data(), and output_call_frame_info().
|
static |
Referenced by create_cie_data(), and create_pseudo_cfg().
|
static |
A copy of the current CFA, for use during the processing of a single insn.
Referenced by dwarf2out_frame_debug_adjust_cfa(), dwarf2out_frame_debug_cfa_offset(), dwarf2out_frame_debug_def_cfa(), dwarf2out_frame_debug_expr(), notice_args_size(), and scan_trace().
|
static |
The current, i.e. most recently generated, row of the CFI table.
Referenced by create_cie_data(), def_cfa_1(), dwarf2out_frame_debug_cfa_expression(), dwarf2out_frame_debug_cfa_restore(), initial_return_save(), maybe_record_trace_start(), maybe_record_trace_start_abnormal(), reg_save(), and scan_trace().
|
static |
The current instruction trace.
Referenced by clobbers_queued_reg_save(), create_cie_data(), def_cfa_1(), dwarf2out_frame_debug_expr(), maybe_record_trace_start(), maybe_record_trace_start_abnormal(), notice_args_size(), notice_eh_throw(), record_reg_saved_in_reg(), reg_saved_in(), and scan_trace().
|
static |
Referenced by dwarf2out_frame_debug_expr().
|
static |
Short-hand for commonly used register numbers.
Referenced by create_cie_data(), and dwarf2out_frame_debug_expr().
|
static |
Referenced by add_cfis_to_fde(), and dwarf2out_cfi_label().
|
static |
|
static |
Save the result of dwarf2out_do_frame across PCH. This variable is tri-state, with 0 unset, >0 true, <0 false.
Referenced by dwarf2out_do_cfi_asm().
|
static |
|
static |
The variables making up the pseudo-cfg, as described above.
|
static |