EH PATCH to arm.c

Jason Merrill jason@redhat.com
Fri Dec 15 06:57:00 GMT 2000


A large frame can cause us to use two insns to adjust the stack pointer; we
need to set RTX_FRAME_RELATED_P on both.  Is there a better way to do this?

2000-12-12  Jason Merrill  <jason@redhat.com>

	* config/arm/arm.c (arm_expand_prologue): Set RTX_FRAME_RELATED_P
	on all insns used to adjust the stack.

*** config/arm/arm.c.~1~	Fri Dec 15 14:29:07 2000
--- config/arm/arm.c	Fri Dec 15 14:29:14 2000
*************** arm_expand_prologue ()
*** 7848,7856 ****
  
    if (amount != const0_rtx)
      {
        insn = emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
  				    amount));
!       RTX_FRAME_RELATED_P (insn) = 1;
  
        /* If the frame pointer is needed, emit a special barrier that
  	 will prevent the scheduler from moving stores to the frame
--- 7848,7864 ----
  
    if (amount != const0_rtx)
      {
+       /* This add can produce multiple insns for a large constant, so we
+ 	 need to get tricky.  */
+       rtx last = get_last_insn ();
        insn = emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
  				    amount));
!       do
! 	{
! 	  last = last ? NEXT_INSN (last) : get_insns ();
! 	  RTX_FRAME_RELATED_P (last) = 1;
! 	}
!       while (last != insn);
  
        /* If the frame pointer is needed, emit a special barrier that
  	 will prevent the scheduler from moving stores to the frame


More information about the Gcc-patches mailing list