This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: more use of SCALAR_FLOAT_MODE_P
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Ben Elliston <bje at au1 dot ibm dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 22 Nov 2005 13:25:15 +0000
- Subject: Re: PATCH: more use of SCALAR_FLOAT_MODE_P
- References: <20051122024239.GA14590@ozlabs.au.ibm.com>
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.