diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
commit | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch) | |
tree | 2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /sysdeps/s390/fpu/bits | |
parent | 7d58530341304d403a6626d7f7a1913165fe2f32 (diff) | |
download | glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.bz2 glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip |
2.5-18.1
Diffstat (limited to 'sysdeps/s390/fpu/bits')
-rw-r--r-- | sysdeps/s390/fpu/bits/mathinline.h | 26 |
1 files changed, 26 insertions, 0 deletions
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 */ |