bug fix for find_equiv_reg

Joern Rennecke amylaar@redhat.com
Thu Oct 19 03:47:00 GMT 2000


Thu Oct 19 11:45:24 2000  J"orn Rennecke <amylaar@redhat.co.uk>

	* reload.c (find_equiv_reg): Test all hard registers for membership
	in the requested class.

Index: reload.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/reload.c,v
retrieving revision 1.189
diff -p -r1.189 reload.c
*** reload.c	2000/10/16 22:11:01	1.189
--- reload.c	2000/10/19 10:43:34
*************** find_equiv_reg (goal, insn, class, other
*** 6187,6202 ****
  		      && (valtry
  			  = operand_subword (SET_DEST (pat), 1, 0, VOIDmode))
  		      && (valueno = true_regnum (valtry)) >= 0)))
! 	    if (other >= 0
! 		? valueno == other
! 		: ((unsigned) valueno < FIRST_PSEUDO_REGISTER
! 		   && TEST_HARD_REG_BIT (reg_class_contents[(int) class],
! 					 valueno)))
! 	      {
! 		value = valtry;
! 		where = p;
! 		break;
! 	      }
  	}
      }
  
--- 6178,6206 ----
  		      && (valtry
  			  = operand_subword (SET_DEST (pat), 1, 0, VOIDmode))
  		      && (valueno = true_regnum (valtry)) >= 0)))
! 	    {
! 	      if (other >= 0)
! 		{
! 		  if (valueno != other)
! 		    continue;
! 		}
! 	      else if ((unsigned) valueno >= FIRST_PSEUDO_REGISTER)
! 		continue;
! 	      else
! 		{
! 		  int i;
! 
! 		  for (i = HARD_REGNO_NREGS (valueno, mode) - 1; i >= 0; i--)
! 		    if (! TEST_HARD_REG_BIT (reg_class_contents[(int) class],
! 					     valueno + i))
! 		      break;
! 		  if (i >= 0)
! 		    continue;
! 		}
! 	      value = valtry;
! 	      where = p;
! 	      break;
! 	    }
  	}
      }
  


More information about the Gcc-patches mailing list