+.global feclearexcept
+.type feclearexcept,@function
+feclearexcept:
+ mov %edi,%ecx
+ not %ecx
+ stmxcsr -8(%rsp)
+ and %ecx,-8(%rsp)
+ ldmxcsr -8(%rsp)
+ test $0x3f,%ecx
+ jnz 2f
+1: fnclex
+ xor %eax,%eax
+ ret
+2: fnstsw %ax
+ and %ecx,%eax
+ jz 1b