diff options
Diffstat (limited to '05/musl-0.6.0/src/math/i386')
24 files changed, 163 insertions, 0 deletions
diff --git a/05/musl-0.6.0/src/math/i386/e_exp.s b/05/musl-0.6.0/src/math/i386/e_exp.s new file mode 100644 index 0000000..d6c54a3 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/e_exp.s @@ -0,0 +1,36 @@ +.global expf +expf: + mov 4(%esp),%eax + flds 4(%esp) + shr $23,%eax + inc %al + jz 1f + jmp 0f + +.global exp +exp: + mov 8(%esp),%eax + fldl 4(%esp) + shl %eax + cmp $0xffe00000,%eax + jae 1f + +0: fldl2e + fmulp + fst %st(1) + frndint + fst %st(2) + fsubrp + f2xm1 + fld1 + faddp + fscale + fstp %st(1) + ret + +1: fsts 4(%esp) + cmpl $0xff800000,4(%esp) + jnz 1f + fstp %st(0) + fldz +1: ret diff --git a/05/musl-0.6.0/src/math/i386/e_expf.s b/05/musl-0.6.0/src/math/i386/e_expf.s new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/e_expf.s @@ -0,0 +1 @@ + diff --git a/05/musl-0.6.0/src/math/i386/e_log.s b/05/musl-0.6.0/src/math/i386/e_log.s new file mode 100644 index 0000000..34b8d38 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/e_log.s @@ -0,0 +1,6 @@ +.global log +log: + fldln2 + fldl 4(%esp) + fyl2x + ret diff --git a/05/musl-0.6.0/src/math/i386/e_log10.s b/05/musl-0.6.0/src/math/i386/e_log10.s new file mode 100644 index 0000000..7f48941 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/e_log10.s @@ -0,0 +1,6 @@ +.global log10 +log10: + fldlg2 + fldl 4(%esp) + fyl2x + ret diff --git a/05/musl-0.6.0/src/math/i386/e_log10f.s b/05/musl-0.6.0/src/math/i386/e_log10f.s new file mode 100644 index 0000000..311486e --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/e_log10f.s @@ -0,0 +1,6 @@ +.global log10f +log10f: + fldlg2 + flds 4(%esp) + fyl2x + ret diff --git a/05/musl-0.6.0/src/math/i386/e_logf.s b/05/musl-0.6.0/src/math/i386/e_logf.s new file mode 100644 index 0000000..b8beec0 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/e_logf.s @@ -0,0 +1,6 @@ +.global logf +logf: + fldln2 + flds 4(%esp) + fyl2x + ret diff --git a/05/musl-0.6.0/src/math/i386/e_remainder.s b/05/musl-0.6.0/src/math/i386/e_remainder.s new file mode 100644 index 0000000..b7ff3ef --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/e_remainder.s @@ -0,0 +1,16 @@ +.global remainderf +remainderf: + flds 8(%esp) + flds 4(%esp) + jmp 1f + +.global remainder +remainder: + fldl 12(%esp) + fldl 4(%esp) +1: fprem1 + fstsw %ax + sahf + jp 1b + fstp %st(1) + ret diff --git a/05/musl-0.6.0/src/math/i386/e_remainderf.s b/05/musl-0.6.0/src/math/i386/e_remainderf.s new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/e_remainderf.s diff --git a/05/musl-0.6.0/src/math/i386/e_sqrt.s b/05/musl-0.6.0/src/math/i386/e_sqrt.s new file mode 100644 index 0000000..11314dc --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/e_sqrt.s @@ -0,0 +1,4 @@ +.global sqrt +sqrt: fldl 4(%esp) + fsqrt + ret diff --git a/05/musl-0.6.0/src/math/i386/e_sqrtf.s b/05/musl-0.6.0/src/math/i386/e_sqrtf.s new file mode 100644 index 0000000..015e24c --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/e_sqrtf.s @@ -0,0 +1,4 @@ +.global sqrtf +sqrtf: flds 4(%esp) + fsqrt + ret diff --git a/05/musl-0.6.0/src/math/i386/s_ceil.s b/05/musl-0.6.0/src/math/i386/s_ceil.s new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_ceil.s diff --git a/05/musl-0.6.0/src/math/i386/s_ceilf.s b/05/musl-0.6.0/src/math/i386/s_ceilf.s new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_ceilf.s diff --git a/05/musl-0.6.0/src/math/i386/s_fabs.s b/05/musl-0.6.0/src/math/i386/s_fabs.s new file mode 100644 index 0000000..10c70f3 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_fabs.s @@ -0,0 +1,5 @@ +.global fabs +fabs: + fldl 4(%esp) + fabs + ret diff --git a/05/musl-0.6.0/src/math/i386/s_fabsf.s b/05/musl-0.6.0/src/math/i386/s_fabsf.s new file mode 100644 index 0000000..4544269 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_fabsf.s @@ -0,0 +1,5 @@ +.global fabsf +fabsf: + flds 4(%esp) + fabs + ret diff --git a/05/musl-0.6.0/src/math/i386/s_floor.s b/05/musl-0.6.0/src/math/i386/s_floor.s new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_floor.s diff --git a/05/musl-0.6.0/src/math/i386/s_floorf.s b/05/musl-0.6.0/src/math/i386/s_floorf.s new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_floorf.s diff --git a/05/musl-0.6.0/src/math/i386/s_ldexp.s b/05/musl-0.6.0/src/math/i386/s_ldexp.s new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_ldexp.s diff --git a/05/musl-0.6.0/src/math/i386/s_ldexpf.s b/05/musl-0.6.0/src/math/i386/s_ldexpf.s new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_ldexpf.s diff --git a/05/musl-0.6.0/src/math/i386/s_rint.s b/05/musl-0.6.0/src/math/i386/s_rint.s new file mode 100644 index 0000000..5ba4ab4 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_rint.s @@ -0,0 +1,5 @@ +.global rint +rint: + fldl 4(%esp) + frndint + ret diff --git a/05/musl-0.6.0/src/math/i386/s_rintf.s b/05/musl-0.6.0/src/math/i386/s_rintf.s new file mode 100644 index 0000000..d7aacd8 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_rintf.s @@ -0,0 +1,5 @@ +.global rintf +rintf: + flds 4(%esp) + frndint + ret diff --git a/05/musl-0.6.0/src/math/i386/s_scalbln.s b/05/musl-0.6.0/src/math/i386/s_scalbln.s new file mode 100644 index 0000000..bd022b4 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_scalbln.s @@ -0,0 +1,11 @@ +.global ldexp +.global scalbn +.global scalbln +ldexp: +scalbn: +scalbln: + fildl 12(%esp) + fldl 4(%esp) + fscale + fstp %st(1) + ret diff --git a/05/musl-0.6.0/src/math/i386/s_scalblnf.s b/05/musl-0.6.0/src/math/i386/s_scalblnf.s new file mode 100644 index 0000000..379ec91 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_scalblnf.s @@ -0,0 +1,11 @@ +.global ldexpf +.global scalbnf +.global scalblnf +ldexpf: +scalbnf: +scalblnf: + fildl 8(%esp) + flds 4(%esp) + fscale + fstp %st(1) + ret diff --git a/05/musl-0.6.0/src/math/i386/s_trunc.s b/05/musl-0.6.0/src/math/i386/s_trunc.s new file mode 100644 index 0000000..0773891 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_trunc.s @@ -0,0 +1,36 @@ +.global ceilf +ceilf: flds 4(%esp) + jmp 1f + +.global ceil +ceil: fldl 4(%esp) +1: mov $0x08fb,%edx + jmp 0f + +.global floorf +floorf: flds 4(%esp) + jmp 1f + +.global floor +floor: fldl 4(%esp) +1: mov $0x04f7,%edx + jmp 0f + +.global truncf +truncf: flds 4(%esp) + jmp 1f + +.global trunc +trunc: fldl 4(%esp) +1: mov $0x0cff,%edx + +0: fstcw 4(%esp) + mov 5(%esp),%ah + or %dh,%ah + and %dl,%ah + xchg %ah,5(%esp) + fldcw 4(%esp) + frndint + mov %ah,5(%esp) + fldcw 4(%esp) + ret diff --git a/05/musl-0.6.0/src/math/i386/s_truncf.s b/05/musl-0.6.0/src/math/i386/s_truncf.s new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/05/musl-0.6.0/src/math/i386/s_truncf.s |