33#include "../inc/cdefs-compat.h"
34#include "../inc/types-compat.h"
37#define __fenv_static static
53#define FE_INVALID 0x01
54#define FE_DENORMAL 0x02
55#define FE_DIVBYZERO 0x04
56#define FE_OVERFLOW 0x08
57#define FE_UNDERFLOW 0x10
58#define FE_INEXACT 0x20
59#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_DENORMAL | FE_INEXACT | \
60 FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
63#define FE_TONEAREST 0x0000
64#define FE_DOWNWARD 0x0400
65#define FE_UPWARD 0x0800
66#define FE_TOWARDZERO 0x0c00
67#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \
68 FE_UPWARD | FE_TOWARDZERO)
75#define _SSE_ROUND_SHIFT 3
76#define _SSE_EMASK_SHIFT 7
82#define FE_DFL_ENV (&__fe_dfl_env)
84#define __fldcw(__cw) __asm __volatile("fldcw %0" : : "m" (__cw))
85#define __fldenv(__env) __asm __volatile("fldenv %0" : : "m" (__env))
86#define __fldenvx(__env) __asm __volatile("fldenv %0" : : "m" (__env) \
87 : "st", "st(1)", "st(2)", "st(3)", "st(4)", \
88 "st(5)", "st(6)", "st(7)")
89#define __fnclex() __asm __volatile("fnclex")
90#define __fnstenv(__env) __asm __volatile("fnstenv %0" : "=m" (*(__env)))
91#define __fnstcw(__cw) __asm __volatile("fnstcw %0" : "=m" (*(__cw)))
92#define __fnstsw(__sw) __asm __volatile("fnstsw %0" : "=am" (*(__sw)))
93#define __fwait() __asm __volatile("fwait")
94#define __ldmxcsr(__csr) __asm __volatile("ldmxcsr %0" : : "m" (__csr))
95#define __stmxcsr(__csr) __asm __volatile("stmxcsr %0" : "=m" (*(__csr)))
123 *__flagp = (__mxcsr | __status) & __excepts;
138 return ((__status | __mxcsr) & __excepts);
166 __control &= ~_ROUND_MASK;
167 __control |= __round;
union savefpu __attribute__
__fenv_static int fesetround(int __round)
OLM_DLLEXPORT int feraiseexcept(int __excepts)
OLM_DLLEXPORT int feupdateenv(const fenv_t *__envp)
OLM_DLLEXPORT int feholdexcept(fenv_t *__envp)
__fenv_static int fegetexceptflag(fexcept_t *__flagp, int __excepts)
__BEGIN_DECLS const fenv_t __fe_dfl_env
__fenv_static int fegetround(void)
__fenv_static int fesetenv(const fenv_t *__envp)
OLM_DLLEXPORT int fegetenv(fenv_t *__envp)
OLM_DLLEXPORT int fesetexceptflag(const fexcept_t *__flagp, int __excepts)
__fenv_static int fetestexcept(int __excepts)
__fenv_static int feclearexcept(int __excepts)
unsigned __int16 uint16_t
unsigned __int32 uint32_t