diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-30 21:01:06 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-30 21:01:06 +0000 |
commit | 61ff493e0ab14574f3b7e64473aa7b3d836dca47 (patch) | |
tree | e2d816caf52f423e1a89df03668b0ba0125a7f82 /gcc/dwarf2out.c | |
parent | 1fb0df802a9b0a39efccaae6a107414a74715a4f (diff) | |
download | gcc-61ff493e0ab14574f3b7e64473aa7b3d836dca47.tar.gz |
dwarf2out: Handle pc_rtx as return column in REG_CFA_OFFSET too.
* dwarf2out.c (dwarf2out_frame_debug_cfa_offset): Allow PC_RTX
as a source, and interpret that as DWARF_FRAME_RETURN_COLUMN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175728 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 8aa2eb2d4d1..8e543919ffe 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1982,6 +1982,7 @@ dwarf2out_frame_debug_cfa_offset (rtx set, const char *label) { HOST_WIDE_INT offset; rtx src, addr, span; + unsigned int sregno; src = XEXP (set, 1); addr = XEXP (set, 0); @@ -2003,12 +2004,21 @@ dwarf2out_frame_debug_cfa_offset (rtx set, const char *label) gcc_unreachable (); } - span = targetm.dwarf_register_span (src); + if (src == pc_rtx) + { + span = NULL; + sregno = DWARF_FRAME_RETURN_COLUMN; + } + else + { + span = targetm.dwarf_register_span (src); + sregno = DWARF_FRAME_REGNUM (REGNO (src)); + } /* ??? We'd like to use queue_reg_save, but we need to come up with a different flushing heuristic for epilogues. */ if (!span) - reg_save (label, DWARF_FRAME_REGNUM (REGNO (src)), INVALID_REGNUM, offset); + reg_save (label, sregno, INVALID_REGNUM, offset); else { /* We have a PARALLEL describing where the contents of SRC live. @@ -2024,8 +2034,8 @@ dwarf2out_frame_debug_cfa_offset (rtx set, const char *label) { rtx elem = XVECEXP (span, 0, par_index); - reg_save (label, DWARF_FRAME_REGNUM (REGNO (elem)), - INVALID_REGNUM, span_offset); + sregno = DWARF_FRAME_REGNUM (REGNO (src)); + reg_save (label, sregno, INVALID_REGNUM, span_offset); span_offset += GET_MODE_SIZE (GET_MODE (elem)); } } |