X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fi386%2Fsqrt.s;h=8289d0940f6783d20eb17d9b6350504f46376cfe;hb=804fbf0b8c00fd4e2f37ef0769a610614d06138f;hp=c6e553031de4f751337295a5f0d9e8b5b21065d5;hpb=b69f695acedd4ce2798ef9ea28d834ceccc789bd;p=musl diff --git a/src/math/i386/sqrt.s b/src/math/i386/sqrt.s index c6e55303..8289d094 100644 --- a/src/math/i386/sqrt.s +++ b/src/math/i386/sqrt.s @@ -2,4 +2,20 @@ .type sqrt,@function sqrt: fldl 4(%esp) fsqrt + fstsw %ax + sub $12,%esp + fld %st(0) + fstpt (%esp) + mov (%esp),%ecx + and $0x7ff,%ecx + cmp $0x400,%ecx + jnz 1f + and $0x200,%eax + sub $0x100,%eax + sub %eax,(%esp) + fstp %st(0) + fldt (%esp) +1: add $12,%esp + fstpl 4(%esp) + fldl 4(%esp) ret