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]
Other format: [Raw text]

[PATCH] Bootstrap failure on ia64


Earlier I wrote:
> Ok to commit to mainline if bootstrapping and regression testing
> complete?  Once again my sincere apologies.

The following patch has now been tested on i686-pc-linux-gnu with
a full bootstrap, all languages except Java (due to the current
dollars in identifiers problems in libffi) and treelang, including
ada.  Regression tested with a top-level "make -k check" with no
new regressions.


I believe this patch should fix the ia64 bootstrap failures and
powerpc testsuite regressions.  Ok for mainline?


2003-05-19  Roger Sayle  <roger@eyesopen.com>

	* builtins.c (expand_builtin_memcpy):  Be careful to avoid
	calling simplify_gen_binary with constant arguments.


Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.202
diff -c -3 -p -r1.202 builtins.c
*** builtins.c	18 May 2003 22:50:25 -0000	1.202
--- builtins.c	19 May 2003 16:22:01 -0000
*************** expand_builtin_memcpy (arglist, target,
*** 2311,2324 ****
  #endif
  	  if (endp)
  	    {
! 	      rtx result;
! 	      rtx delta = len_rtx;

  	      if (endp == 2)
! 		delta = GEN_INT (INTVAL (delta) - 1);

  	      result = simplify_gen_binary (PLUS, GET_MODE (dest_mem),
! 					    dest_mem, delta);
  	      return force_operand (result, NULL_RTX);
  	    }
  	  else
--- 2311,2323 ----
  #endif
  	  if (endp)
  	    {
! 	      rtx result = len_rtx;

  	      if (endp == 2)
! 		result = GEN_INT (INTVAL (result) - 1);

  	      result = simplify_gen_binary (PLUS, GET_MODE (dest_mem),
! 					    dest_mem, result);
  	      return force_operand (result, NULL_RTX);
  	    }
  	  else
*************** expand_builtin_memcpy (arglist, target,
*** 2347,2355 ****

  	  if (endp == 2)
  	    {
! 	      result = simplify_gen_binary (MINUS, GET_MODE (result),
! 					    result, const1_rtx);
! 	      result = force_operand (result, NULL_RTX);
  	    }

  	  result = simplify_gen_binary (PLUS, GET_MODE (dest_addr),
--- 2346,2359 ----

  	  if (endp == 2)
  	    {
! 	      if (GET_CODE (result) != CONST_INT)
! 		{
! 		  result = simplify_gen_binary (MINUS, GET_MODE (result),
! 						result, const1_rtx);
! 		  result = force_operand (result, NULL_RTX);
! 		}
! 	      else
! 		result = GEN_INT (INTVAL (result) - 1);
  	    }

  	  result = simplify_gen_binary (PLUS, GET_MODE (dest_addr),


Roger
--


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