Move all files into ports/ subdirectory in preparation for merge with glibc
[glibc.git] / ports / sysdeps / alpha / fpu / math_private.h
blob4f270f7a3f9038edb60f72e23fcd0ca1f8b172ed
1 #ifndef ALPHA_MATH_PRIVATE_H
2 #define ALPHA_MATH_PRIVATE_H 1
4 /* In bits/mathinline.h we define __isnan et al.
5 In sysdeps/alpha/fpu/s_isnan.c we move the identifier out of the way
6 via macro hackery. In both cases, tell math/math_private.h that
7 we have a local copy of the function. */
9 #ifndef __isnan
10 # define __isnan __isnan
11 #endif
12 #ifndef __isnanf
13 # define __isnanf __isnanf
14 #endif
15 #ifndef __isnanl
16 # define __isnanl __isnanl
17 #endif
19 #include_next <math_private.h>
21 #ifdef __alpha_fix__
22 extern __always_inline double
23 __ieee754_sqrt (double d)
25 double ret;
26 # ifdef _IEEE_FP_INEXACT
27 asm ("sqrtt/suid %1,%0" : "=f"(ret) : "f"(d));
28 # else
29 asm ("sqrtt/sud %1,%0" : "=f"(ret) : "f"(d));
30 # endif
31 return ret;
34 extern __always_inline float
35 __ieee754_sqrtf (float d)
37 float ret;
38 # ifdef _IEEE_FP_INEXACT
39 asm ("sqrts/suid %1,%0" : "=f"(ret) : "f"(d));
40 # else
41 asm ("sqrts/sud %1,%0" : "=f"(ret) : "f"(d));
42 # endif
43 return ret;
45 #endif /* FIX */
47 #endif /* ALPHA_MATH_PRIVATE_H */