Add default implementation of fenv.h and all methods
The default implementation of the fenv.h methods return -EOPNOTSUP. Some of these have implementations appropriate for soft-float. The intention of the new fenv.h is that it be portable and that architectures provide their own implementation of sys/fenv.h.
This commit is contained in:
committed by
Corinna Vinschen
parent
03f802846f
commit
eae68bfc87
@ -37,11 +37,9 @@ details. */
|
||||
#define FE_SSE_EXCEPT_MASK_SHIFT (7)
|
||||
|
||||
/* These are writable so we can initialise them at startup. */
|
||||
static fenv_t fe_dfl_env;
|
||||
static fenv_t fe_nomask_env;
|
||||
|
||||
/* These pointers provide the outside world with read-only access to them. */
|
||||
const fenv_t *_fe_dfl_env = &fe_dfl_env;
|
||||
const fenv_t *_fe_nomask_env = &fe_nomask_env;
|
||||
|
||||
/* Although Cygwin assumes i686 or above (hence SSE available) these
|
||||
@ -435,6 +433,7 @@ void
|
||||
_feinitialise (void)
|
||||
{
|
||||
unsigned int edx, eax;
|
||||
extern fenv_t __fe_dfl_env;
|
||||
|
||||
/* Check for presence of SSE: invoke CPUID #1, check EDX bit 25. */
|
||||
eax = 1;
|
||||
@ -462,6 +461,6 @@ _feinitialise (void)
|
||||
fedisableexcept (FE_ALL_EXCEPT);
|
||||
|
||||
/* Finally cache state as default environment. */
|
||||
fegetenv (&fe_dfl_env);
|
||||
fegetenv (&__fe_dfl_env);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user