[Patch ARM] Fix PR target/58854

Ramana Radhakrishnan ramrad01@arm.com
Wed Oct 30 11:07:00 GMT 2013


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.

regards
Ramana

2013-10-30  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

         PR target/58854
         * config/arm/arm.c (arm_expand_epilogue_apcs_frame): Emit blockage.
-------------- next part --------------
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,
                              hard_frame_pointer_rtx,


More information about the Gcc-patches mailing list