reload1.c (reload_as_needed): When rewrite POST_INC, verify...

Jim Wilson wilson@cygnus.com
Thu Oct 22 23:35:00 GMT 1998


I have installed this patch.  This fixes a bug found by a m68k-aout build
in Joern's recent reload patches.  This caused an "insn does not match
contraints" error while compiling newlib.

1998-10-22  Jim Wilson  <wilson@cygnus.com>

	* reload1.c (reload_as_needed): When rewrite POST_INC, verify
	reg_reloaded_contents matches incremented pseudo.

Index: reload1.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/reload1.c,v
retrieving revision 1.195
diff -p -r1.195 reload1.c
*** reload1.c	1998/10/19 17:32:11	1.195
--- reload1.c	1998/10/23 05:44:41
*************** reload_as_needed (live_known)
*** 4524,4530 ****
  		     or we can't use the reload register for inheritance.  */
  		  if ((code == POST_INC || code == POST_DEC)
  		      && TEST_HARD_REG_BIT (reg_reloaded_valid,
! 					    REGNO (reload_reg_rtx[i])))
  		    {
  		      rtx reload_reg = reload_reg_rtx[i];
  		      enum machine_mode mode = GET_MODE (reload_reg);
--- 4524,4535 ----
  		     or we can't use the reload register for inheritance.  */
  		  if ((code == POST_INC || code == POST_DEC)
  		      && TEST_HARD_REG_BIT (reg_reloaded_valid,
! 					    REGNO (reload_reg_rtx[i]))
! 		      /* Make sure it is the inc/dec pseudo, and not
! 			 some other (e.g. output operand) pseudo.  */
! 		      && (reg_reloaded_contents[REGNO (reload_reg_rtx[i])]
! 			  == REGNO (XEXP (in_reg, 0))))
! 					      
  		    {
  		      rtx reload_reg = reload_reg_rtx[i];
  		      enum machine_mode mode = GET_MODE (reload_reg);



More information about the Gcc-patches mailing list