about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-06-07 22:54:58 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-06-07 22:54:58 +0000
commitc23805a95d9bc095118299b5965f7f8388e57fc4 (patch)
tree07c18e319ccd3723c1dab867e1289d31e84a6b12 /sysdeps/i386
parent91655fc307fec2d5a8d60446b4de11cc986b47fa (diff)
downloadglibc-c23805a95d9bc095118299b5965f7f8388e57fc4.tar.gz
glibc-c23805a95d9bc095118299b5965f7f8388e57fc4.tar.xz
glibc-c23805a95d9bc095118299b5965f7f8388e57fc4.zip
Fix i386 asinhl (sNaN) (bug 20218).
The i386 version of asinhl returns sNaN (without raising any
exceptions) for sNaN input.  This patch fixes it to add non-finite
arguments to themselves, so that "invalid" is raised and qNaN
returned.

Tested for x86_64 and x86.

	[BZ #20218]
	* sysdeps/i386/fpu/s_asinhl.S (__asinhl): Add non-finite argument
	to itself.
	* math/libm-test.inc (asinh_test_data): Add sNaN tests.
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/fpu/s_asinhl.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/i386/fpu/s_asinhl.S b/sysdeps/i386/fpu/s_asinhl.S
index c9d5714bee..e055386071 100644
--- a/sysdeps/i386/fpu/s_asinhl.S
+++ b/sysdeps/i386/fpu/s_asinhl.S
@@ -88,6 +88,7 @@ ENTRY(__asinhl)
 4:	ret
 
 7:	fldt	4(%esp)
+	fadd	%st
 	ret
 
 6:	faddl	MO(one)