diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-11-06 19:45:58 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-11-06 19:45:58 +0000 |
commit | a9a6bf36c159dc0eda7fc9a9985fb737da4be07a (patch) | |
tree | 60ce20b8e0b28aea6b50f94f0890d01189251601 /sysdeps/powerpc/fpu/bits/mathinline.h | |
parent | ee6815e76c19f805229f4dbfd4ec27de1bb9864f (diff) | |
download | glibc-a9a6bf36c159dc0eda7fc9a9985fb737da4be07a.tar.gz glibc-a9a6bf36c159dc0eda7fc9a9985fb737da4be07a.tar.xz glibc-a9a6bf36c159dc0eda7fc9a9985fb737da4be07a.zip |
* sysdeps/powerpc/fpu/bits/mathinline.h
[__LIBC_INTERNAL_MATH_INLINES]: Moved to ... * sysdeps/powerpc/fpu/math_private.h: ...here. New file.
Diffstat (limited to 'sysdeps/powerpc/fpu/bits/mathinline.h')
-rw-r--r-- | sysdeps/powerpc/fpu/bits/mathinline.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/sysdeps/powerpc/fpu/bits/mathinline.h b/sysdeps/powerpc/fpu/bits/mathinline.h index aed899e882..04478309d9 100644 --- a/sysdeps/powerpc/fpu/bits/mathinline.h +++ b/sysdeps/powerpc/fpu/bits/mathinline.h @@ -121,62 +121,4 @@ __NTH (fdimf (float __x, float __y)) #endif /* __USE_ISOC99 */ #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ - -/* This code is used internally in the GNU libc. */ -#ifdef __LIBC_INTERNAL_MATH_INLINES - -#include <sysdep.h> -#include <ldsodefs.h> -#include <dl-procinfo.h> - -# if __WORDSIZE == 64 || defined _ARCH_PWR4 -# define __CPU_HAS_FSQRT 1 -# else -# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0) -# endif - -extern double __slow_ieee754_sqrt (double); -__MATH_INLINE double -__NTH (__ieee754_sqrt (double __x)) -{ - double __z; - - /* If the CPU is 64-bit we can use the optional FP instructions. */ - if (__CPU_HAS_FSQRT) - { - /* Volatile is required to prevent the compiler from moving the - fsqrt instruction above the branch. */ - __asm __volatile ( - " fsqrt %0,%1\n" - : "=f" (__z) - : "f" (__x)); - } - else - __z = __slow_ieee754_sqrt(__x); - - return __z; -} - -extern float __slow_ieee754_sqrtf (float); -__MATH_INLINE float -__NTH (__ieee754_sqrtf (float __x)) -{ - float __z; - - /* If the CPU is 64-bit we can use the optional FP instructions. */ - if (__CPU_HAS_FSQRT) - { - /* Volatile is required to prevent the compiler from moving the - fsqrts instruction above the branch. */ - __asm __volatile ( - " fsqrts %0,%1\n" - : "=f" (__z) - : "f" (__x)); - } - else - __z = __slow_ieee754_sqrtf(__x); - - return __z; -} -#endif /* __LIBC_INTERNAL_MATH_INLINES */ #endif /* __GNUC__ && !_SOFT_FLOAT */ |