fix my previous alter_subreg change

Jan Hubicka jh@suse.cz
Tue Nov 13 15:03:00 GMT 2001


Hi,
this patch does fix the two problems in my alter_subreg patch that let my
bootstrap on sparc to pass.

OK?

Thu Nov 22 14:43:24 CET 2001  Jan Hubicka  <jh@suse.cz>

	* final.c (cleanup_subreg_operands): Do not crash on peepholes.
	(walk_alter_subreg): Return proper value.

Index: final.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/final.c,v
retrieving revision 1.222
diff -c -3 -p -r1.222 final.c
*** final.c	2001/11/15 14:58:19	1.222
--- final.c	2001/11/22 13:33:21
*************** cleanup_subreg_operands (insn)
*** 3004,3010 ****
    extract_insn_cached (insn);
    for (i = 0; i < recog_data.n_operands; i++)
      {
!       if (GET_CODE (recog_data.operand[i]) == SUBREG)
  	recog_data.operand[i] = alter_subreg (recog_data.operand_loc[i]);
        else if (GET_CODE (recog_data.operand[i]) == PLUS
  	       || GET_CODE (recog_data.operand[i]) == MULT
--- 3004,3014 ----
    extract_insn_cached (insn);
    for (i = 0; i < recog_data.n_operands; i++)
      {
!       /* Peepholes are matched w/o setting operand_loc.  We don't need
! 	 to cleanup subregs there anyway.  */
!       if (!recog_data.operand_loc[i])
! 	;
!       else if (GET_CODE (recog_data.operand[i]) == SUBREG)
  	recog_data.operand[i] = alter_subreg (recog_data.operand_loc[i]);
        else if (GET_CODE (recog_data.operand[i]) == PLUS
  	       || GET_CODE (recog_data.operand[i]) == MULT
*************** walk_alter_subreg (xp)
*** 3086,3093 ****
      default:
        break;
      }
! 
!   return x;
  }
  
  #ifdef HAVE_cc0
--- 3090,3096 ----
      default:
        break;
      }
!   return *xp;
  }
  
  #ifdef HAVE_cc0



More information about the Gcc-patches mailing list