OSDN Git Service

dwarf2out: Emit NOTE_INSN_CFI_* both with and without cfi-asm.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Jul 2011 23:51:16 +0000 (23:51 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Jul 2011 23:51:16 +0000 (23:51 +0000)
commitc746c5c3e1d3ec6502d11fd9b82ac12ab62d2e4c
tree073e65e29ad5e49a203ca0e4f8c6150941d02102
parent46346a5290f78911b8ae50503d700d0a6e3db9c8
dwarf2out: Emit NOTE_INSN_CFI_* both with and without cfi-asm.

This patch is essentially Bernd's 006-cfilabel patch, updated
for all the other changes to dwarf2out.

The patch reduces the difference between the cfi-asm and non-cfi-asm
code paths.  We now emit the CFI notes in all cases.  Later, after we're
done producing the CFI insns we need, another pass over the rtl adds
the necessary labels and set_loc/advance_loc CFIs.  One consequence of
this is that def_cfa_1 can no longer use lookup_cfa, so it just compares
to an old_cfa variable instead.

The major change since Bernd's patch is that all the target-specific
changes are no longer necessary.

        * dwarf2cfi.c (add_cfi): Remove.
        (dwarf2out_cfi_label): Remove force argument.  Only generate the
        label name.
        (add_fde_cfi): Simplify the different code paths.
        (add_cie_cfi): New.
        (old_cfa, old_cfa_remember): New.
        (def_cfa_1, reg_save): Remove label, add for_cie parameter.
        (last_reg_save_label): Remove.
        (dwarf2out_args_size, dwarf2out_stack_adjust, queue_reg_save,
        dwarf2out_frame_debug_def_cfa, dwarf2out_frame_debug_adjust_cfa,
        dwarf2out_frame_debug_cfa_offset, dwarf2out_frame_debug_cfa_register,
        dwarf2out_frame_debug_cfa_expression,
        dwarf2out_frame_debug_cfa_restore,
        dwarf2out_frame_debug_cfa_window_save,
        dwarf2out_frame_debug_expr): Remove label parameter.
        (cfi_label_required_p, add_cfis_to_fde): New.
        (dwarf2out_frame_debug_after_prologue): New.
        (dwarf2cfi_frame_init): Initialize old_cfa.
        (dwarf2out_frame_debug_restore_state): Likewise.
        * dwarf2out.c (dwarf2out_emit_cfi): Only do output for cfi_asm.
        (dwarf2out_switch_text_section): Don't clear dw_fde_current_label here.
        * final.c (final_start_function): Call
        dwarf2out_frame_debug_after_prologue.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176017 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/dwarf2cfi.c
gcc/dwarf2out.c
gcc/dwarf2out.h
gcc/final.c