2 Copyright © 2011, The AROS Development Team. All rights reserved.
5 Desc: ARM floating-point environment for software floating point processing
12 #include <aros/system.h>
14 typedef unsigned int fenv_t
;
15 typedef unsigned int fexcept_t
;
18 #define FE_INVALID 0x0001
19 #define FE_DIVBYZERO 0x0002
20 #define FE_OVERFLOW 0x0004
21 #define FE_UNDERFLOW 0x0008
22 #define FE_INEXACT 0x0010
23 #define FE_DENORMAL 0x0080
24 #define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_DENORMAL)
27 #define FE_TONEAREST 0x00000000
28 #define FE_TOWARDZERO 0x00c00000
29 #define FE_UPWARD 0x00400000
30 #define FE_DOWNWARD 0x00800000
31 #define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO)
35 /* Default floating-point environment */
36 extern const fenv_t __fe_dfl_env
;
39 /* FIXME: Should we actually do anything here or not ? */
41 static __inline
int feclearexcept(int __excepts
)
46 static __inline
int fegetexceptflag(fexcept_t
*__flagp
, int __excepts
)
52 static __inline
int fesetexceptflag(const fexcept_t
*__flagp
, int __excepts
)
57 static __inline
int feraiseexcept(int __excepts
)
62 static __inline
int fetestexcept(int __excepts
)
67 static __inline
int fegetround(void)
72 static __inline
int fesetround(int __round
)
77 static __inline
int fegetenv(fenv_t
*__envp
)
82 static __inline
int feholdexcept(fenv_t
*__envp
)
88 static __inline
int fesetenv(const fenv_t
*__envp
)
93 static __inline
int feupdateenv(const fenv_t
*__envp
)
97 #endif /* !STDC_NOINLINE */
100 #ifndef STDC_NOINLINE
101 static __inline
int feenableexcept(int __mask
)
106 static __inline
int fedisableexcept(int __mask
)
111 static __inline
int fegetexcept(void)
115 #endif /* !STDC_NOINLINE */
117 #endif /* __BSD_VISIBLE */
121 #endif /* !_FENV_VFP_H_ */