Documented GVF_SAVE_VAR alongside other flags, and removed a query/doubt
[AROS.git] / arch / aarch64-all / include / aros / fenv.h
blobad1dc305095d8e6e20ec2e9ecedae006111978b6
1 #ifndef AROS_AARCH64_FENV_H
2 #define AROS_AARCH64_FENV_H
3 /*
4 Copyright © 2016, The AROS Development Team. All rights reserved.
5 $Id$
6 */
8 #include <aros/system.h>
9 #include <aros/types/int_t.h>
11 typedef uint32_t fenv_t;
12 typedef uint32_t fexcept_t;
14 /* Exception flags */
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)
23 /* Rounding modes */
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)
30 __BEGIN_DECLS
32 /* Default floating-point environment */
33 extern const fenv_t __fe_dfl_env;
34 #define FE_DFL_ENV (&__fe_dfl_env)
36 #ifndef STDC_NOINLINE
37 static __inline int feclearexcept(int __excepts)
39 return 0;
42 static __inline int fegetexceptflag(fexcept_t *__flagp, int __excepts)
44 *__flagp = 0;
45 return 0;
48 static __inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts)
50 return 0;
53 static __inline int feraiseexcept(int __excepts)
55 return 0;
58 static __inline int fetestexcept(int __excepts)
60 return 0;
63 static __inline int fegetround(void)
65 return -1;
68 static __inline int fesetround(int __round)
70 return -1;
73 static __inline int fegetenv(fenv_t *__envp)
75 return 0;
78 static __inline int feholdexcept(fenv_t *__envp)
80 *__envp = 0;
81 return 0;
84 static __inline int fesetenv(const fenv_t *__envp)
86 return 0;
89 static __inline int feupdateenv(const fenv_t *__envp)
91 return 0;
93 #endif /* !STDC_NOINLINE */
95 #if __BSD_VISIBLE
96 #ifndef STDC_NOINLINE
97 static __inline int feenableexcept(int __mask)
99 return 0;
102 static __inline int fedisableexcept(int __mask)
104 return 0;
107 static __inline int fegetexcept(void)
109 return 0;
111 #endif /* !STDC_NOINLINE */
113 #endif /* __BSD_VISIBLE */
115 __END_DECLS
117 #endif /* AROS_AARCH64_FENV_H */