diff options
author | Richard Henderson <rth@twiddle.net> | 2014-02-12 06:54:57 -0800 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2014-02-12 07:00:06 -0800 |
commit | 68b7efaadb1b6045a56277ea62d324c20ac0b633 (patch) | |
tree | 07b51c9866373430373fb90b252d46c23cc1707e /sysdeps/alpha/fpu/math_private.h | |
parent | 8fd7b0d5591e59ed5cb3078b351bd49314a66cef (diff) | |
download | glibc-68b7efaadb1b6045a56277ea62d324c20ac0b633.tar.gz glibc-68b7efaadb1b6045a56277ea62d324c20ac0b633.tar.xz glibc-68b7efaadb1b6045a56277ea62d324c20ac0b633.zip |
Relocate alpha from ports to libc
Also fixed the following whitespace nits to satisfy the push: sysdeps/alpha/alphaev6/memset.S:142: space before tab in indent. sysdeps/alpha/configure:1: new blank line at EOF. sysdeps/alpha/fpu/e_sqrt.c:126: space before tab in indent. sysdeps/alpha/preconfigure:1: new blank line at EOF. sysdeps/unix/sysv/linux/alpha/syscalls.list:1: new blank line at EOF.
Diffstat (limited to 'sysdeps/alpha/fpu/math_private.h')
-rw-r--r-- | sysdeps/alpha/fpu/math_private.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sysdeps/alpha/fpu/math_private.h b/sysdeps/alpha/fpu/math_private.h new file mode 100644 index 0000000000..22ab3b9ab0 --- /dev/null +++ b/sysdeps/alpha/fpu/math_private.h @@ -0,0 +1,44 @@ +#ifndef ALPHA_MATH_PRIVATE_H +#define ALPHA_MATH_PRIVATE_H 1 + +/* In bits/mathinline.h we define __isnan et al. + In sysdeps/alpha/fpu/s_isnan.c we move the identifier out of the way + via macro hackery. In both cases, tell math/math_private.h that + we have a local copy of the function. */ + +#ifndef __isnan +# define __isnan __isnan +#endif +#ifndef __isnanf +# define __isnanf __isnanf +#endif + +#include_next <math_private.h> + +#ifdef __alpha_fix__ +extern __always_inline double +__ieee754_sqrt (double d) +{ + double ret; +# ifdef _IEEE_FP_INEXACT + asm ("sqrtt/suid %1,%0" : "=f"(ret) : "f"(d)); +# else + asm ("sqrtt/sud %1,%0" : "=f"(ret) : "f"(d)); +# endif + return ret; +} + +extern __always_inline float +__ieee754_sqrtf (float d) +{ + float ret; +# ifdef _IEEE_FP_INEXACT + asm ("sqrts/suid %1,%0" : "=f"(ret) : "f"(d)); +# else + asm ("sqrts/sud %1,%0" : "=f"(ret) : "f"(d)); +# endif + return ret; +} +#endif /* FIX */ + +#endif /* ALPHA_MATH_PRIVATE_H */ |