]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/powerpc/fpu/e_sqrt.c
Optimize libm
[thirdparty/glibc.git] / sysdeps / powerpc / fpu / e_sqrt.c
index e95b786a00a8daab18041473bc076c3eba8b0958..f9ded25717553085fb2eb250c331ca25848d59a9 100644 (file)
@@ -1,5 +1,5 @@
 /* Double-precision floating point square root.
-   Copyright (C) 1997, 2002, 2003, 2004, 2008 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2002-2004, 2008, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -46,21 +46,15 @@ extern const float __t_sqrt[1024];
    generated guesses (which mostly runs on the integer unit, while the
    Newton-Raphson is running on the FPU).  */
 
-#ifdef __STDC__
 double
 __slow_ieee754_sqrt (double x)
-#else
-double
-__slow_ieee754_sqrt (x)
-     double x;
-#endif
 {
   const float inf = a_inf.value;
 
   if (x > 0)
     {
       /* schedule the EXTRACT_WORDS to get separation between the store
-         and the load.  */
+        and the load.  */
       ieee_double_shape_type ew_u;
       ieee_double_shape_type iw_u;
       ew_u.value = (x);
@@ -147,7 +141,7 @@ __slow_ieee754_sqrt (x)
   else if (x < 0)
     {
       /* For some reason, some PowerPC32 processors don't implement
-         FE_INVALID_SQRT.  */
+        FE_INVALID_SQRT.  */
 #ifdef FE_INVALID_SQRT
       feraiseexcept (FE_INVALID_SQRT);
 
@@ -160,14 +154,8 @@ __slow_ieee754_sqrt (x)
   return f_wash (x);
 }
 
-#ifdef __STDC__
 double
 __ieee754_sqrt (double x)
-#else
-double
-__ieee754_sqrt (x)
-     double x;
-#endif
 {
   double z;
 
@@ -175,7 +163,7 @@ __ieee754_sqrt (x)
   if (__CPU_HAS_FSQRT)
     {
       /* Volatile is required to prevent the compiler from moving the
-         fsqrt instruction above the branch.  */
+        fsqrt instruction above the branch.  */
       __asm __volatile ("      fsqrt   %0,%1\n"
                                :"=f" (z):"f" (x));
     }
@@ -184,3 +172,4 @@ __ieee754_sqrt (x)
 
   return z;
 }
+strong_alias (__ieee754_sqrt, __sqrt_finite)