File: math_private.h

package info (click to toggle)
glibc 2.24-10
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 223,412 kB
  • sloc: ansic: 991,967; asm: 261,800; sh: 10,385; makefile: 9,710; cpp: 4,169; python: 3,971; perl: 2,254; awk: 1,753; pascal: 1,521; yacc: 291; sed: 80
file content (50 lines) | stat: -rw-r--r-- 1,219 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#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

/* Generic code forces values to memory; we don't need to do that.  */
#define math_opt_barrier(x) \
  ({ __typeof (x) __x = (x); __asm ("" : "+frm" (__x)); __x; })
#define math_force_eval(x) \
  ({ __typeof (x) __x = (x); __asm __volatile__ ("" : : "frm" (__x)); })

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