public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christian Bruel <christian.bruel@st.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [PATCH ARM] Fix PR60264 (ICE in dwarf2out_frame_debug_adjust_cfa)
Date: Tue, 18 Feb 2014 15:33:00 -0000	[thread overview]
Message-ID: <53037D1C.1000104@st.com> (raw)

Hello,

Considering the attached trivial case with the epilogue:

 sub     sp, fp, #12        
 ldmia   sp, {fp, sp, lr}        frame_related_p
 
the sub instruction should also be frame_related_fp. (a gcc_assert
triggers in dwarf2out_frame_debug_adjust_cfa)

This patch sets RTX_FRAME_RELATED_P on stack restore instructions for
the -mapcs ABI.

A second problem arise with -mfloat-abi=hard, hidden by the above. a vrp
poping instruction in the epilogue (see tescase from the PR)  sets the
cfa register to IP, although the following instruction updates FP

 fldmfdd ip!, {d8}            frame_related_p
 sub     sp, fp, #12           frame_related_p
 ldmia   sp, {fp, sp, lr}    frame_related_p

This patch adds a  REG_CFA_DEF_CFA note so the sub instruction gets the
FP as expected.

Regression tested for  for armv7-a
--target_board=arm-sim/\{,-mapcs-frame\}. Fixes a large number of
compilation errors in the testsuite.

OK for trunk ?

Many Thanks






             reply	other threads:[~2014-02-18 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 15:33 Christian Bruel [this message]
2014-02-18 15:36 ` Christian Bruel
2014-02-19 14:49 ` [PATCH ARM] Fix PR60264 (ICE in dwarf2out_frame_debug_adjust_cfa) part 2 Christian Bruel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53037D1C.1000104@st.com \
    --to=christian.bruel@st.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).