From: Rich Felker Date: Thu, 15 Mar 2012 05:55:54 +0000 (-0400) Subject: avoid changing NaNs in sqrt (x86 asm) to satisfy c99 f.9 recommendation X-Git-Tag: v0.8.7~19 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=46702f68f98244f7384d6ac1742a452f0d7a2610;p=oweals%2Fmusl.git avoid changing NaNs in sqrt (x86 asm) to satisfy c99 f.9 recommendation --- 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)