summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-15 01:55:54 -0400
committerRich Felker <dalias@aerifal.cx>2012-03-15 01:55:54 -0400
commit46702f68f98244f7384d6ac1742a452f0d7a2610 (patch)
treea1de64f25ddc30af458711c70f46efd6a3bf6f8f /src/math
parent809556e60a3359f646946879dd94c4760e5b8e84 (diff)
downloadmusl-46702f68f98244f7384d6ac1742a452f0d7a2610.tar.gz
avoid changing NaNs in sqrt (x86 asm) to satisfy c99 f.9 recommendation
Diffstat (limited to 'src/math')
-rw-r--r--src/math/i386/sqrt.s4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/math/i386/sqrt.s b/src/math/i386/sqrt.s
index 8289d094..33157044 100644
--- a/src/math/i386/sqrt.s
+++ b/src/math/i386/sqrt.s
@@ -10,6 +10,10 @@ sqrt: fldl 4(%esp)
and $0x7ff,%ecx
cmp $0x400,%ecx
jnz 1f
+ mov 8(%esp),%ecx
+ or $0xffff8000,%ecx
+ inc %ecx
+ jz 1f
and $0x200,%eax
sub $0x100,%eax
sub %eax,(%esp)