Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.target / i386 / ssefn-4.c
blob5547129e8c5b94b0781c3f39fc95ea6053c825dc
1 /* Execution test for argument passing with SSE2 and local functions
2 Written by Paolo Bonzini, 25 January 2005 */
4 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
5 /* { dg-options "-O2 -msse2 -mfpmath=sse" } */
6 #include <assert.h>
7 #include "../../gcc.dg/i386-cpuid.h"
9 static float xs (void)
11 return 3.14159265;
14 float ys (float a)
16 return xs () * a;
19 static double xd (void)
21 return 3.1415926535;
24 double yd (double a)
26 return xd () * a;
29 int main()
31 unsigned long cpu_facilities;
33 cpu_facilities = i386_cpuid ();
35 if (cpu_facilities & bit_SSE2)
37 assert (ys (1) == xs ());
38 assert (ys (2) == xs () * 2);
39 assert (yd (1) == xd ());
40 assert (yd (2) == xd () * 2);
42 return 0;