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]

push_secondary_reload tweak


On 2001-07-17 I made a modification to this routine to accept "" as
a constraint for ALL_REGS.  Seems I didn't get everything right for
the output constraint case, since we still check for "=" beginning 
the constraint, which will of course fail.  Doh.


r~


        * reload.c (push_secondary_reload): Don't check for "=" in output
        constraint after ""->ALL_REGS check.

Index: reload.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload.c,v
retrieving revision 1.161
diff -c -p -d -r1.161 reload.c
*** reload.c	2001/09/07 22:19:05	1.161
--- reload.c	2001/09/11 20:25:52
*************** push_secondary_reload (in_p, x, opnum, o
*** 381,393 ****
  	  insn_class
  	    = (insn_letter == 'r' ? GENERAL_REGS
  	       : REG_CLASS_FROM_LETTER ((unsigned char) insn_letter));
- 	}
  
!       if (insn_class == NO_REGS
! 	  || (in_p
  	      && insn_data[(int) icode].operand[!in_p].constraint[0] != '=')
! 	  /* The scratch register's constraint must start with "=&".  */
! 	  || insn_data[(int) icode].operand[2].constraint[0] != '='
  	  || insn_data[(int) icode].operand[2].constraint[1] != '&')
  	abort ();
  
--- 381,396 ----
  	  insn_class
  	    = (insn_letter == 'r' ? GENERAL_REGS
  	       : REG_CLASS_FROM_LETTER ((unsigned char) insn_letter));
  
!           if (insn_class == NO_REGS)
! 	    abort ();
! 	  if (in_p
  	      && insn_data[(int) icode].operand[!in_p].constraint[0] != '=')
! 	    abort ();
! 	}
! 
!       /* The scratch register's constraint must start with "=&".  */
!       if (insn_data[(int) icode].operand[2].constraint[0] != '='
  	  || insn_data[(int) icode].operand[2].constraint[1] != '&')
  	abort ();
  


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