]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use rint functions not __rint functions in glibc libm.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 14 Sep 2018 13:10:39 +0000 (13:10 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 14 Sep 2018 13:10:39 +0000 (13:10 +0000)
Continuing the move to use, within libm, public names for libm
functions that can be inlined as built-in functions on many
architectures, this patch moves calls to __rint functions to call the
corresponding rint names instead, with asm redirection to __rint when
the calls are not inlined.  The x86_64 math_private.h is removed as no
longer useful after this patch.

This patch is relative to a tree with my floor patch
<https://sourceware.org/ml/libc-alpha/2018-09/msg00148.html> applied,
and much the same considerations arise regarding possibly replacing an
IFUNC call with a direct inline expansion.

Tested for x86_64, and with build-many-glibcs.py.

* include/math.h [!_ISOMAC && !(__FINITE_MATH_ONLY__ &&
__FINITE_MATH_ONLY__ > 0) && !NO_MATH_REDIRECT] (rint): Redirect
using MATH_REDIRECT.
* sysdeps/aarch64/fpu/s_rint.c: Define NO_MATH_REDIRECT before
header inclusion.
* sysdeps/aarch64/fpu/s_rintf.c: Likewise.
* sysdeps/alpha/fpu/s_rint.c: Likewise.
* sysdeps/alpha/fpu/s_rintf.c: Likewise.
* sysdeps/i386/fpu/s_rintl.c: Likewise.
* sysdeps/ieee754/dbl-64/s_rint.c: Likewise.
* sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c: Likewise.
* sysdeps/ieee754/float128/s_rintf128.c: Likewise.
* sysdeps/ieee754/flt-32/s_rintf.c: Likewise.
* sysdeps/ieee754/ldbl-128/s_rintl.c: Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise.
* sysdeps/m68k/coldfire/fpu/s_rint.c: Likewise.
* sysdeps/m68k/coldfire/fpu/s_rintf.c: Likewise.
* sysdeps/m68k/m680x0/fpu/s_rint.c: Likewise.
* sysdeps/m68k/m680x0/fpu/s_rintf.c: Likewise.
* sysdeps/m68k/m680x0/fpu/s_rintl.c: Likewise.
* sysdeps/powerpc/fpu/s_rint.c: Likewise.
* sysdeps/powerpc/fpu/s_rintf.c: Likewise.
* sysdeps/riscv/rv64/rvd/s_rint.c: Likewise.
* sysdeps/riscv/rvf/s_rintf.c: Likewise.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.c: Likewise.
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.c: Likewise.
* sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c: Likewise.
* sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_rint.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_rintf.c: Likewise.
* sysdeps/x86_64/fpu/math_private.h: Remove file.
* math/e_scalb.c (invalid_fn): Use rint functions instead of
__rint variants.
* math/e_scalbf.c (invalid_fn): Likewise.
* math/e_scalbl.c (invalid_fn): Likewise.
* sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r):
Likewise.
* sysdeps/ieee754/flt-32/e_gammaf_r.c (__ieee754_gammaf_r):
Likewise.
* sysdeps/ieee754/k_standard.c (__kernel_standard): Likewise.
* sysdeps/ieee754/k_standardl.c (__kernel_standard_l): Likewise.
* sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gammal_r):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r):
Likewise.
* sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r):
Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_llrint.c (__llrint): Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_llrintf.c (__llrintf): Likewise.

