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