about summary refs log tree commit diff
path: root/sysdeps/i386/fpu/e_expl.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/fpu/e_expl.S')
-rw-r--r--sysdeps/i386/fpu/e_expl.S10
1 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/i386/fpu/e_expl.S b/sysdeps/i386/fpu/e_expl.S
index 5917f574b1..eb4086b3f5 100644
--- a/sysdeps/i386/fpu/e_expl.S
+++ b/sysdeps/i386/fpu/e_expl.S
@@ -112,8 +112,14 @@ ENTRY(IEEE754_EXPL)
 	movzwl	4+8(%esp), %eax
 	andl	$0x7fff, %eax
 	cmpl	$0x400d, %eax
-	jle	3f
-	/* Overflow, underflow or infinity or NaN as argument.  */
+	jg	5f
+	cmpl	$0x3fbc, %eax
+	jge	3f
+	/* Argument's exponent below -67, result rounds to 1.  */
+	fld1
+	faddp
+	jmp	2f
+5:	/* Overflow, underflow or infinity or NaN as argument.  */
 	fstsw	%ax
 	movb	$0x45, %dh
 	andb	%ah, %dh