glibc/ports/sysdeps/alpha/fpu/math_private.h
Richard Henderson 7514f09e1e alpha: Fix redefinition of __isnanl macro warning
In bdd7898a58 we added self-definitions
of __isnan and friends in order to indicate specialized architecture
support, and avoid redefinitions within various generic math_private.h.

There is no generic math_private.h that concerns ldbl-128, and while
we provide __isnanl in the alpha math_private.h there's no need to
protect the function against redefinition.
2012-12-07 13:08:31 -06:00

45 lines
951 B
C

#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 */