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]

Re: [PATCH] Bootstrap failure on ia64


On Mon, May 19, 2003 at 02:01:32PM -0600, Roger Sayle wrote:
> 2003-05-19  Roger Sayle  <roger@eyesopen.com>
> 
> 	* builtins.c (expand_builtin_memcpy):  Be careful to avoid
> 	calling simplify_gen_binary with constant arguments.

> *************** 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),

Wouldn't be
enum machine_mode mode = GET_MODE (result);

if (mode == VOIDmode)
  mode == Pmode;
result = simplify_gen_binary (MINUS, mode, result, const1_rtx);
result = force_operand (result, NULL_RTX);

instead of this more robust? CONST_DOUBLEs can be VOIDmode as well.

	Jakub


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