41 files changed:
ChangeLog
include/math.h
math/e_scalb.c
math/e_scalbf.c
math/e_scalbl.c
sysdeps/aarch64/fpu/s_rint.c
sysdeps/aarch64/fpu/s_rintf.c
sysdeps/alpha/fpu/s_rint.c
sysdeps/alpha/fpu/s_rintf.c
sysdeps/i386/fpu/s_rintl.c
sysdeps/ieee754/dbl-64/e_gamma_r.c
sysdeps/ieee754/dbl-64/s_rint.c
sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c
sysdeps/ieee754/float128/s_rintf128.c
sysdeps/ieee754/flt-32/e_gammaf_r.c
sysdeps/ieee754/flt-32/s_rintf.c
sysdeps/ieee754/k_standard.c
sysdeps/ieee754/k_standardl.c
sysdeps/ieee754/ldbl-128/e_gammal_r.c
sysdeps/ieee754/ldbl-128/s_rintl.c
sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c
sysdeps/ieee754/ldbl-128ibm/s_rintl.c
sysdeps/ieee754/ldbl-96/e_gammal_r.c
sysdeps/m68k/coldfire/fpu/s_rint.c
sysdeps/m68k/coldfire/fpu/s_rintf.c
sysdeps/m68k/m680x0/fpu/s_rint.c
sysdeps/m68k/m680x0/fpu/s_rintf.c
sysdeps/m68k/m680x0/fpu/s_rintl.c
sysdeps/powerpc/fpu/s_rint.c
sysdeps/powerpc/fpu/s_rintf.c
sysdeps/powerpc/powerpc32/fpu/s_llrint.c
sysdeps/powerpc/powerpc32/fpu/s_llrintf.c
sysdeps/riscv/rv64/rvd/s_rint.c
sysdeps/riscv/rvf/s_rintf.c
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.c
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.c
sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c
sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.c
sysdeps/x86_64/fpu/math_private.h [deleted file]
sysdeps/x86_64/fpu/multiarch/s_rint.c
sysdeps/x86_64/fpu/multiarch/s_rintf.c

index b91461d01683cc20bd91f1b010aaa170130d6bcc..6f71e67eb2eb7a264e20467efc6d9108da83b697 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,55 @@
 2018-09-14  Joseph Myers  <joseph@codesourcery.com>
 
+       * include/math.h [!_ISOMAC && !(__FINITE_MATH_ONLY__ &&
+       __FINITE_MATH_ONLY__ > 0) && !NO_MATH_REDIRECT] (rint): Redirect
+       using MATH_REDIRECT.
+       * sysdeps/aarch64/fpu/s_rint.c: Define NO_MATH_REDIRECT before
+       header inclusion.
+       * sysdeps/aarch64/fpu/s_rintf.c: Likewise.
+       * sysdeps/alpha/fpu/s_rint.c: Likewise.
+       * sysdeps/alpha/fpu/s_rintf.c: Likewise.
+       * sysdeps/i386/fpu/s_rintl.c: Likewise.
+       * sysdeps/ieee754/dbl-64/s_rint.c: Likewise.
+       * sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c: Likewise.
+       * sysdeps/ieee754/float128/s_rintf128.c: Likewise.
+       * sysdeps/ieee754/flt-32/s_rintf.c: Likewise.
+       * sysdeps/ieee754/ldbl-128/s_rintl.c: Likewise.
+       * sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise.
+       * sysdeps/m68k/coldfire/fpu/s_rint.c: Likewise.
+       * sysdeps/m68k/coldfire/fpu/s_rintf.c: Likewise.
+       * sysdeps/m68k/m680x0/fpu/s_rint.c: Likewise.
+       * sysdeps/m68k/m680x0/fpu/s_rintf.c: Likewise.
+       * sysdeps/m68k/m680x0/fpu/s_rintl.c: Likewise.
+       * sysdeps/powerpc/fpu/s_rint.c: Likewise.
+       * sysdeps/powerpc/fpu/s_rintf.c: Likewise.
+       * sysdeps/riscv/rv64/rvd/s_rint.c: Likewise.
+       * sysdeps/riscv/rvf/s_rintf.c: Likewise.
+       * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.c: Likewise.
+       * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.c: Likewise.
+       * sysdeps/sparc/sparc64/fpu/multiarch/s_rint.c: Likewise.
+       * sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.c: Likewise.
+       * sysdeps/x86_64/fpu/multiarch/s_rint.c: Likewise.
+       * sysdeps/x86_64/fpu/multiarch/s_rintf.c: Likewise.
+       * sysdeps/x86_64/fpu/math_private.h: Remove file.
+       * math/e_scalb.c (invalid_fn): Use rint functions instead of
+       __rint variants.
+       * math/e_scalbf.c (invalid_fn): Likewise.
+       * math/e_scalbl.c (invalid_fn): Likewise.
+       * sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r):
+       Likewise.
+       * sysdeps/ieee754/flt-32/e_gammaf_r.c (__ieee754_gammaf_r):
+       Likewise.
+       * sysdeps/ieee754/k_standard.c (__kernel_standard): Likewise.
+       * sysdeps/ieee754/k_standardl.c (__kernel_standard_l): Likewise.
+       * sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gammal_r):
+       Likewise.
+       * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r):
+       Likewise.
+       * sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r):
+       Likewise.
+       * sysdeps/powerpc/powerpc32/fpu/s_llrint.c (__llrint): Likewise.
+       * sysdeps/powerpc/powerpc32/fpu/s_llrintf.c (__llrintf): Likewise.
+
        * include/math.h [!_ISOMAC && !(__FINITE_MATH_ONLY__ &&
        __FINITE_MATH_ONLY__ > 0) && !NO_MATH_REDIRECT] (MATH_REDIRECT):
        New macro.
