1 #ifndef AROS_AARCH64_FENV_H
2 #define AROS_AARCH64_FENV_H
4 Copyright © 2016, The AROS Development Team. All rights reserved.
8 #include <aros/system.h>
9 #include <aros/types/int_t.h>
11 typedef uint32_t fenv_t
;
12 typedef uint32_t fexcept_t
;
15 #define FE_INVALID 0x0001
16 #define FE_DIVBYZERO 0x0002
17 #define FE_OVERFLOW 0x0004
18 #define FE_UNDERFLOW 0x0008
19 #define FE_INEXACT 0x0010
20 #define FE_DENORMAL 0x0080
21 #define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_DENORMAL)
24 #define FE_TONEAREST 0x00000000
25 #define FE_TOWARDZERO 0x00c00000
26 #define FE_UPWARD 0x00400000
27 #define FE_DOWNWARD 0x00800000
28 #define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO)
32 /* Default floating-point environment */
33 extern const fenv_t __fe_dfl_env
;
34 #define FE_DFL_ENV (&__fe_dfl_env)
37 static __inline
int feclearexcept(int __excepts
)
42 static __inline
int fegetexceptflag(fexcept_t
*__flagp
, int __excepts
)
48 static __inline
int fesetexceptflag(const fexcept_t
*__flagp
, int __excepts
)
53 static __inline
int feraiseexcept(int __excepts
)
58 static __inline
int fetestexcept(int __excepts
)
63 static __inline
int fegetround(void)
68 static __inline
int fesetround(int __round
)
73 static __inline
int fegetenv(fenv_t
*__envp
)
78 static __inline
int feholdexcept(fenv_t
*__envp
)
84 static __inline
int fesetenv(const fenv_t
*__envp
)
89 static __inline
int feupdateenv(const fenv_t
*__envp
)
93 #endif /* !STDC_NOINLINE */
97 static __inline
int feenableexcept(int __mask
)
102 static __inline
int fedisableexcept(int __mask
)
107 static __inline
int fegetexcept(void)
111 #endif /* !STDC_NOINLINE */
113 #endif /* __BSD_VISIBLE */
117 #endif /* AROS_AARCH64_FENV_H */