about summary refs log tree commit diff
path: root/sysdeps/i386/fpu/s_frexpl.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/fpu/s_frexpl.S')
-rw-r--r--sysdeps/i386/fpu/s_frexpl.S9
1 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/i386/fpu/s_frexpl.S b/sysdeps/i386/fpu/s_frexpl.S
index f687ab3c2e..b33a8a8573 100644
--- a/sysdeps/i386/fpu/s_frexpl.S
+++ b/sysdeps/i386/fpu/s_frexpl.S
@@ -50,7 +50,7 @@ ENTRY (__frexpl)
 	jz	1f
 	xorl	%ecx, %ecx
 	cmpl	$0x7fff, %eax
-	je	1f
+	je	3f
 
 	cmpl	$0, %eax
 	jne	2f
@@ -81,5 +81,12 @@ ENTRY (__frexpl)
 	movl	%ecx, (%eax)
 
 	ret
+
+	/* Infinity or NaN; ensure signaling NaNs are quieted.  */
+3:	movl	EXPP(%esp), %eax
+	fldt	VAL0(%esp)
+	fadd	%st
+	movl	%ecx, (%eax)
+	ret
 END (__frexpl)
 weak_alias (__frexpl, frexpl)