This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH ARM] Fix PR60264 (ICE in dwarf2out_frame_debug_adjust_cfa)
- From: Christian Bruel <christian dot bruel at st dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 18 Feb 2014 16:32:44 +0100
- Subject: [PATCH ARM] Fix PR60264 (ICE in dwarf2out_frame_debug_adjust_cfa)
- Authentication-results: sourceware.org; auth=none
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