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: [lno] symbolic number of iterations


On Sun, 30 May 2004, Zdenek Dvorak wrote:
> + 2004-05-30  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
> +
> + 	* config/i386/i386.c (legitimate_constant_p): Do not allow
> + 	integer - symbol.
> +

> Index: config/i386/i386.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
> retrieving revision 1.425.2.39.2.5
> diff -c -3 -p -r1.425.2.39.2.5 i386.c
> *** config/i386/i386.c	27 May 2004 14:35:09 -0000	1.425.2.39.2.5
> --- config/i386/i386.c	30 May 2004 09:22:13 -0000
> *************** legitimate_constant_p (rtx x)
> *** 5823,5829 ****
>   	  && tls_symbolic_operand (XEXP (inner, 0), Pmode))
>   	return false;
>
> !       if (GET_CODE (inner) == PLUS)
>   	{
>   	  if (GET_CODE (XEXP (inner, 1)) != CONST_INT)
>   	    return false;
> --- 5823,5830 ----
>   	  && tls_symbolic_operand (XEXP (inner, 0), Pmode))
>   	return false;
>
> !       if (GET_CODE (inner) == PLUS
> ! 	  || GET_CODE (inner) == MINUS)
>   	{
>   	  if (GET_CODE (XEXP (inner, 1)) != CONST_INT)
>   	    return false;
>

This is probably more clearly written as

	if (GET_CODE (inner) == PLUS)
	  ...
	else if (GET_CODE (inner) == MINUS)
	  return false;

The second operand to a MINUS_EXPR rtx should never be a CONST_INT.


It's also a minor thing, but we should also start to transition
the LNO branch from "build" to "buildN", and from "convert" to
"fold_convert" even if only for new code initially.

Roger
--


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