53int __softfloat_float_exception_flags;
54int __softfloat_float_exception_mask;
55int __softfloat_float_rounding_mode;
58__fenv_static
inline int
59feclearexcept(
int excepts)
62 __softfloat_float_exception_flags &= ~excepts;
66__fenv_static
inline int
67fegetexceptflag(fexcept_t *flagp,
int excepts)
70 *flagp = __softfloat_float_exception_flags & excepts;
74__fenv_static
inline int
75fesetexceptflag(
const fexcept_t *flagp,
int excepts)
78 __softfloat_float_exception_flags &= ~excepts;
79 __softfloat_float_exception_flags |= *flagp & excepts;
83__fenv_static
inline int
84feraiseexcept(
int excepts)
91__fenv_static
inline int
92fetestexcept(
int excepts)
95 return (__softfloat_float_exception_flags & excepts);
98__fenv_static
inline int
102 return (__softfloat_float_rounding_mode);
105__fenv_static
inline int
106fesetround(
int rounding_mode)
109 __softfloat_float_rounding_mode = rounding_mode;
113__fenv_static
inline int
114fegetenv(fenv_t *envp)
117 __set_env(*envp, __softfloat_float_exception_flags,
118 __softfloat_float_exception_mask, __softfloat_float_rounding_mode);
122__fenv_static
inline int
123feholdexcept(fenv_t *envp)
128 __softfloat_float_exception_flags = 0;
129 __softfloat_float_exception_mask = 0;
133__fenv_static
inline int
134fesetenv(
const fenv_t *envp)
137 __softfloat_float_exception_flags = __env_flags(*envp);
138 __softfloat_float_exception_mask = __env_mask(*envp);
139 __softfloat_float_rounding_mode = __env_round(*envp);
143__fenv_static
inline int
144feupdateenv(
const fenv_t *envp)
146 int __oflags = __softfloat_float_exception_flags;
149 feraiseexcept(__oflags);
157__fenv_static
inline int
158feenableexcept(
int __mask)
160 int __omask = __softfloat_float_exception_mask;
162 __softfloat_float_exception_mask |= __mask;
166__fenv_static
inline int
167fedisableexcept(
int __mask)
169 int __omask = __softfloat_float_exception_mask;
171 __softfloat_float_exception_mask &= ~__mask;
175__fenv_static
inline int
179 return (__softfloat_float_exception_mask);