Changeset View
Changeset View
Standalone View
Standalone View
head/lib/msun/powerpc/fenv.h
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
__fenv_static inline int | __fenv_static inline int | ||||
fesetexceptflag(const fexcept_t *__flagp, int __excepts) | fesetexceptflag(const fexcept_t *__flagp, int __excepts) | ||||
{ | { | ||||
union __fpscr __r; | union __fpscr __r; | ||||
if (__excepts & FE_INVALID) | if (__excepts & FE_INVALID) | ||||
__excepts |= FE_ALL_EXCEPT; | __excepts |= FE_ALL_INVALID; | ||||
__mffs(&__r); | __mffs(&__r); | ||||
__r.__bits.__reg &= ~__excepts; | __r.__bits.__reg &= ~__excepts; | ||||
__r.__bits.__reg |= *__flagp & __excepts; | __r.__bits.__reg |= *__flagp & __excepts; | ||||
__mtfsf(__r); | __mtfsf(__r); | ||||
return (0); | return (0); | ||||
} | } | ||||
__fenv_static inline int | __fenv_static inline int | ||||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |