This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[HEAD,csl-arm] Thumb prologue tying


The patch below adds a stack tie to the thumb function prologue sequence. This 
prevents the scheduler moving stores to the stack frame before the stack 
pointer adjustment.

Ok for mainline and csl-arm-branch?

Paul

2004-03-15  Paul Brook  <paul@codesourcery.com>

	* config/arm/arm.c (thumb_expand_prologue): Tie prologue insns to fp.

Index: arm.c
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.336
diff -u -p -r1.336 arm.c
--- a/arm.c	3 Mar 2004 08:34:43 -0000	1.336
+++ b/arm.c	15 Mar 2004 14:24:22 -0000
@@ -13110,6 +13110,12 @@ thumb_expand_prologue (void)
 				     REG_NOTES (insn));
 	    }
 	}
+      /* If the frame pointer is needed, emit a special barrier that
+	 will prevent the scheduler from moving stores to the frame
+	 before the stack adjustment.  */
+      if (frame_pointer_needed)
+	emit_insn (gen_stack_tie (stack_pointer_rtx,
+				  hard_frame_pointer_rtx));
     }
   
   if (current_function_profile || TARGET_NO_SCHED_PRO)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]