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]

Re: RFA: New flag in struct rtx_def


>>>>> Richard Earnshaw <rearnsha@arm.com> writes:

 > Please do.  I really don't think it is acceptable that the ARM port hasn't 
 > compiled for 2 weeks because of a change you introduced to the front end.  
 > If this had been any other port the change would have been backed out by 
 > now.

That seems unfair; it's taken a while because we've been talking about how
properly to fix the problem.  Anyway, does this do the trick for you?

Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarf2out.c,v
retrieving revision 1.183
diff -c -p -r1.183 dwarf2out.c
*** dwarf2out.c	2000/06/30 07:51:39	1.183
--- dwarf2out.c	2000/07/12 18:25:50
*************** static unsigned cfa_temp_reg;
*** 1208,1213 ****
--- 1209,1216 ----
  /* A temporary value used in adjusting SP or setting up the store_reg.  */
  static long cfa_temp_value;
  
+ static unsigned cfa_old_reg;
+ 
  /* Record call frame debugging information for an expression, which either
     sets SP or FP (adjusting how we calculate the frame address) or saves a
     register to the stack. */
*************** dwarf2out_frame_debug_expr (expr, label)
*** 1257,1263 ****
          {
            /* Setting FP from SP.  */
          case REG:
!           if (cfa.reg != (unsigned) REGNO (src))
              abort ();
  
  	  /* We used to require that dest be either SP or FP, but the
--- 1260,1269 ----
          {
            /* Setting FP from SP.  */
          case REG:
!           if (cfa.reg == (unsigned) REGNO (src)
! 	      || (cfa.indirect && cfa_old_reg == (unsigned) REGNO (src)))
! 	    /* OK */;
! 	  else
              abort ();
  
  	  /* We used to require that dest be either SP or FP, but the
*************** dwarf2out_frame_debug_expr (expr, label)
*** 1265,1270 ****
--- 1271,1277 ----
  	     FP.  So we just rely on the backends to only set
  	     RTX_FRAME_RELATED_P on appropriate insns.  */
            cfa.reg = REGNO (dest);
+ 	  cfa.indirect = 0;
            break;
  
          case PLUS:
*************** dwarf2out_frame_debug_expr (expr, label)
*** 1390,1395 ****
--- 1397,1403 ----
  	    }
  	  if (GET_CODE (x) != REG)
  	    abort ();
+ 	  cfa_old_reg = cfa.reg;
  	  cfa.reg = (unsigned) REGNO (x);
  	  cfa.base_offset = offset;
  	  cfa.indirect = 1;

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