X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fmath%2Fi386%2Fsqrt.s;h=8289d0940f6783d20eb17d9b6350504f46376cfe;hp=c6e553031de4f751337295a5f0d9e8b5b21065d5;hb=809556e60a3359f646946879dd94c4760e5b8e84;hpb=e0a54e6725eaa0b5aeb28e9815c310f70068d308 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