Fix ppc-linux bootstrap

Jeffrey A Law law@cygnus.com
Sun Oct 31 22:03:00 GMT 1999


Kenner's change to expand_inline_function apparently was incomplete.  From
the old gcc2 sources I find:

revision 1.145
date: 1999/01/25 21:54:00;  author: kenner;  state: Exp;  lines: +3 -2
Yet another fix to last change
----------------------------
revision 1.144
date: 1999/01/25 09:40:16;  author: kenner;  state: Exp;  lines: +1 -1
Fix typo in last fix
----------------------------
revision 1.143
date: 1999/01/25 09:34:56;  author: kenner;  state: Exp;  lines: +10 -7
Fix error in last change
----------------------------
revision 1.142
date: 1999/01/24 14:27:37;  author: kenner;  state: Exp;  lines: +31 -1
(expand_inline_function): Handle case of setting virtual stack vars
register (from built in setjmp).


The change Kenner installed into our tree was the 1.142 change from the
old gcc2 tree.  The changes in 1.143-1.145 were not installed.  Thus it's
no surprise things blew up.

Thank god this is the last bulk change to the compiler from the old tree.

Anyway, this patch adds the missing changes.  The ppc-linux port seems happier
now, though it'll be some time before the bootstrap is finished.

	* integrate.c (expand_inline_function): Fix bugs in previous
	change.

Index: integrate.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/integrate.c,v
retrieving revision 1.76
diff -c -3 -p -r1.76 integrate.c
*** integrate.c	1999/11/01 01:11:20	1.76
--- integrate.c	1999/11/01 06:00:00
*************** expand_inline_function (fndecl, parms, t
*** 1091,1114 ****
  	  else if (set != 0
  		   && rtx_equal_p (SET_DEST (set), virtual_stack_vars_rtx))
  	    {
  	      temp = map->reg_map[REGNO (SET_DEST (set))];
  	      temp = VARRAY_CONST_EQUIV (map->const_equiv_varray,
  					 REGNO (temp)).rtx;
  
! 	      if (GET_CODE (temp) != PLUS
! 		  || ! rtx_equal_p (XEXP (temp, 0), virtual_stack_vars_rtx)
! 		  || GET_CODE (XEXP (temp, 1)) != CONST_INT)
  		abort ();
  
  	      if (rtx_equal_p (SET_SRC (set), stack_pointer_rtx))
  		temp = SET_SRC (set);
  	      else
! 		temp
! 		  = force_operand (plus_constant (SET_SRC (set),
! 						  - INTVAL (XEXP (temp, 1))),
! 				   NULL_RTX);
  
! 	      copy = emit_move_insn (SET_DEST (set), temp);
  	    }
  
  	  else
--- 1091,1118 ----
  	  else if (set != 0
  		   && rtx_equal_p (SET_DEST (set), virtual_stack_vars_rtx))
  	    {
+ 	      HOST_WIDE_INT offset;
  	      temp = map->reg_map[REGNO (SET_DEST (set))];
  	      temp = VARRAY_CONST_EQUIV (map->const_equiv_varray,
  					 REGNO (temp)).rtx;
  
! 	      if (rtx_equal_p (temp, virtual_stack_vars_rtx))
! 		offset = 0;
! 	      else if (GET_CODE (temp) == PLUS
! 		       && rtx_equal_p (XEXP (temp, 0), virtual_stack_vars_rtx)
! 		       && GET_CODE (XEXP (temp, 1)) == CONST_INT)
! 		offset = INTVAL (XEXP (temp, 1));
! 	      else
  		abort ();
  
  	      if (rtx_equal_p (SET_SRC (set), stack_pointer_rtx))
  		temp = SET_SRC (set);
  	      else
! 		temp = force_operand (plus_constant (SET_SRC (set),
! 						     - offset),
! 				      NULL_RTX);
  
! 	      copy = emit_move_insn (virtual_stack_vars_rtx, temp);
  	    }
  
  	  else





More information about the Gcc-patches mailing list