about summary refs log tree commit diff
path: root/src/math/i386/expm1.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/i386/expm1.s')
-rw-r--r--src/math/i386/expm1.s13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/math/i386/expm1.s b/src/math/i386/expm1.s
index d6d511ef..bbb5d12e 100644
--- a/src/math/i386/expm1.s
+++ b/src/math/i386/expm1.s
@@ -14,12 +14,23 @@ expm1l:
 .type expm1,@function
 expm1:
 	fldl 4(%esp)
+1:	fxam
+	fnstsw %ax
+	sahf
+	jnp 1f
+	jnc 1f
+	fstps 4(%esp)
+	mov $0xfe,%al
+	and %al,7(%esp)
+	flds 4(%esp)
 1:	fldl2e
 	fmulp
 	fld %st(0)
 	frndint
 	fldz
-	fcompi
+	fcomp
+	fnstsw %ax
+	sahf
 	jnz 1f
 	fstp %st(0)
 	f2xm1