diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/i386-ssefn-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/i386-ssefn-2.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/i386-ssefn-2.c b/gcc/testsuite/gcc.dg/i386-ssefn-2.c new file mode 100644 index 0000000..0e19700 --- /dev/null +++ b/gcc/testsuite/gcc.dg/i386-ssefn-2.c @@ -0,0 +1,30 @@ +/* Test argument passing with SSE2 and local functions + Written by Paolo Bonzini, 25 January 2005 */ + +/* { dg-do compile { target i?86-*-* } } */ +/* { dg-final { scan-assembler "movss" } } */ +/* { dg-final { scan-assembler "mulss" } } */ +/* { dg-final { scan-assembler "movsd" } } */ +/* { dg-final { scan-assembler "mulsd" } } */ +/* { dg-options "-O2 -msse2 -mfpmath=sse -fno-inline" } */ + +static float xs (void) +{ + return 3.14159265; +} + +float ys (float a) +{ + return xs () * a; +} + +static double xd (void) +{ + return 3.1415926535; +} + +double yd (double a) +{ + return xd () * a; +} + |