OSDN Git Service

2005-02-15 Eric Christopher <echristo@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / mips-rsqrt-1.c
1 /* { dg-do compile { target "mips*-*-*" } } */
2 /* { dg-options "-O2 -ffast-math -mips4" } */
3 /* { dg-final { scan-assembler "rsqrt.d" } } */
4 /* { dg-final { scan-assembler "rsqrt.s" } } */
5
6 #if (__mips != 4 && __mips != 64) || __mips_soft_float
7 asm ("# rsqrt.d rsqrt.s");
8 #else
9 extern double sqrt(double);
10 extern float sqrtf(float);
11
12 double foo(double x)
13 {
14   return 1.0/sqrt(x);
15 }
16
17 float bar(float x)
18 {
19   return 1.0f/sqrtf(x);
20 }
21 #endif