@@ -104,6 +104,7 @@ MATH_REDIRECT (sqrt, "__ieee754_", MATH_REDIRECT_UNARY_ARGS)
MATH_REDIRECT (ceil, "__", MATH_REDIRECT_UNARY_ARGS)
MATH_REDIRECT (floor, "__", MATH_REDIRECT_UNARY_ARGS)
MATH_REDIRECT (rint, "__", MATH_REDIRECT_UNARY_ARGS)
+MATH_REDIRECT (trunc, "__", MATH_REDIRECT_UNARY_ARGS)
# endif
# endif
@@ -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>
@@ -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>
@@ -173,8 +173,8 @@ __ieee754_gamma_r (double x, int *signgamp)
}
else
{
- double tx = __trunc (x);
- *signgamp = (tx == 2.0 * __trunc (tx / 2.0)) ? -1 : 1;
+ double tx = trunc (x);
+ *signgamp = (tx == 2.0 * trunc (tx / 2.0)) ? -1 : 1;
if (x <= -184.0)
/* Underflow. */
ret = DBL_MIN * DBL_MIN;
@@ -17,6 +17,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>
@@ -17,6 +17,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>
@@ -1,2 +1,3 @@
+#define NO_MATH_REDIRECT
#include <float128_private.h>
#include "../ldbl-128/s_truncl.c"
@@ -165,8 +165,8 @@ __ieee754_gammaf_r (float x, int *signgamp)
}
else
{
- float tx = __truncf (x);
- *signgamp = (tx == 2.0f * __truncf (tx / 2.0f)) ? -1 : 1;
+ float tx = truncf (x);
+ *signgamp = (tx == 2.0f * truncf (tx / 2.0f)) ? -1 : 1;
if (x <= -42.0f)
/* Underflow. */
ret = FLT_MIN * FLT_MIN;
@@ -17,6 +17,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>
@@ -179,8 +179,8 @@ __ieee754_gammal_r (_Float128 x, int *signgamp)
}
else
{
- _Float128 tx = __truncl (x);
- *signgamp = (tx == 2 * __truncl (tx / 2)) ? -1 : 1;
+ _Float128 tx = truncl (x);
+ *signgamp = (tx == 2 * truncl (tx / 2)) ? -1 : 1;
if (x <= -1775)
/* Underflow. */
ret = LDBL_MIN * LDBL_MIN;
@@ -18,6 +18,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>
@@ -179,8 +179,8 @@ __ieee754_gammal_r (long double x, int *signgamp)
}
else
{
- long double tx = __truncl (x);
- *signgamp = (tx == 2.0L * __truncl (tx / 2.0L)) ? -1 : 1;
+ long double tx = truncl (x);
+ *signgamp = (tx == 2.0L * truncl (tx / 2.0L)) ? -1 : 1;
if (x <= -191.0L)
/* Underflow. */
ret = LDBL_MIN * LDBL_MIN;
@@ -17,12 +17,17 @@
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 <math_ldbl_opt.h>
#include <float.h>
#include <ieee754.h>
+double ceil (double) asm ("__ceil");
+double floor (double) asm ("__floor");
+double trunc (double) asm ("__trunc");
+
long double
__truncl (long double x)
@@ -36,7 +41,7 @@ __truncl (long double x)
&& __builtin_isless (__builtin_fabs (xh),
__builtin_inf ()), 1))
{
- hi = __trunc (xh);
+ hi = trunc (xh);
if (hi != xh)
{
/* The high part is not an integer; the low part does not
@@ -171,8 +171,8 @@ __ieee754_gammal_r (long double x, int *signgamp)
}
else
{
- long double tx = __truncl (x);
- *signgamp = (tx == 2.0L * __truncl (tx / 2.0L)) ? -1 : 1;
+ long double tx = truncl (x);
+ *signgamp = (tx == 2.0L * truncl (tx / 2.0L)) ? -1 : 1;
if (x <= -1766.0L)
/* Underflow. */
ret = LDBL_MIN * LDBL_MIN;
@@ -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>
FLOAT
@@ -57,26 +57,6 @@ __ieee754_sqrtf128 (_Float128 __x)
__z; })
# endif
-# ifndef __trunc
-# define __trunc(x) \
- ({ double __z; \
- __asm __volatile ( \
- " friz %0,%1\n" \
- : "=f" (__z) \
- : "f" (x)); \
- __z; })
-# endif
-# ifndef __truncf
-# define __truncf(x) \
- ({ float __z; \
- __asm __volatile ( \
- " friz %0,%1\n" \
- " frsp %0,%0\n" \
- : "=f" (__z) \
- : "f" (x)); \
- __z; })
-# endif
-
#endif /* defined _ARCH_PWR5X */
#endif /* _PPC_MATH_PRIVATE_H_ */
@@ -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 <shlib-compat.h>
@@ -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 <shlib-compat.h>
@@ -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 <shlib-compat.h>
@@ -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 <shlib-compat.h>
@@ -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 <fenv_private.h>
@@ -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 <fenv_private.h>
@@ -16,6 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define NO_MATH_REDIRECT
#include <sparc-ifunc.h>
#include <math.h>
#include <libm-alias-double.h>
@@ -16,6 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define NO_MATH_REDIRECT
#include <sparc-ifunc.h>
#include <math.h>
#include <libm-alias-float.h>
@@ -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 trunc __redirect_trunc
@@ -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 truncf __redirect_truncf