OSDN Git Service

gcc:
[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 /* { dg-require-effective-target sse2 } */
3
4 /* Test compatibility of vector types: layout between separately-compiled
5    modules, parameter passing, and function return.  This test uses
6    vectors of floating points values.  */
7
8 #include "cpuid.h"
9
10 extern void vector_2_x (void);
11 extern void exit (int);
12 int fails;
13
14 int
15 main ()
16 {
17   unsigned int eax, ebx, ecx, edx;
18
19   if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
20     return 0;
21
22   /* Run SSE vector test only if host has SSE2 support.  */
23   if (edx & bit_SSE2)
24     vector_2_x ();
25
26   exit (0);
27 }