This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fixes Re: 9 GCC regressions, 5 new, with your patch on 2003-04-07T23:55:08Z.
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 8 Apr 2003 10:01:14 -0400
- Subject: fixes Re: 9 GCC regressions, 5 new, with your patch on 2003-04-07T23:55:08Z.
On Tuesday, April 8, 2003, at 12:38 AM, GCC regression checker wrote:
With your recent patch, GCC has some regression test failures, which
used to pass. There are 5 new failures, and 4
failures that existed before and after that patch; 0 failures
have been fixed.
The new failures are:
native gcc.sum gcc.dg/altivec-2.c
native gcc.sum gcc.dg/altivec-4.c
native gcc.sum gcc.dg/altivec-5.c
native gcc.sum gcc.dg/altivec-7.c
native gcc.sum gcc.dg/altivec-8.c
This shows up on native and not on my build because I tested on
powerpc-eabispe.
The problem is that the opaque_V2* types are set from within TARGET_SPE
but rs6000_common_init_builtins() uses these types regardless. The
easiest thing is to do what I've committed in the patch below.
Arguably, a better solution would be to change
rs6000_common_init_builtins and separate out declaration and
initialization of the tree nodes, but that requires much greater
surgery and touching a lot of lines.
I also noticed the irregular spe builtins did not use opaque types, so
I've fixed them.
Aldy
2003-04-08 Aldy Hernandez <aldyh at redhat dot com>
* config/rs6000/rs6000.c (rs6000_init_builtins): Set opaque types
regardless of architecture.
(spe_init_builtins): Change V2SI and V2SF types to opaque types.
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.453
diff -c -p -r1.453 rs6000.c
*** config/rs6000/rs6000.c 7 Apr 2003 20:09:14 -0000 1.453
--- config/rs6000/rs6000.c 8 Apr 2003 13:59:19 -0000
*************** rs6000_expand_builtin (exp, target, subt
*** 5436,5447 ****
static void
rs6000_init_builtins ()
{
if (TARGET_SPE)
! {
! opaque_V2SI_type_node = copy_node (V2SI_type_node);
! opaque_V2SF_type_node = copy_node (V2SF_type_node);
! spe_init_builtins ();
! }
if (TARGET_ALTIVEC)
altivec_init_builtins ();
if (TARGET_ALTIVEC || TARGET_SPE)
--- 5436,5446 ----
static void
rs6000_init_builtins ()
{
+ opaque_V2SI_type_node = copy_node (V2SI_type_node);
+ opaque_V2SF_type_node = copy_node (V2SF_type_node);
+
if (TARGET_SPE)
! spe_init_builtins ();
if (TARGET_ALTIVEC)
altivec_init_builtins ();
if (TARGET_ALTIVEC || TARGET_SPE)
*************** spe_init_builtins ()
*** 5483,5529 ****
tree endlink = void_list_node;
tree puint_type_node = build_pointer_type (unsigned_type_node);
tree pushort_type_node = build_pointer_type
(short_unsigned_type_node);
! tree pv2si_type_node = build_pointer_type (V2SI_type_node);
struct builtin_description *d;
size_t i;
tree v2si_ftype_4_v2si
= build_function_type
! (V2SI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
endlink)))));
tree v2sf_ftype_4_v2sf
= build_function_type
! (V2SF_type_node,
! tree_cons (NULL_TREE, V2SF_type_node,
! tree_cons (NULL_TREE, V2SF_type_node,
! tree_cons (NULL_TREE, V2SF_type_node,
! tree_cons (NULL_TREE, V2SF_type_node,
endlink)))));
tree int_ftype_int_v2si_v2si
= build_function_type
(integer_type_node,
tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
endlink))));
tree int_ftype_int_v2sf_v2sf
= build_function_type
(integer_type_node,
tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, V2SF_type_node,
! tree_cons (NULL_TREE, V2SF_type_node,
endlink))));
tree void_ftype_v2si_puint_int
= build_function_type (void_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
tree_cons (NULL_TREE, puint_type_node,
tree_cons (NULL_TREE,
integer_type_node,
--- 5482,5528 ----
tree endlink = void_list_node;
tree puint_type_node = build_pointer_type (unsigned_type_node);
tree pushort_type_node = build_pointer_type
(short_unsigned_type_node);
! tree pv2si_type_node = build_pointer_type (opaque_V2SI_type_node);
struct builtin_description *d;
size_t i;
tree v2si_ftype_4_v2si
= build_function_type
! (opaque_V2SI_type_node,
! tree_cons (NULL_TREE, opaque_V2SI_type_node,
! tree_cons (NULL_TREE, opaque_V2SI_type_node,
! tree_cons (NULL_TREE, opaque_V2SI_type_node,
! tree_cons (NULL_TREE, opaque_V2SI_type_node,
endlink)))));
tree v2sf_ftype_4_v2sf
= build_function_type
! (opaque_V2SF_type_node,
! tree_cons (NULL_TREE, opaque_V2SF_type_node,
! tree_cons (NULL_TREE, opaque_V2SF_type_node,
! tree_cons (NULL_TREE, opaque_V2SF_type_node,
! tree_cons (NULL_TREE, opaque_V2SF_type_node,
endlink)))));
tree int_ftype_int_v2si_v2si
= build_function_type
(integer_type_node,
tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, opaque_V2SI_type_node,
! tree_cons (NULL_TREE, opaque_V2SI_type_node,
endlink))));
tree int_ftype_int_v2sf_v2sf
= build_function_type
(integer_type_node,
tree_cons (NULL_TREE, integer_type_node,
! tree_cons (NULL_TREE, opaque_V2SF_type_node,
! tree_cons (NULL_TREE, opaque_V2SF_type_node,
endlink))));
tree void_ftype_v2si_puint_int
= build_function_type (void_type_node,
! tree_cons (NULL_TREE, opaque_V2SI_type_node,
tree_cons (NULL_TREE, puint_type_node,
tree_cons (NULL_TREE,
integer_type_node,
*************** spe_init_builtins ()
*** 5531,5537 ****
tree void_ftype_v2si_puint_char
= build_function_type (void_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
tree_cons (NULL_TREE, puint_type_node,
tree_cons (NULL_TREE,
char_type_node,
--- 5530,5536 ----
tree void_ftype_v2si_puint_char
= build_function_type (void_type_node,
! tree_cons (NULL_TREE, opaque_V2SI_type_node,
tree_cons (NULL_TREE, puint_type_node,
tree_cons (NULL_TREE,
char_type_node,
*************** spe_init_builtins ()
*** 5539,5545 ****
tree void_ftype_v2si_pv2si_int
= build_function_type (void_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
tree_cons (NULL_TREE, pv2si_type_node,
tree_cons (NULL_TREE,
integer_type_node,
--- 5538,5544 ----
tree void_ftype_v2si_pv2si_int
= build_function_type (void_type_node,
! tree_cons (NULL_TREE, opaque_V2SI_type_node,
tree_cons (NULL_TREE, pv2si_type_node,
tree_cons (NULL_TREE,
integer_type_node,
*************** spe_init_builtins ()
*** 5547,5553 ****
tree void_ftype_v2si_pv2si_char
= build_function_type (void_type_node,
! tree_cons (NULL_TREE, V2SI_type_node,
tree_cons (NULL_TREE, pv2si_type_node,
tree_cons (NULL_TREE,
char_type_node,
--- 5546,5552 ----
tree void_ftype_v2si_pv2si_char
= build_function_type (void_type_node,
! tree_cons (NULL_TREE, opaque_V2SI_type_node,
tree_cons (NULL_TREE, pv2si_type_node,
tree_cons (NULL_TREE,
char_type_node,
*************** spe_init_builtins ()
*** 5562,5580 ****
tree_cons (NULL_TREE, void_type_node, endlink));
tree v2si_ftype_pv2si_int
! = build_function_type (V2SI_type_node,
tree_cons (NULL_TREE, pv2si_type_node,
tree_cons (NULL_TREE, integer_type_node,
endlink)));
tree v2si_ftype_puint_int
! = build_function_type (V2SI_type_node,
tree_cons (NULL_TREE, puint_type_node,
tree_cons (NULL_TREE, integer_type_node,
endlink)));
tree v2si_ftype_pushort_int
! = build_function_type (V2SI_type_node,
tree_cons (NULL_TREE, pushort_type_node,
tree_cons (NULL_TREE, integer_type_node,
endlink)));
--- 5561,5579 ----
tree_cons (NULL_TREE, void_type_node, endlink));
tree v2si_ftype_pv2si_int
! = build_function_type (opaque_V2SI_type_node,
tree_cons (NULL_TREE, pv2si_type_node,
tree_cons (NULL_TREE, integer_type_node,
endlink)));
tree v2si_ftype_puint_int
! = build_function_type (opaque_V2SI_type_node,
tree_cons (NULL_TREE, puint_type_node,
tree_cons (NULL_TREE, integer_type_node,
endlink)));
tree v2si_ftype_pushort_int
! = build_function_type (opaque_V2SI_type_node,
tree_cons (NULL_TREE, pushort_type_node,
tree_cons (NULL_TREE, integer_type_node,
endlink)));