diff options
author | Richard Henderson <rth@redhat.com> | 2011-06-22 09:26:52 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-06-22 09:26:52 -0700 |
commit | 78a8eb4edcc2352b7af778d2a3563825d8d72b36 (patch) | |
tree | 3a610ed9f5084ab4ef905d107dd27ccc753514d8 /gcc/dwarf2out.c | |
parent | 8288cc7387c4490e0331f8288902159149f59889 (diff) | |
download | gcc-78a8eb4edcc2352b7af778d2a3563825d8d72b36.zip gcc-78a8eb4edcc2352b7af778d2a3563825d8d72b36.tar.gz gcc-78a8eb4edcc2352b7af778d2a3563825d8d72b36.tar.bz2 |
reg-notes.def (REG_CFA_WINDOW_SAVE): New.
* reg-notes.def (REG_CFA_WINDOW_SAVE): New.
* dwarf2out.c (dwarf2out_frame_debug): Handle it.
(dwarf2out_frame_debug_cfa_window_save): Rename from
dwarf2out_window_save; make static.
* tree.h (dwarf2out_window_save): Don't declare.
* config/sparc/sparc.c (sparc_dwarf_handle_frame_unspec): Remove.
(TARGET_DWARF_HANDLE_FRAME_UNSPEC): Remove.
(emit_save_register_window): Rename from gen_save_register_window;
emit the insn and add REG_CFA_* notes.
(sparc_expand_prologue): Update to match.
* config/sparc/sparc.md (save_register_window_1): Simplify from
save_register_window<P:mode>.
From-SVN: r175297
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 492de62..6d58a00 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1232,22 +1232,6 @@ reg_save (const char *label, unsigned int reg, unsigned int sreg, HOST_WIDE_INT add_fde_cfi (label, cfi); } -/* Add the CFI for saving a register window. LABEL is passed to reg_save. - This CFI tells the unwinder that it needs to restore the window registers - from the previous frame's window save area. - - ??? Perhaps we should note in the CIE where windows are saved (instead of - assuming 0(cfa)) and what registers are in the window. */ - -void -dwarf2out_window_save (const char *label) -{ - dw_cfi_ref cfi = new_cfi (); - - cfi->dw_cfi_opc = DW_CFA_GNU_window_save; - add_fde_cfi (label, cfi); -} - /* Entry point for saving a register to the stack. REG is the GCC register number. LABEL and OFFSET are passed to reg_save. */ @@ -2104,6 +2088,19 @@ dwarf2out_frame_debug_cfa_restore (rtx reg, const char *label) add_fde_cfi (label, cfi); } +/* 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. */ + +static void +dwarf2out_frame_debug_cfa_window_save (const char *label) +{ + dw_cfi_ref cfi = new_cfi (); + + cfi->dw_cfi_opc = DW_CFA_GNU_window_save; + add_fde_cfi (label, cfi); +} + /* 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. @@ -2900,6 +2897,11 @@ dwarf2out_frame_debug (rtx insn, bool after_p) handled_one = true; break; + case REG_CFA_WINDOW_SAVE: + dwarf2out_frame_debug_cfa_window_save (label); + handled_one = true; + break; + default: break; } |