33#include "../inc/cdefs-compat.h"
36#define __fenv_static static
43#ifdef __mips_soft_float
44#define _FPUSW_SHIFT 16
45#define FE_INVALID 0x0001
46#define FE_DIVBYZERO 0x0002
47#define FE_OVERFLOW 0x0004
48#define FE_UNDERFLOW 0x0008
49#define FE_INEXACT 0x0010
51#define _FCSR_CAUSE_SHIFT 10
52#define FE_INVALID 0x0040
53#define FE_DIVBYZERO 0x0020
54#define FE_OVERFLOW 0x0010
55#define FE_UNDERFLOW 0x0008
56#define FE_INEXACT 0x0004
58#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \
59 FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
62#define FE_TONEAREST 0x0000
63#define FE_TOWARDZERO 0x0001
64#define FE_UPWARD 0x0002
65#define FE_DOWNWARD 0x0003
66#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \
67 FE_UPWARD | FE_TOWARDZERO)
72#define FE_DFL_ENV (&__fe_dfl_env)
75#define _ENABLE_SHIFT 5
76#define _ENABLE_MASK (FE_ALL_EXCEPT << _ENABLE_SHIFT)
78#ifndef __mips_soft_float
79#define __cfc1(__fcsr) __asm __volatile("cfc1 %0, $31" : "=r" (__fcsr))
80#define __ctc1(__fcsr) __asm __volatile("ctc1 %0, $31" :: "r" (__fcsr))
83#ifdef __mips_soft_float
116 *__flagp = fcsr & __excepts;
129 fcsr |= *__flagp & __excepts;
156 return (fcsr & __excepts);
178 fcsr &= ~_ROUND_MASK;
233#ifdef __mips_soft_float
234int feenableexcept(
int __mask);
235int fedisableexcept(
int __mask);
236int fegetexcept(
void);
239feenableexcept(
int __mask)
241 fenv_t __old_fcsr, __new_fcsr;
251fedisableexcept(
int __mask)
253 fenv_t __old_fcsr, __new_fcsr;
__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)
#define _FCSR_CAUSE_SHIFT
__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