libc-top-half/musl/src/math/i386/log1p.s
raw| 1 | .global log1p |
| 2 | .type log1p,@function |
| 3 | log1p: |
| 4 | mov 8(%esp),%eax |
| 5 | fldln2 |
| 6 | and $0x7fffffff,%eax |
| 7 | fldl 4(%esp) |
| 8 | cmp $0x3fd28f00,%eax |
| 9 | ja 1f |
| 10 | cmp $0x00100000,%eax |
| 11 | jb 2f |
| 12 | fyl2xp1 |
| 13 | fstpl 4(%esp) |
| 14 | fldl 4(%esp) |
| 15 | ret |
| 16 | 1: fld1 |
| 17 | faddp |
| 18 | fyl2x |
| 19 | fstpl 4(%esp) |
| 20 | fldl 4(%esp) |
| 21 | ret |
| 22 | # subnormal x, return x with underflow |
| 23 | 2: fsts 4(%esp) |
| 24 | fstp %st(1) |
| 25 | ret |