diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-16 20:37:31 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-16 20:37:31 +0000 |
commit | 4917c37678022def7d2605f2974106c11a9b3f12 (patch) | |
tree | 05a7ca68f6fe2a4b712b3767d14e66338ca08ba6 /gcc/testsuite/gcc.dg/simd-1.c | |
parent | 9c27edfeacc72d45e00b436cc4c600b30b39471e (diff) | |
download | gcc-4917c37678022def7d2605f2974106c11a9b3f12.tar.gz |
gcc/ChangeLog
2004-03-16 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (c_common_type_for_mode): Build vector types on
demand.
(handle_mode_attribute): Deprecate using the mode attribute
to create vector types. Fix indentation.
(vector_type_node_list): Remove.
(handle_vector_size_attribute): Create vector types on demand.
Strip a NON_LVALUE_EXPR from the attribute if there is one.
* c-typeck.c (comptypes): Make vector types compatible if they
have the same underlying mode.
(convert_for_assignment): Use comptypes to convert between
vector types.
* tree.c (build_common_tree_nodes_2): Do not create vector types.
* config/arm/arm.c (arm_init_iwmmxt_builtins): Create necessary
vector types.
* tree.h: Remove vector types.
* config/i386/i386.c (i386_init_mmx_sse_builtins): Likewise.
* config/rs6000/rs6000.c (rs6000_init_builtins): Likewise.
(V16QI_type_node, V2SI_type_node, V2SF_type_node, V4HI_type_node,
V4SI_type_node, V4SF_type_node, V8HI_type_node): New globals.
* doc/extend.texi (Vector Types): Document how to use the
vector_size attribute to create vectors, rather than mode.
* config/arm/mmintrin.h: Use vector_size attribute, not mode.
* config/i386/emmintrin.h: Likewise.
* config/i386/mmintrin.h: Likewise.
* config/i386/xmmintrin.h: Likewise.
* config/sh/ushmedia.h: Likwise.
testsuite/ChangeLog
2004-03-16 Paolo Bonzini <bonzini@gnu.org>
* g++.dg/eh/simd-1.C: Use vector_size attribute, not mode.
* g++.dg/eh/simd-2.C: Likewise.
* g++.dg/init/array10.C: Likewise.
* gcc.c-torture/compile/simd-1.c: Likewise.
* gcc.c-torture/compile/simd-2.c: Likewise.
* gcc.c-torture/compile/simd-3.c: Likewise.
* gcc.c-torture/compile/simd-4.c: Likewise.
* gcc.c-torture/compile/simd-6.c: Likewise.
* gcc.c-torture/execute/simd-1.c: Likewise.
* gcc.c-torture/execute/simd-2.c: Likewise.
* gcc.dg/compat/vector-defs.h: Likewise.
* gcc.dg/20020531-1.c: Likewise.
* gcc.dg/altivec-3.c: Likewise.
* gcc.dg/altivec-4.c: Likewise.
* gcc.dg/altivec-varargs-1.c: Likewise.
* testsuite/gcc.dg/compat/vector-defs.h: Likewise.
* gcc.dg/i386-mmx-3.c: Likewise.
* gcc.dg/i386-sse-4.c: Likewise.
* gcc.dg/i386-sse-5.c: Likewise.
* gcc.dg/i386-sse-8.c: Likewise.
* gcc.dg/simd-1.c: Likewise.
* gcc.dg/20030218-1.c: Likewise. Plus, do not declare
__ev64_opaque__ since the machine description provides it.
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.487
diff -u -r1.487 c-common.c
--- c-common.c 26 Feb 2004 01:24:37 -0000 1.487
+++ c-common.c 10 Mar 2004 10:25:28 -0000
@@ -1874,38 +1874,12 @@
if (mode == TYPE_MODE (build_pointer_type (integer_type_node)))
return unsignedp ? make_unsigned_type (mode) : make_signed_type (mode);
- switch (mode)
+ if (VECTOR_MODE_P (mode))
{
- case V16QImode:
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79544 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/simd-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/simd-1.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/testsuite/gcc.dg/simd-1.c b/gcc/testsuite/gcc.dg/simd-1.c index fff6292d1a0..43e63e4a40e 100644 --- a/gcc/testsuite/gcc.dg/simd-1.c +++ b/gcc/testsuite/gcc.dg/simd-1.c @@ -4,10 +4,10 @@ /* Origin: Aldy Hernandez <aldyh@redhat.com>. */ /* Purpose: Program to test generic SIMD support. */ -typedef int __attribute__((mode(V4SI))) v4si; -typedef int __attribute__((mode(V8HI))) v8hi; -typedef int __attribute__((mode(V2SI))) v2si; -typedef unsigned int __attribute__((mode(V4SI))) uv4si; +typedef int __attribute__((vector_size (16))) v4si; +typedef short __attribute__((vector_size (16))) v8hi; +typedef int __attribute__((vector_size (8))) v2si; +typedef unsigned int __attribute__((vector_size (16))) uv4si; v4si a, b; v2si c, d; @@ -16,7 +16,7 @@ uv4si f; int foo __attribute__((mode(DI))); int foo1 __attribute__((mode(SI))); -int foo2 __attribute__((mode(V4HI))); +short foo2 __attribute__((vector_size (8))); void hanneke () @@ -32,7 +32,7 @@ hanneke () e = (typeof (e)) a; /* Different signed SIMD assignment. */ - f = a; /* { dg-error "incompatible types in assignment" } */ + f = a; /* Casted different signed SIMD assignment. */ f = (uv4si) a; |