about summary refs log tree commit diff
path: root/sysdeps/i386/fpu/e_atanhf.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/fpu/e_atanhf.S')
-rw-r--r--sysdeps/i386/fpu/e_atanhf.S22
1 files changed, 4 insertions, 18 deletions
diff --git a/sysdeps/i386/fpu/e_atanhf.S b/sysdeps/i386/fpu/e_atanhf.S
index 1c8969e5ec..6e4184908e 100644
--- a/sysdeps/i386/fpu/e_atanhf.S
+++ b/sysdeps/i386/fpu/e_atanhf.S
@@ -18,6 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <machine/asm.h>
+#include <i386-math-asm.h>
 
 	.section .rodata
 
@@ -36,12 +37,7 @@ limit:	.double 0.29
 ln2_2:	.tfloat 0.3465735902799726547086160
 	ASM_SIZE_DIRECTIVE(ln2_2)
 
-	.section .rodata.cst4,"aM",@progbits,4
-
-	.p2align 2
-	.type flt_min,@object
-flt_min:	.byte 0, 0, 0x80, 0
-	ASM_SIZE_DIRECTIVE(flt_min)
+DEFINE_FLT_MIN
 
 #ifdef PIC
 #define MO(op) op##@GOTOFF(%edx)
@@ -84,18 +80,8 @@ ENTRY(__ieee754_atanhf)
 	sahf
 	jae	4f
 	fyl2xp1			// 0.5*ln2*ld(1+2*|x|+(2*|x|^2)/(1-|x|))
-	fcoms	MO(flt_min)
-	fnstsw
-	sahf
-	jae	6f
-	subl	$4, %esp
-	cfi_adjust_cfa_offset (4)
-	fld	%st(0)
-	fmul	%st(0)
-	fstps	(%esp)
-	addl	$4, %esp
-	cfi_adjust_cfa_offset (-4)
-6:	jecxz	3f
+	FLT_CHECK_FORCE_UFLOW_NONNEG
+	jecxz	3f
 	fchs			// 0.5*ln2*ld(1+2*x+(2*x^2)/(1-x))
 3:	ret