aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-06-24 16:33:49 +0000
committerRichard Henderson <rth@redhat.com>2003-06-24 16:33:49 +0000
commit750cd4ff74794408a1ce2aeed425b3e138c3584c (patch)
tree0906e24a0bf067ac2b58b04a8c8309c94135b508
parent160b780a97169e96e0f6add4daff8f63f969cba7 (diff)
downloadglibc-750cd4ff74794408a1ce2aeed425b3e138c3584c.tar
glibc-750cd4ff74794408a1ce2aeed425b3e138c3584c.tar.gz
glibc-750cd4ff74794408a1ce2aeed425b3e138c3584c.tar.bz2
glibc-750cd4ff74794408a1ce2aeed425b3e138c3584c.zip
* sysdeps/alpha/fpu/bits/mathinline.h: Honor __LIBC_INTERNAL_MATH_INLINES. Implement __signbitf, __signbit.
* sysdeps/alpha/fpu/bits/mathinline.h: Honor __LIBC_INTERNAL_MATH_INLINES. Implement __signbitf, __signbit.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/alpha/fpu/bits/mathinline.h16
2 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9bb4556be9..e891c2c995 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
* sysdeps/alpha/setjmp.S (_setjmp, setjmp): Mark .prologue.
+ * sysdeps/alpha/fpu/bits/mathinline.h: Honor
+ __LIBC_INTERNAL_MATH_INLINES. Implement __signbitf, __signbit.
+
2003-06-24 Andreas Schwab <schwab@suse.de>
* sysdeps/m68k/fpu/libm-test-ulps: Update.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 3fb6ec2f24..8141485b47 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -58,7 +58,8 @@
!isunordered(__x, __y) && __x != __y; }))
#endif /* ISO C99 */
-#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
+ && defined __OPTIMIZE__
#define __inline_copysign(NAME, TYPE) \
__MATH_INLINE TYPE \
@@ -176,6 +177,19 @@ __MATH_INLINE double fdim (double __x, double __y) __THROW
return __x < __y ? 0.0 : __x - __y;
}
+/* Test for negative number. Used in the signbit() macro. */
+__MATH_INLINE int __signbitf (float __x) __THROW
+{
+ __extension__ union { float __f; int __i; } __u = { __f: __x };
+ return __u.__i < 0;
+}
+
+__MATH_INLINE int __signbit (double __x) __THROW
+{
+ __extension__ union { double __d; long __i; } __u = { __d: __x };
+ return __u.__i < 0;
+}
+
#endif /* C99 */
#endif /* __NO_MATH_INLINES */