* sysdeps/powerpc/fpu/bits/mathinline.h: Addn __signbitf and
	__signbit inlines.
This commit is contained in:
Ulrich Drepper 2004-04-01 20:31:01 +00:00
parent d980f41a7e
commit 3c55cffa1e
2 changed files with 32 additions and 7 deletions

View File

@ -1,5 +1,8 @@
2004-04-01 Ulrich Drepper <drepper@redhat.com>
* sysdeps/powerpc/fpu/bits/mathinline.h: Addn __signbitf and
__signbit inlines.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Use
__sigprocmask not sigprocmask.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise.

View File

@ -18,6 +18,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#ifndef _MATH_H
# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
#endif
#ifdef __cplusplus
# define __MATH_INLINE __inline
#else
# define __MATH_INLINE extern __inline
#endif /* __cplusplus */
#if defined __GNUC__ && !defined _SOFT_FLOAT
#ifdef __USE_ISOC99
@ -45,16 +55,28 @@
# define isunordered(x, y) (__unordered_cmp (x, y) & 1)
# endif /* __GNUC_PREREQ (2,97) */
/* The gcc, version 2.7 or below, has problems with all this inlining
code. So disable it for this version of the compiler. */
# if __GNUC_PREREQ (2, 8)
/* 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; int __i[2]; } __u = { __d: __x };
return __u.__i[0] < 0;
}
# endif
#endif /* __USE_ISOC99 */
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
#ifdef __cplusplus
# define __MATH_INLINE __inline
#else
# define __MATH_INLINE extern __inline
#endif /* __cplusplus */
#ifdef __USE_ISOC99
# ifndef __powerpc64__
@ -63,7 +85,7 @@ __MATH_INLINE long int
lrint (double __x) __THROW
{
union {
double __d;
double __d;
int __ll[2];
} __u;
__asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x));