aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-06-29 21:31:55 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2004-06-29 21:31:55 +0200
commit57512331dae302ff19f29f6ca043fee2bfb1587d (patch)
tree75ae6779923e2c31db77c88aed99999d1898e704 /gcc
parentb4db40bf1d01d70605906d9c6a5274acba677668 (diff)
downloadgcc-57512331dae302ff19f29f6ca043fee2bfb1587d.zip
gcc-57512331dae302ff19f29f6ca043fee2bfb1587d.tar.gz
gcc-57512331dae302ff19f29f6ca043fee2bfb1587d.tar.bz2
vector-defs.h: Use vector_size attribute only for GCC 3.5+...
* gcc.dg/compat/vector-defs.h: Use vector_size attribute only for GCC 3.5+, for GCC up to 3.4 mode(V*) attribute instead. From-SVN: r83873
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-defs.h68
2 files changed, 50 insertions, 21 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1239de7..f02a5bb 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2004-06-29 Jakub Jelinek <jakub@redhat.com>
+ * gcc.dg/compat/vector-defs.h: Use vector_size attribute
+ only for GCC 3.5+, for GCC up to 3.4 mode(V*) attribute instead.
+
PR target/16195
* gcc.dg/20040625-1.c: New test.
diff --git a/gcc/testsuite/gcc.dg/compat/vector-defs.h b/gcc/testsuite/gcc.dg/compat/vector-defs.h
index ecb3960..57140f1 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-defs.h
+++ b/gcc/testsuite/gcc.dg/compat/vector-defs.h
@@ -1,46 +1,72 @@
/* This includes all of the vector modes that are recognized by
- c_common_type_for_mode, grouped by base mode. */
+ c_common_type_for_mode. */
typedef int __attribute__((mode(QI))) qi;
+typedef int __attribute__((mode(HI))) hi;
+typedef int __attribute__((mode(SI))) si;
+typedef int __attribute__((mode(DI))) di;
+typedef float __attribute__((mode(SF))) sf;
+typedef float __attribute__((mode(DF))) df;
+
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 5)
+
typedef qi __attribute__((vector_size (8))) v8qi;
typedef qi __attribute__((vector_size (16))) v16qi;
-typedef union U8QI { v8qi v; qi a[8]; } u8qi;
-typedef union U16QI { v16qi v; qi a[16]; } u16qi;
-
-typedef int __attribute__((mode(HI))) hi;
typedef hi __attribute__((vector_size (4))) v2hi;
typedef hi __attribute__((vector_size (8))) v4hi;
typedef hi __attribute__((vector_size (16))) v8hi;
-typedef union U2HI { v2hi v; hi a[2]; } u2hi;
-typedef union U4HI { v4hi v; hi a[4]; } u4hi;
-typedef union U8HI { v8hi v; hi a[8]; } u8hi;
-
-typedef int __attribute__((mode(SI))) si;
typedef si __attribute__((vector_size (8))) v2si;
typedef si __attribute__((vector_size (16))) v4si;
-typedef union U2SI { v2si v; si a[2]; } u2si;
-typedef union U4SI { v4si v; si a[4]; } u4si;
-
-typedef int __attribute__((mode(DI))) di;
typedef di __attribute__((vector_size (8))) v1di;
typedef di __attribute__((vector_size (16))) v2di;
-typedef union U1DI { v1di v; di a[1]; } u1di;
-typedef union U2DI { v2di v; di a[2]; } u2di;
-
-typedef float __attribute__((mode(SF))) sf;
typedef sf __attribute__((vector_size (8))) v2sf;
typedef sf __attribute__((vector_size (16))) v4sf;
typedef sf __attribute__((vector_size (64))) v16sf;
+typedef df __attribute__((vector_size (16))) v2df;
+
+#else
+
+typedef int __attribute__((mode(V8QI))) v8qi;
+typedef int __attribute__((mode(V16QI))) v16qi;
+
+typedef int __attribute__((mode(V2HI))) v2hi;
+typedef int __attribute__((mode(V4HI))) v4hi;
+typedef int __attribute__((mode(V8HI))) v8hi;
+
+typedef int __attribute__((mode(V2SI))) v2si;
+typedef int __attribute__((mode(V4SI))) v4si;
+
+typedef int __attribute__((mode(V1DI))) v1di;
+typedef int __attribute__((mode(V2DI))) v2di;
+
+typedef float __attribute__((mode(V2SF))) v2sf;
+typedef float __attribute__((mode(V4SF))) v4sf;
+typedef float __attribute__((mode(V16SF))) v16sf;
+
+typedef float __attribute__((mode(V2DF))) v2df;
+
+#endif
+
+typedef union U8QI { v8qi v; qi a[8]; } u8qi;
+typedef union U16QI { v16qi v; qi a[16]; } u16qi;
+
+typedef union U2HI { v2hi v; hi a[2]; } u2hi;
+typedef union U4HI { v4hi v; hi a[4]; } u4hi;
+typedef union U8HI { v8hi v; hi a[8]; } u8hi;
+
+typedef union U2SI { v2si v; si a[2]; } u2si;
+typedef union U4SI { v4si v; si a[4]; } u4si;
+
+typedef union U1DI { v1di v; di a[1]; } u1di;
+typedef union U2DI { v2di v; di a[2]; } u2di;
+
typedef union U2SF { v2sf v; sf a[2]; } u2sf;
typedef union U4SF { v4sf v; sf a[4]; } u4sf;
typedef union U16SF { v16sf v; sf a[16]; } u16sf;
-typedef float __attribute__((mode(DF))) df;
-typedef df __attribute__((vector_size (16))) v2df;
-
typedef union U2DF { v2df v; df a[2]; } u2df;