34#include "../inc/cdefs-compat.h"
37#define __fenv_static static
44#define FE_INVALID 0x0001
45#define FE_DIVBYZERO 0x0002
46#define FE_OVERFLOW 0x0004
47#define FE_UNDERFLOW 0x0008
48#define FE_INEXACT 0x0010
49#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \
50 FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
53#define FE_TONEAREST 0x0000
54#define FE_TOWARDZERO 0x0001
55#define FE_UPWARD 0x0002
56#define FE_DOWNWARD 0x0003
57#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \
58 FE_UPWARD | FE_TOWARDZERO)
63#define FE_DFL_ENV (&__fe_dfl_env)
66#define _FPUSW_SHIFT 16
67#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT)
69#if defined(__aarch64__)
70#define __rfs(__fpsr) __asm __volatile("mrs %0,fpsr" : "=r" (*(__fpsr)))
71#define __wfs(__fpsr) __asm __volatile("msr fpsr,%0" : : "r" (__fpsr))
74#elif defined(__ARM_FP) && (__ARM_FP & 0x0C) != 0
75#define __rfs(__fpsr) __asm __volatile("vmrs %0,fpscr" : "=&r" (*(__fpsr)))
76#define __wfs(__fpsr) __asm __volatile("vmsr fpscr,%0" : : "r" (__fpsr))
78#define __rfs(__fpsr) (*(__fpsr) = 0)
99 *__flagp = __fpsr & __excepts;
109 __fpsr &= ~__excepts;
110 __fpsr |= *__flagp & __excepts;
130 return (__fpsr & __excepts);
196feenableexcept(
int __mask)
198 fenv_t __old_fpsr, __new_fpsr;
207fedisableexcept(
int __mask)
209 fenv_t __old_fpsr, __new_fpsr;
__fenv_static int feraiseexcept(int __excepts)
__fenv_static int fesetround(int __round)
__fenv_static int feholdexcept(fenv_t *__envp)
__fenv_static int fetestexcept(int __excepts)
__fenv_static int fegetexceptflag(fexcept_t *__flagp, int __excepts)
__fenv_static int feupdateenv(const fenv_t *__envp)
__BEGIN_DECLS const fenv_t __fe_dfl_env
__fenv_static int fegetround(void)
__fenv_static int fesetenv(const fenv_t *__envp)
__fenv_static int fegetenv(fenv_t *__envp)
__fenv_static int fesetexceptflag(const fexcept_t *__flagp, int __excepts)
__fenv_static int feclearexcept(int __excepts)
unsigned __int32 uint32_t