index eed953072b77e81762949200ae59a9ee7ba42696..f93ecaf6e63f59f30ebbc7e1b9fd183c9f383c10 100644 (file)
@@ -102,6 +102,7 @@ fabsf128 (_Float128 x)
 #   define MATH_REDIRECT_UNARY_ARGS(TYPE) TYPE
 MATH_REDIRECT (sqrt, "__ieee754_", MATH_REDIRECT_UNARY_ARGS)
 MATH_REDIRECT (floor, "__", MATH_REDIRECT_UNARY_ARGS)
+MATH_REDIRECT (rint, "__", MATH_REDIRECT_UNARY_ARGS)
 #  endif
 # endif
 
index 96c3579aad541b5bd307035931311a253ae6be79..7f795c40d2ddb3cfff2e4651e54c1ce19aa79a08 100644 (file)
@@ -24,7 +24,7 @@ static double
 __attribute__ ((noinline))
 invalid_fn (double x, double fn)
 {
-  if (__rint (fn) != fn)
+  if (rint (fn) != fn)
     return (fn - fn) / (fn - fn);
   else if (fn > 65000.0)
     return __scalbn (x, 65000);
index 23b38a95de7120d3a9658bc22aea62e000f495e0..aa08b9a81deeed756a5492bf07dabebd9348211f 100644 (file)
@@ -24,7 +24,7 @@ static float
 __attribute__ ((noinline))
 invalid_fn (float x, float fn)
 {
-  if (__rintf (fn) != fn)
+  if (rintf (fn) != fn)
     return (fn - fn) / (fn - fn);
   else if (fn > 65000.0f)
     return __scalbnf (x, 65000);
index a677d06b9f92e22eafe11edeea3e71fd2aa74c26..f0c0bceb3ad0fd19e9677e825d9ff24120bf4209 100644 (file)
@@ -24,7 +24,7 @@ static long double
 __attribute__ ((noinline))
 invalid_fn (long double x, long double fn)
 {
-  if (__rintl (fn) != fn)
+  if (rintl (fn) != fn)
     return (fn - fn) / (fn - fn);
   else if (fn > 65000.0L)
     return __scalbnl (x, 65000);
index eb4232af002615a133df8a3912151c9c6df843c0..ec7d63d54984a1a5361bffad2cee6858e763f848 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <libm-alias-double.h>
 
index 9ebfcb45b4d9d17b569f9882db526605878fae1a..96fb57b9825007bdac24e1ce8916314895d3bb05 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <libm-alias-float.h>
 
index d3bcf1829a3bbe42fdae8429948584f8ea271d23..0f4a7467e4a18eee188f4346ab638a21719690da 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <math_ldbl_opt.h>
 #include <libm-alias-double.h>
index 0cc912d84326d17ddcb47bc865fb5b95b18c1448..f8bf5e4ab18a40c4c0e794b17a6b360ada17a03d 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <libm-alias-float.h>
 
index 5900435af9dd46a8b3b4fecd959b77fc9cb93f76..6946f611c3d7ef9046b6e9f54981892a5dbfffd0 100644 (file)
@@ -4,6 +4,7 @@
  * Public domain.
  */
 
+#define NO_MATH_REDIRECT
 #include <libm-alias-ldouble.h>
 #include <math_private.h>
 
index e7b6dfecd7965ef9ccc30f91a3f152f4f304adb3..9f7af6f0c9318bbad80511689c176799cbffb9af 100644 (file)
@@ -129,7 +129,7 @@ __ieee754_gamma_r (double x, int *signgamp)
       return 1.0 / x;
     }
   if (__builtin_expect (hx < 0, 0)
-      && (uint32_t) hx < 0xfff00000 && __rint (x) == x)
+      && (uint32_t) hx < 0xfff00000 && rint (x) == x)
     {
       /* Return value for integer x < 0 is NaN with invalid exception.  */
       *signgamp = 0;
index cb0f5ca2982352f231db52a51ce3a3456a4880d2..dd01a841760d0243c90995c627ba6807ccb5b320 100644 (file)
@@ -20,6 +20,7 @@
  *     Inexact flag raised if x not equal to rint(x).
  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <math_private.h>
 #include <libm-alias-double.h>
index 622e479c5f73d16953b1200c6a87ec893f33b565..378b73a5442a897878e7e5bf7fdf2f23ca52173c 100644 (file)
@@ -19,6 +19,7 @@
  *     Inexact flag raised if x not equal to rint(x).
  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <math_private.h>
 #include <libm-alias-double.h>
index 2adb95f360205aa047263a7e4da43c1d02836b2c..73c53776d9d7892375c47008fa6925a210778b8c 100644 (file)
@@ -1,2 +1,3 @@
+#define NO_MATH_REDIRECT
 #include <float128_private.h>
 #include "../ldbl-128/s_rintl.c"
index ddc268e8fcc1eb7a34990c96ffe4a82e35a8b54a..28da9c46d27e1f2ff4253b4fa5462c2c574d4726 100644 (file)
@@ -121,7 +121,7 @@ __ieee754_gammaf_r (float x, int *signgamp)
       return 1.0 / x;
     }
   if (__builtin_expect (hx < 0, 0)
-      && (uint32_t) hx < 0xff800000 && __rintf (x) == x)
+      && (uint32_t) hx < 0xff800000 && rintf (x) == x)
     {
       /* Return value for integer x < 0 is NaN with invalid exception.  */
       *signgamp = 0;
index db6f260a0bf5d73476f438565222b244aefddb57..0306dc21f4bc154b8a8020733d1013517bf2fe64 100644 (file)
@@ -13,6 +13,7 @@
  * ====================================================
  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <math_private.h>
 #include <libm-alias-float.h>
index f74f9c712e92e45c9b7fdfa592c6f13f55fc4605..f71a83798037dc48d4f9f9ec88a1daf7a472b24a 100644 (file)
@@ -471,11 +471,11 @@ __kernel_standard(double x, double y, int type)
                if (_LIB_VERSION == _SVID_) {
                  exc.retval = HUGE;
                  y *= 0.5;
-                 if(x<zero&&__rint(y)!=y) exc.retval = -HUGE;
+                 if(x<zero&&rint(y)!=y) exc.retval = -HUGE;
                } else {
                  exc.retval = HUGE_VAL;
                  y *= 0.5;
-                 if(x<zero&&__rint(y)!=y) exc.retval = -HUGE_VAL;
+                 if(x<zero&&rint(y)!=y) exc.retval = -HUGE_VAL;
                }
                if (_LIB_VERSION == _POSIX_)
                  __set_errno (ERANGE);
@@ -491,7 +491,7 @@ __kernel_standard(double x, double y, int type)
                exc.name = CSTR ("pow");
                exc.retval =  zero;
                y *= 0.5;
-               if (x < zero && __rint (y) != y)
+               if (x < zero && rint (y) != y)
                  exc.retval = -zero;
                if (_LIB_VERSION == _POSIX_)
                  __set_errno (ERANGE);
index 58abc22b6ef8c43162089d19d6886d136ecceb58..618abb28f41b562377207dbfa8a48e9b54df1087 100644 (file)
@@ -73,14 +73,14 @@ __kernel_standard_l (long double x, long double y, int type)
        {
          exc.retval = HUGE;
          y *= 0.5;
-         if (x < zero && __rintl (y) != y)
+         if (x < zero && rintl (y) != y)
            exc.retval = -HUGE;
        }
       else
        {
          exc.retval = HUGE_VAL;
          y *= 0.5;
-         if (x < zero && __rintl (y) != y)
+         if (x < zero && rintl (y) != y)
            exc.retval = -HUGE_VAL;
        }
       if (_LIB_VERSION == _POSIX_)
@@ -97,7 +97,7 @@ __kernel_standard_l (long double x, long double y, int type)
       exc.name = (char *) "powl";
       exc.retval = zero;
       y *= 0.5;
-      if (x < zero && __rintl (y) != y)
+      if (x < zero && rintl (y) != y)
        exc.retval = -zero;
       if (_LIB_VERSION == _POSIX_)
        __set_errno (ERANGE);
index bf3c81ca14591c43629a77a547619026f05accfd..9fd0dc046dc6a20d8966fc13c66422806d1f68cb 100644 (file)
@@ -136,7 +136,7 @@ __ieee754_gammal_r (_Float128 x, int *signgamp)
       *signgamp = 0;
       return 1.0 / x;
     }
