OSDN Git Service

fortran/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / 20060512-1.c
1 /* { dg-do run { target i?86-*-* } } */
2 /* { dg-require-effective-target ilp32 } */
3 /* { dg-options "-std=gnu99 -msse2" } */
4 #include <emmintrin.h>
5 __m128i __attribute__ ((__noinline__))
6 vector_using_function ()
7 {
8   volatile __m128i vx;  /* We want to force a vector-aligned store into the stack.  */
9   vx = _mm_xor_si128 (vx, vx);
10   return vx;
11 }
12 int __attribute__ ((__noinline__, __force_align_arg_pointer__))
13 self_aligning_function (int x, int y)
14 {
15   __m128i ignored = vector_using_function ();
16   return (x + y);
17 }
18 int g_1 = 20;
19 int g_2 = 22;
20 int
21 main ()
22 {
23   int result;
24   asm ("pushl %esi");           /* Disalign runtime stack.  */
25   result = self_aligning_function (g_1, g_2);
26   asm ("popl %esi");
27   if (result != 42)
28     abort ();
29 }