From 6f26cf3dacf9d426bbd18cecb4d486da56c17351 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 18 Mar 2012 21:43:43 -0400 Subject: asm exponential functions for i386 --- src/math/i386/exp.s | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/math/i386/exp.s (limited to 'src/math/i386/exp.s') diff --git a/src/math/i386/exp.s b/src/math/i386/exp.s new file mode 100644 index 00000000..18f6cd67 --- /dev/null +++ b/src/math/i386/exp.s @@ -0,0 +1,46 @@ +.global exp2f +.type exp2f,@function +exp2f: + flds 4(%esp) + jmp 1f + +.global exp2l +.type exp2l,@function +exp2l: + fldt 4(%esp) + jmp 1f + +.global expf +.type expf,@function +expf: + flds 4(%esp) + jmp 2f + +.global expl +.type expl,@function +expl: + fldt 4(%esp) + jmp 2f + +.global exp +.type exp,@function +exp: + fldl 4(%esp) +2: fldl2e + fmulp + jmp 1f + +.global exp2 +.type exp2,@function +exp2: + fldl 4(%esp) +1: fld %st(0) + frndint + fxch %st(1) + fsub %st(1) + f2xm1 + fld1 + faddp + fscale + fstp %st(1) + ret -- cgit v1.2.1