-  if (hx < 0 && (uint64_t) hx < 0xffff000000000000ULL && __rintl (x) == x)
+  if (hx < 0 && (uint64_t) hx < 0xffff000000000000ULL && rintl (x) == x)
     {
       /* Return value for integer x < 0 is NaN with invalid exception.  */
       *signgamp = 0;
index 9e6637a22536084a83296fb9a37f5804a0428f02..b6337e1d8a02b3facdcd07def22178fa44cc1af2 100644 (file)
@@ -27,6 +27,7 @@ static char rcsid[] = "$NetBSD: $";
  *     Inexact flag raised if x not equal to rintl(x).
  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <math_private.h>
 #include <libm-alias-ldouble.h>
index 5d36cf87d28a22e06999aeff643e6465a28a589b..8906da48461d667a1e9f13b4377123cc4b099121 100644 (file)
@@ -136,7 +136,7 @@ __ieee754_gammal_r (long double x, int *signgamp)
       *signgamp = 0;
       return 1.0 / x;
     }
-  if (hx < 0 && (uint64_t) hx < 0xfff0000000000000ULL && __rintl (x) == x)
+  if (hx < 0 && (uint64_t) hx < 0xfff0000000000000ULL && rintl (x) == x)
     {
       /* Return value for integer x < 0 is NaN with invalid exception.  */
       *signgamp = 0;
index e356b633dc721a01e0d8a08200ac8c38f8263a01..6eafe16cc253f04abf5761d5ec116f94d3805d09 100644 (file)
@@ -20,6 +20,7 @@
 /* This has been coded in assembler because GCC makes such a mess of it
    when it's coded in C.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <fenv.h>
 #include <math-barriers.h>
index 8af9d7ca2b986386cfacafa75a7f4a9aae3f7142..e88a137abbc8b14105df5f1c2fe9c10ecb5611e9 100644 (file)
@@ -141,7 +141,7 @@ __ieee754_gammal_r (long double x, int *signgamp)
       *signgamp = 0;
       return x + x;
     }
-  if (__builtin_expect ((es & 0x8000) != 0, 0) && __rintl (x) == x)
+  if (__builtin_expect ((es & 0x8000) != 0, 0) && rintl (x) == x)
     {
       /* Return value for integer x < 0 is NaN with invalid exception.  */
       *signgamp = 0;
index a5bc4ad223822cd839a69942af46c8863f8a02ad..fa03a03e695c1cccffd3820e5ea49f6cfe013ec3 100644 (file)
@@ -15,6 +15,7 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <libm-alias-double.h>
 
 double
index d68a3fda4d21f9e75e6e570cb3a5aa43f4b6500e..e7ed3af872402239c6f3ea6140d33fb005618417 100644 (file)
@@ -15,6 +15,7 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <libm-alias-float.h>
 
 float
index fa092c07eb8bc10a1fc4cc0200903c6ca978a181..cc88900d68d3001804eff004f8077f0aa7b81614 100644 (file)
@@ -1,2 +1,3 @@
+#define NO_MATH_REDIRECT
 #include <math-type-macros-double.h>
 #include <s_rint_template.c>
index 5cda19c69081e2d85f3533379165c39d176ba64b..70d6be93b0fd912bcc4c59ab5189a0b117b1f9cf 100644 (file)
@@ -1,2 +1,3 @@
+#define NO_MATH_REDIRECT
 #include <math-type-macros-float.h>
 #include <s_rint_template.c>
index df393ee8957872f2a494ec40ea76cd1120998c6a..c6492015b4b894cead0006b04a69916d2f99def3 100644 (file)
@@ -1,2 +1,3 @@
+#define NO_MATH_REDIRECT
 #include <math-type-macros-ldouble.h>
 #include <s_rint_template.c>
index 7a0cefd2a053a30dc47b08ceeb49527f405a7adf..1a438174cb8e7e2c94cdeff0e61bb7026b51e820 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <libm-alias-double.h>
 
index 8752834a546e00f051cc7adc6f92dfbd8d0c4d15..18182b64b095038a264100c51de2140e88ad86bb 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <libm-alias-float.h>
 
index 3704f9b11ea6aafa45166831dc434436b40ac389..f66797479e3567a2116cd7fbadd04f920183fcad 100644 (file)
@@ -26,7 +26,7 @@
 long long int
 __llrint (double x)
 {
-  double rx = __rint (x);
+  double rx = rint (x);
   if (HAVE_PPC_FCTIDZ || rx != x)
     return (long long int) rx;
   else
index c5e78fa050fd2ccf51f11aa51f9de0b515ad57ca..8079db4553a7e4180875759e1ce86f896d31365c 100644 (file)
@@ -24,7 +24,7 @@
 long long int
 __llrintf (float x)
 {
-  float rx = __rintf (x);
+  float rx = rintf (x);
   if (HAVE_PPC_FCTIDZ || rx != x)
     return (long long int) rx;
   else
index ef2380ea7fdacabb2039d4c743c7a4ed52bacff9..6c383cc670c177f72564b1ef213b4ff89e30d8ca 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <math_private.h>
 #include <libm-alias-double.h>
index 2ec3877a4fb62ede9a7b2a9f95aa26213f033d03..00e347acbed54270c3ceed2352a910e3744a5833 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <math_private.h>
 #include <libm-alias-float.h>
index bba72283557abbc34d311687dcaaf3becedf0368..9c0f9bf177c50775c6b02f52297bc7a76cd01c1b 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #define __rint __redirect_rint
 #include <math.h>
 #undef __rint
index 74c5e25359471de1687c0c81677c11063d097970..ca9c2de7b6c7f112b4c091969a2c78de19bfca3a 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <sparc-ifunc.h>
 #include <libm-alias-float.h>
index ae782b0b6025f4b2dd186e58107b6788ba2c6a01..981f4065873fd089fd94927bce0075ce40c1647b 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <sparc-ifunc.h>
 #include <libm-alias-double.h>
index e0265c47aaae37738caea5db89ee873f0ebf8660..b5c05b008face3aec3b2ee1c7b1dc082edd578fe 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <math.h>
 #include <sparc-ifunc.h>
 #include <libm-alias-float.h>
diff --git a/sysdeps/x86_64/fpu/math_private.h b/sysdeps/x86_64/fpu/math_private.h
deleted file mode 100644 (file)
index e5bf46f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef X86_64_MATH_PRIVATE_H
-#define X86_64_MATH_PRIVATE_H 1
-
-#include_next <math_private.h>
-
-#ifdef __SSE4_1__
-extern __always_inline double
-__rint (double d)
-{
-  double res;
-# if defined __AVX__ || defined SSE2AVX
-  asm ("vroundsd $4, %1, %0, %0" : "=x" (res) : "xm" (d));
-# else
-  asm ("roundsd $4, %1, %0" : "=x" (res) : "xm" (d));
-# endif
-  return res;
-}
-
-extern __always_inline float
-__rintf (float d)
-{
-  float res;
-# if defined __AVX__ || defined SSE2AVX
-  asm ("vroundss $4, %1, %0, %0" : "=x" (res) : "xm" (d));
-# else
-  asm ("roundss $4, %1, %0" : "=x" (res) : "xm" (d));
-# endif
-  return res;
-}
-#endif /* __SSE4_1__ */
-
-#endif /* X86_64_MATH_PRIVATE_H */
index f1cb2fed0c0173cf79b78d8cb5d9a4a11183fe19..10c9ee4c64614ed4c503594c7f38a7f399fbcc68 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <libm-alias-double.h>
 
 #define rint __redirect_rint
index 41323b3b5b3bcbdb9f284c3b2c2b6231c9df18b9..5ef94a64e6284efbd48b38b925d14c33f287ea69 100644 (file)
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define NO_MATH_REDIRECT
 #include <libm-alias-float.h>
 
 #define rintf __redirect_rintf