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: more use of SCALAR_FLOAT_MODE_P


On Tue, 2005-11-22 at 02:42, Ben Elliston wrote:
> More changes along the same lines as yesterday.  Tested with a
> bootstrap.  Okay for trunk?
> 
> Ben
> 
> 2005-11-22  Ben Elliston  <bje@au.ibm.com>
> 
> 	* optabs.c: Use SCALAR_FLOAT_MODE_P instead of explicitly testing
> 	GET_MODE_CLASS (x) == MODE_FLOAT.
> 	* config/i386/i386.c: Likewise.
> 	* config/rs6000/xcoff.h: Likewise.
> 	* config/rs6000/linux64.h: Likewise.
> 	* config/rs6000/rs6000.c: Likewise.
> 	* config/rs6000/rs6000.h: Likewise.
> 	* config/rs6000/predicates.md: Likewise.
> 	* config/rs6000/sysv4.h: Likewise.
> 
> Index: optabs.c
> ===================================================================
> --- optabs.c	(revision 107325)
> +++ optabs.c	(working copy)
> @@ -2489,7 +2489,7 @@ expand_unop (enum machine_mode mode, opt
>    if (unoptab->code == NEG)
>      {
>        /* Try negating floating point values by flipping the sign bit.  */
> -      if (class == MODE_FLOAT)
> +      if (SCALAR_FLOAT_MODE_P (class))
>  	{
>  	  temp = expand_absneg_bit (NEG, mode, op0, target);
>  	  if (temp)
> @@ -3552,7 +3552,7 @@ prepare_cmp_insn (rtx *px, rtx *py, enum
>        return;
>      }
>  
> -  gcc_assert (class == MODE_FLOAT);
> +  gcc_assert (SCALAR_FLOAT_MODE_P (class));
>    prepare_float_lib_cmp (px, py, pcomparison, pmode, punsignedp);
>  }
>  

Not ok.  You can't apply SCALAR_FLOAT_MODE_P to a mode class.

R.


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