This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: e500 cceq ccr bit goofiness
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Jul 2002 12:33:40 -0400
- Subject: Re: patch: e500 cceq ccr bit goofiness
Why did the check for TARGET_ALTIVEC change into no test for
rs6000_common_init_builtins. Is the following patch correct?
David
Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.350
diff -c -p -r1.350 rs6000.c
*** rs6000.c 27 Jul 2002 04:12:48 -0000 1.350
--- rs6000.c 30 Jul 2002 16:31:47 -0000
*************** rs6000_expand_builtin (exp, target, subt
*** 5095,5117 ****
return ret;
}
! /* Handle simple unary operations. */
! d = (struct builtin_description *) bdesc_1arg;
! for (i = 0; i < ARRAY_SIZE (bdesc_1arg); i++, d++)
! if (d->code == fcode)
! return rs6000_expand_unop_builtin (d->icode, arglist, target);
! /* Handle simple binary operations. */
! d = (struct builtin_description *) bdesc_2arg;
! for (i = 0; i < ARRAY_SIZE (bdesc_2arg); i++, d++)
! if (d->code == fcode)
! return rs6000_expand_binop_builtin (d->icode, arglist, target);
! /* Handle simple ternary operations. */
! d = (struct builtin_description *) bdesc_3arg;
! for (i = 0; i < ARRAY_SIZE (bdesc_3arg); i++, d++)
! if (d->code == fcode)
! return rs6000_expand_ternop_builtin (d->icode, arglist, target);
abort ();
return NULL_RTX;
--- 5095,5120 ----
return ret;
}
! if (TARGET_ALTIVEC || TARGET_SPE)
! {
! /* Handle simple unary operations. */
! d = (struct builtin_description *) bdesc_1arg;
! for (i = 0; i < ARRAY_SIZE (bdesc_1arg); i++, d++)
! if (d->code == fcode)
! return rs6000_expand_unop_builtin (d->icode, arglist, target);
! /* Handle simple binary operations. */
! d = (struct builtin_description *) bdesc_2arg;
! for (i = 0; i < ARRAY_SIZE (bdesc_2arg); i++, d++)
! if (d->code == fcode)
! return rs6000_expand_binop_builtin (d->icode, arglist, target);
! /* Handle simple ternary operations. */
! d = (struct builtin_description *) bdesc_3arg;
! for (i = 0; i < ARRAY_SIZE (bdesc_3arg); i++, d++)
! if (d->code == fcode)
! return rs6000_expand_ternop_builtin (d->icode, arglist, target);
! }
abort ();
return NULL_RTX;
*************** rs6000_init_builtins ()
*** 5124,5130 ****
spe_init_builtins ();
if (TARGET_ALTIVEC)
altivec_init_builtins ();
! rs6000_common_init_builtins ();
}
/* Search through a set of builtins and enable the mask bits.
--- 5127,5134 ----
spe_init_builtins ();
if (TARGET_ALTIVEC)
altivec_init_builtins ();
! if (TARGET_ALTIVEC || TARGET_SPE)
! rs6000_common_init_builtins ();
}
/* Search through a set of builtins and enable the mask bits.