aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128ibm
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-09-18 13:24:14 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-09-18 13:24:14 +0000
commit50bc59ca4dba7f82b74f86abc7bc75848cea6d6e (patch)
treed961181dca4581397fa252290f70bbf162c2cf56 /sysdeps/ieee754/ldbl-128ibm
parent71223ef90946a5089b38cd60eb0eb9e50a8f3e4c (diff)
downloadglibc-50bc59ca4dba7f82b74f86abc7bc75848cea6d6e.zip
glibc-50bc59ca4dba7f82b74f86abc7bc75848cea6d6e.tar.gz
glibc-50bc59ca4dba7f82b74f86abc7bc75848cea6d6e.tar.bz2
Fix ldbl-128ibm ceill, floorl inlining of ceil, floor.
The ldbl-128ibm implementations of ceill and floorl call the corresponding double functions. This patch fixes those implementations to call those functions as ceil and floor rather than as __ceil and __floor, so that the proper inlining takes place when possible, while including local asm redirections for when the functions are not inlined since NO_MATH_REDIRECT applies to the double functions as well as to the long double ones. Tested with build-many-glibcs.py for all its powerpc configurations. * sysdeps/ieee754/ldbl-128ibm/s_ceill.c (ceil): Redirect to __ceil. (__ceill): Call ceil instead of __ceil. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c (floor): Redirect to __floor. (__floorl): Call floor instead of __floor.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_ceill.c6
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_floorl.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_ceill.c b/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
index 8008354..6ca1376 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
@@ -24,6 +24,8 @@
#include <float.h>
#include <ieee754.h>
+double ceil (double) asm ("__ceil");
+
long double
__ceill (long double x)
@@ -37,7 +39,7 @@ __ceill (long double x)
&& __builtin_isless (__builtin_fabs (xh),
__builtin_inf ()), 1))
{
- hi = __ceil (xh);
+ hi = ceil (xh);
if (hi != xh)
{
/* The high part is not an integer; the low part does not
@@ -48,7 +50,7 @@ __ceill (long double x)
else
{
/* The high part is a nonzero integer. */
- lo = __ceil (xl);
+ lo = ceil (xl);
xh = hi;
xl = lo;
ldbl_canonicalize_int (&xh, &xl);
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
index f33b6ad..8767bac 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
@@ -24,6 +24,8 @@
#include <float.h>
#include <ieee754.h>
+double floor (double) asm ("__floor");
+
long double
__floorl (long double x)
@@ -37,7 +39,7 @@ __floorl (long double x)
&& __builtin_isless (__builtin_fabs (xh),
__builtin_inf ()), 1))
{
- hi = __floor (xh);
+ hi = floor (xh);
if (hi != xh)
{
/* The high part is not an integer; the low part does not
@@ -48,7 +50,7 @@ __floorl (long double x)
else
{
/* The high part is a nonzero integer. */
- lo = __floor (xl);
+ lo = floor (xl);
xh = hi;
xl = lo;
ldbl_canonicalize_int (&xh, &xl);