From 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Jul 2007 18:26:36 +0000 Subject: 2.5-18.1 --- sysdeps/s390/fpu/bits/mathinline.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'sysdeps/s390/fpu/bits/mathinline.h') diff --git a/sysdeps/s390/fpu/bits/mathinline.h b/sysdeps/s390/fpu/bits/mathinline.h index 381f2e0bcb..5c6b83ad06 100644 --- a/sysdeps/s390/fpu/bits/mathinline.h +++ b/sysdeps/s390/fpu/bits/mathinline.h @@ -47,6 +47,21 @@ __NTH (__signbit (double __x)) return __u.__i < 0; } +# ifndef __NO_LONG_DOUBLE_MATH +__MATH_INLINE int +__NTH (__signbitl (long double __x)) +{ + __extension__ union { long double __l; int __i[4]; } __u = { __l: __x }; + return __u.__i[0] < 0; +} +# else +__MATH_INLINE int +__NTH (__signbitl (long double __x)) +{ + return __signbit ((double) __x); +} +# endif + #endif /* C99 */ /* This code is used internally in the GNU libc. */ @@ -70,6 +85,17 @@ __NTH (__ieee754_sqrtf (float x)) return res; } +# if !defined __NO_LONG_DOUBLE_MATH +__MATH_INLINE long double +__NTH (sqrtl (long double __x)) +{ + long double res; + + asm ( "sqxbr %0,%1" : "=f" (res) : "f" (__x) ); + return res; +} +# endif /* !__NO_LONG_DOUBLE_MATH */ + #endif /* __LIBC_INTERNAL_MATH_INLINES */ #endif /* __NO_MATH_INLINES */ -- cgit v1.2.3