123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #include <fenv.h>
- #include <fpu_control.h>
- int
- fesetround (int round)
- {
- #ifdef __NDS32_ABI_2FP_PLUS__
- fpu_control_t temp;
- if ((round & ~0x3) != 0)
-
- return 1;
- _FPU_GETCW (temp);
- temp = (temp & ~0x3) | round;
- _FPU_SETCW (temp);
- return 0;
- #else
- return (round != FE_TONEAREST);
- #endif
- }
|