12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #include <fenv.h>
- #include <unistd.h>
- libm_hidden_proto(fesetenv)
- libm_hidden_proto(feraiseexcept)
- int
- feupdateenv (const fenv_t *envp)
- {
- fexcept_t temp;
-
-
- __asm__ ("fnstsw %0" : "=m" (*&temp));
- #if 0
-
- if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
- __asm__ ("stmxcsr %0" : "=m" (*&xtemp));
- temp = (temp | xtemp) & FE_ALL_EXCEPT;
- #else
- temp &= FE_ALL_EXCEPT;
- #endif
-
- fesetenv (envp);
-
- feraiseexcept ((int) temp);
-
- return 0;
- }
|