3 static inline unsigned get_fpc(void)
6 __asm__ __volatile__("efpc %0" : "=r"(fpc));
10 static inline void set_fpc(unsigned fpc)
12 __asm__ __volatile__("sfpc %0" :: "r"(fpc));
15 int feclearexcept(int mask)
17 mask &= FE_ALL_EXCEPT;
18 set_fpc(get_fpc() & ~mask);
22 int feraiseexcept(int mask)
24 mask &= FE_ALL_EXCEPT;
25 set_fpc(get_fpc() | mask);
29 int fetestexcept(int mask)
31 return get_fpc() & mask & FE_ALL_EXCEPT;
39 int __fesetround(int r)
41 set_fpc(get_fpc() & ~3L | r);
45 int fegetenv(fenv_t *envp)
51 int fesetenv(const fenv_t *envp)
53 set_fpc(envp != FE_DFL_ENV ? *envp : 0);