about summary refs log tree commit diff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/fpu/e_scalbl.S13
1 files changed, 3 insertions, 10 deletions
diff --git a/sysdeps/x86_64/fpu/e_scalbl.S b/sysdeps/x86_64/fpu/e_scalbl.S
index 331bee580c..2982dc3b9e 100644
--- a/sysdeps/x86_64/fpu/e_scalbl.S
+++ b/sysdeps/x86_64/fpu/e_scalbl.S
@@ -44,7 +44,7 @@ ENTRY(__ieee754_scalbl)
 	fnstsw
 	andl	$0x4500, %eax
 	cmpl	$0x0100, %eax
-	je	3f
+	je	2f
 	fld	%st(1)
 	frndint
 	fcomip	%st(2), %st
@@ -75,15 +75,8 @@ ENTRY(__ieee754_scalbl)
 #endif
 	ret
 
-	/* The result is NaN, but we must not raise an exception.
-	   So use a variable.  */
-2:	fstp	%st
-	fstp	%st
-	fldl	MO(nan)
-	ret
-
-	/* The first parameter is a NaN.  Return it.  */
-3:	fstp	%st(1)
+	/* The result is NaN; raise an exception for sNaN arguments.  */
+2:	faddp
 	ret
 
 	/* Return NaN and raise the invalid exception.  */