summaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-07 23:51:16 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-07 23:51:16 +0000
commitc746c5c3e1d3ec6502d11fd9b82ac12ab62d2e4c (patch)
tree073e65e29ad5e49a203ca0e4f8c6150941d02102 /gcc/final.c
parent46346a5290f78911b8ae50503d700d0a6e3db9c8 (diff)
downloadgcc-c746c5c3e1d3ec6502d11fd9b82ac12ab62d2e4c.tar.gz
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
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c
index 835bbd502bf..319d2389272 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1589,6 +1589,11 @@ final_start_function (rtx first ATTRIBUTE_UNUSED, FILE *file,
/* First output the function prologue: code to set up the stack frame. */
targetm.asm_out.function_prologue (file, get_frame_size ());
+#if defined (HAVE_prologue)
+ if (dwarf2out_do_frame ())
+ dwarf2out_frame_debug_after_prologue ();
+#endif
+
/* If the machine represents the prologue as RTL, the profiling code must
be emitted when NOTE_INSN_PROLOGUE_END is scanned. */
#ifdef HAVE_prologue