123456789101112131415161718192021222324252627282930313233 |
- #include <fenv.h>
- #include <fpu_control.h>
- int
- fesetexcept (int excepts)
- {
- fpu_fpsr_t fpsr;
- fpu_fpsr_t fpsr_new;
- _FPU_GETFPSR (fpsr);
- fpsr_new = fpsr | (excepts & FE_ALL_EXCEPT);
- if (fpsr != fpsr_new)
- _FPU_SETFPSR (fpsr_new);
- return 0;
- }
|