diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-03-15 12:16:51 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-03-15 12:16:51 -0400 |
commit | 1295848efb9171011e79610a5c3ab7c20859ea36 (patch) | |
tree | be7e9fcda2a8f01b55dfff5f09a286783af5c575 /src/math/i386 | |
parent | 5657cc58e5e135bba85c9a7045e10d8de4b1be0a (diff) | |
download | musl-1295848efb9171011e79610a5c3ab7c20859ea36.tar.gz musl-1295848efb9171011e79610a5c3ab7c20859ea36.tar.bz2 musl-1295848efb9171011e79610a5c3ab7c20859ea36.tar.xz musl-1295848efb9171011e79610a5c3ab7c20859ea36.zip |
simplify nan check in sqrt (x86 asm); result of sqrt is never negative
Diffstat (limited to 'src/math/i386')
-rw-r--r-- | src/math/i386/sqrt.s | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/math/i386/sqrt.s b/src/math/i386/sqrt.s index 33157044..1bd3b05e 100644 --- a/src/math/i386/sqrt.s +++ b/src/math/i386/sqrt.s @@ -10,10 +10,9 @@ sqrt: fldl 4(%esp) and $0x7ff,%ecx cmp $0x400,%ecx jnz 1f - mov 8(%esp),%ecx - or $0xffff8000,%ecx - inc %ecx - jz 1f + mov 8(%esp),%cx + inc %cx + jo 1f and $0x200,%eax sub $0x100,%eax sub %eax,(%esp) |