Patchwork [ARM] Fix PR target/58854

mail settings
Submitter Ramana Radhakrishnan
Date Oct. 30, 2013, 10:58 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/287194/
State New
Headers show


Ramana Radhakrishnan - Oct. 30, 2013, 10:58 a.m.
PR58854 is another manifestation of the usual issue with the scheduler 
not understanding sp fp overlap issues and hoisting such adjustments 
(see PR38644 for a long history on an earlier one) over accesses from 
the frame. The usual bodge in the backend is attached.

Tested arm-none-eabi cross - tested that the testcase works just fine.

Applied to trunk and will backport to the 4.8 branch in a day or so 
after the auto-testers have had a chance to play with this.


2013-10-30  Ramana Radhakrishnan  <>

         PR target/58854
         * config/arm/arm.c (arm_expand_epilogue_apcs_frame): Emit blockage.


diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 212a4bc..23dfc0e 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -26547,6 +26547,7 @@  arm_expand_epilogue_apcs_frame (bool really_return)
   num_regs = bit_count (saved_regs_mask);
   if ((offsets->outgoing_args != (1 + num_regs)) || cfun->calls_alloca)
+      emit_insn (gen_blockage ());
       /* Unwind the stack to just below the saved registers.  */
       emit_insn (gen_addsi3 (stack_pointer_rtx,