aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2cfi.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2011-08-02 12:56:29 -0700
committerRichard Henderson <rth@gcc.gnu.org>2011-08-02 12:56:29 -0700
commit8f1594b2b805e9214594ad1f4552f629429fd07e (patch)
tree5e890980807492b4cdd0eb854fdc3823adfefa57 /gcc/dwarf2cfi.c
parent66f1dc79f5c4cc5b9cc95a23e05bae44fa8665f3 (diff)
downloadgcc-8f1594b2b805e9214594ad1f4552f629429fd07e.zip
gcc-8f1594b2b805e9214594ad1f4552f629429fd07e.tar.gz
gcc-8f1594b2b805e9214594ad1f4552f629429fd07e.tar.bz2
h8300: Generate correct unwind info around swap_into/out_of_er6.
Minimal bug fix is to unset RTX_FRAME_RELATED_P on the PUSH insn generated in h8300_swap_into_er6. But with a tiny bit of effort we can generate real unwind info around the sequence. From-SVN: r177209
Diffstat (limited to 'gcc/dwarf2cfi.c')
-rw-r--r--gcc/dwarf2cfi.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
index 99b37ab..69218cb2d 100644
--- a/gcc/dwarf2cfi.c
+++ b/gcc/dwarf2cfi.c
@@ -778,8 +778,8 @@ def_cfa_1 (dw_cfa_location *new_cfa)
if (cfi)
{
cur_row->cfa = *new_cfa;
- if (cfi->dw_cfi_opc == DW_CFA_def_cfa_expression)
- cur_row->cfa_cfi = cfi;
+ cur_row->cfa_cfi = (cfi->dw_cfi_opc == DW_CFA_def_cfa_expression
+ ? cfi : NULL);
add_cfi (cfi);
}
@@ -1205,18 +1205,13 @@ dwarf2out_frame_debug_def_cfa (rtx pat)
memset (&loc, 0, sizeof (loc));
- switch (GET_CODE (pat))
+ if (GET_CODE (pat) == PLUS)
{
- case PLUS:
- loc.reg = dwf_regno (XEXP (pat, 0));
loc.offset = INTVAL (XEXP (pat, 1));
- break;
-
- case REG:
- loc.reg = dwf_regno (pat);
- break;
-
- case MEM:
+ pat = XEXP (pat, 0);
+ }
+ if (MEM_P (pat))
+ {
loc.indirect = 1;
pat = XEXP (pat, 0);
if (GET_CODE (pat) == PLUS)
@@ -1224,13 +1219,11 @@ dwarf2out_frame_debug_def_cfa (rtx pat)
loc.base_offset = INTVAL (XEXP (pat, 1));
pat = XEXP (pat, 0);
}
- loc.reg = dwf_regno (pat);
- break;
-
- default:
- /* Recurse and define an expression. */
- gcc_unreachable ();
}
+ /* ??? If this fails, we could be calling into the _loc functions to
+ define a full expression. So far no port does that. */
+ gcc_assert (REG_P (pat));
+ loc.reg = dwf_regno (pat);
def_cfa_1 (&loc);
}