[PATCH, committed] Fix altivec type

Bonzini bonzini@gnu.org
Fri Mar 19 13:18:00 GMT 2004


Committed as obvious.  I found these while checking whether Altivec
is really creating millions of vector types; luckily it seems it does
not, maybe it did in an older version.  The macros do not create
any type; instead the altivec attribute always return one of the types
created in rs6000_init_builtins.

I'm CCing Richard because this goes against his recommendation to add
hashing of vector types.  It seems very strange to me that he's wrong,
so I'm asking.

I'm CCing Geoff because I have not received any reports from the
automated regression checker, so it took me a few days to find that
there's this typo.  Is the checker down?

gcc/ChangeLog:
2004-03-19  Paolo Bonzini  <bonzini@gnu.org>

	* config/rs6000/rs6000.c (rs6000_init_builtins): Fix typo.

gcc/testsuite/ChangeLog:
2004-03-19  Paolo Bonzini  <bonzini@gnu.org>

        * gcc.dg/altivec-6.c: Use vector_size attribute, not mode.
        * gcc.dg/ppc64-abi-3.c: Use vector_size attribute, not mode.

Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.611
diff -u -r1.611 rs6000.c
--- config/rs6000/rs6000.c	18 Mar 2004 16:39:42 -0000	1.611
+++ config/rs6000/rs6000.c	19 Mar 2004 12:39:06 -0000
@@ -6580,7 +6580,7 @@
   V4HI_type_node = build_vector_type (intHI_type_node, 4);
   V4SI_type_node = build_vector_type (intSI_type_node, 4);
   V4SF_type_node = build_vector_type (float_type_node, 4);
-  V8HI_type_node = build_vector_type (intQI_type_node, 8);
+  V8HI_type_node = build_vector_type (intHI_type_node, 8);
   V16QI_type_node = build_vector_type (intQI_type_node, 16);
 
   unsigned_V16QI_type_node = build_vector_type (unsigned_intQI_type_node, 16);
Index: testsuite/gcc.dg/altivec-6.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/altivec-6.c,v
retrieving revision 1.1
diff -u -r1.1 altivec-6.c
--- testsuite/gcc.dg/altivec-6.c  21 Feb 2004 09:08:37 -0000      1.1
+++ testsuite/gcc.dg/altivec-6.c  19 Mar 2004 13:09:32 -0000
@@ -3,7 +3,7 @@
 
 
 /* These denote "generic" GCC vectors.  */
-static int __attribute__((mode(V4SI))) x, y;
+static int __attribute__((vector_size(16))) x, y;
 
 static vector signed int i,j;
 static vector signed short s,t;
Index: testsuite/gcc.dg/ppc64-abi-3.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/ppc64-abi-3.c,v
retrieving revision 1.1
diff -u -r1.1 ppc64-abi-3.c
--- testsuite/gcc.dg/ppc64-abi-3.c      11 Feb 2004 09:00:08 -0000
1.1
+++ testsuite/gcc.dg/ppc64-abi-3.c      19 Mar 2004 13:12:53 -0000
@@ -3,8 +3,8 @@
 /* Testcase to check for ABI compliance of parameter passing
    for the PowerPC64 ABI.  */
 
-typedef int __attribute__((mode(V4SI))) v4si;
-typedef int __attribute__((mode(V2SI))) v2si;
+typedef int __attribute__((vector_size(16))) v4si;
+typedef int __attribute__((vector_size(8))) v2si;
 
 v4si 
 f(v4si v)



More information about the Gcc-patches mailing list