3 #if defined __i386__ || defined __x86_64__ 5 #include <fpu_control.h> 6 #define fpControl_GETFPCW _FPU_GETCW 7 #define fpControl_SETFPCW _FPU_SETCW 8 #elif defined __APPLE__ 9 #define fpControl_GETFPCW(cw) __asm__ __volatile__("fnstcw %0" : "=m"(*&cw)) 10 #define fpControl_SETFPCW(cw) __asm__ __volatile__("fldcw %0" : : "m"(*&cw)) 12 #error OS not valid for FP control 14 #ifdef fpControl_HAVE_MXCSR 15 #define fpControl_GETMXCSR(cw) __asm__ __volatile__("stmxcsr %0" : "=m"(*&cw)) 16 #define fpControl_SETMXCSR(cw) __asm__ __volatile__("ldmxcsr %0" : : "m"(*&cw)) 23 fpsw_t result{
static_cast<fpsw_t>(fetestexcept(FE_ALL_EXCEPT))};
31 fpControl_GETFPCW(result);
39 fpControl_SETFPCW(fpcw);
43 #ifdef fpControl_HAVE_MXCSR 44 art::fp_detail::mxcsr_t
45 art::fp_detail::getMXCSR()
48 fpControl_GETMXCSR(result);
52 art::fp_detail::mxcsr_t
53 art::fp_detail::setMXCSR(mxcsr_t
const mxcsr)
55 mxcsr_t result = getMXCSR();
56 fpControl_SETMXCSR(mxcsr);
fpcw_t setFPCW(fpcw_t fpcw)