OSDN Git Service

96c1111fddcdb5f79d8ea7e3721af2f332a3e0b0
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / compat / vector-2a_main.c
1 /* { dg-skip-if "test SSE2 support" { ! { i?86-*-* x86_64-*-* } } } */
2
3 /* Test compatibility of vector types: layout between separately-compiled
4    modules, parameter passing, and function return.  This test uses
5    vectors of floating points values.  */
6
7 #include "cpuid.h"
8
9 extern void vector_2_x (void);
10 extern void exit (int);
11 int fails;
12
13 int
14 main ()
15 {
16   unsigned int eax, ebx, ecx, edx;
17
18   if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
19     return 0;
20
21   /* Run SSE vector test only if host has SSE2 support.  */
22   if (edx & bit_SSE2)
23     vector_2_x ();
24
25   exit (0);
26 }