Merge branch 'master' of git://git.etalabs.net/musl
authornsz <nsz@port70.net>
Mon, 19 Mar 2012 07:01:21 +0000 (08:01 +0100)
committernsz <nsz@port70.net>
Mon, 19 Mar 2012 07:01:21 +0000 (08:01 +0100)
14 files changed:
src/math/i386/exp.s
src/math/i386/expm1.s
src/math/i386/llrint.s [new file with mode: 0644]
src/math/i386/llrintf.s [new file with mode: 0644]
src/math/i386/llrintl.s [new file with mode: 0644]
src/math/i386/log.s [new file with mode: 0644]
src/math/i386/log10.s [new file with mode: 0644]
src/math/i386/log10f.s [new file with mode: 0644]
src/math/i386/log10l.s [new file with mode: 0644]
src/math/i386/logf.s [new file with mode: 0644]
src/math/i386/logl.s [new file with mode: 0644]
src/math/i386/lrint.s [new file with mode: 0644]
src/math/i386/lrintf.s [new file with mode: 0644]
src/math/i386/lrintl.s [new file with mode: 0644]

index 18f6cd6..f4769d5 100644 (file)
@@ -34,6 +34,15 @@ exp:
 .type exp2,@function
 exp2:
        fldl 4(%esp)
+1:     fxam
+       fnstsw %ax
+       sahf
+       jnp 1f
+       jnc 1f
+       fstps 4(%esp)
+       mov $0xfe,%al
+       and %al,7(%esp)
+       flds 4(%esp)
 1:     fld %st(0)
        frndint
        fxch %st(1)
index d6d511e..bbb5d12 100644 (file)
@@ -14,12 +14,23 @@ expm1l:
 .type expm1,@function
 expm1:
        fldl 4(%esp)
+1:     fxam
+       fnstsw %ax
+       sahf
+       jnp 1f
+       jnc 1f
+       fstps 4(%esp)
+       mov $0xfe,%al
+       and %al,7(%esp)
+       flds 4(%esp)
 1:     fldl2e
        fmulp
        fld %st(0)
        frndint
        fldz
-       fcompi
+       fcomp
+       fnstsw %ax
+       sahf
        jnz 1f
        fstp %st(0)
        f2xm1
diff --git a/src/math/i386/llrint.s b/src/math/i386/llrint.s
new file mode 100644 (file)
index 0000000..e961b35
--- /dev/null
@@ -0,0 +1,8 @@
+.global llrint
+.type llrint,@function
+llrint:
+       fldl 4(%esp)
+       fistpl 4(%esp)
+       mov 4(%esp),%eax
+       mov 8(%esp),%edx
+       ret
diff --git a/src/math/i386/llrintf.s b/src/math/i386/llrintf.s
new file mode 100644 (file)
index 0000000..1905cdc
--- /dev/null
@@ -0,0 +1,9 @@
+.global llrintf
+.type llrintf,@function
+llrintf:
+       sub $8,%esp
+       flds 12(%esp)
+       fistpq (%esp)
+       pop %eax
+       pop %edx
+       ret
diff --git a/src/math/i386/llrintl.s b/src/math/i386/llrintl.s
new file mode 100644 (file)
index 0000000..84e6386
--- /dev/null
@@ -0,0 +1,8 @@
+.global llrintl
+.type llrintl,@function
+llrintl:
+       fldt 4(%esp)
+       fistpl 4(%esp)
+       mov 4(%esp),%eax
+       mov 8(%esp),%edx
+       ret
diff --git a/src/math/i386/log.s b/src/math/i386/log.s
new file mode 100644 (file)
index 0000000..fcccf03
--- /dev/null
@@ -0,0 +1,7 @@
+.global log
+.type log,@function
+log:
+       fldln2
+       fldl 4(%esp)
+       fyl2x
+       ret
diff --git a/src/math/i386/log10.s b/src/math/i386/log10.s
new file mode 100644 (file)
index 0000000..28eb5b2
--- /dev/null
@@ -0,0 +1,7 @@
+.global log10
+.type log10,@function
+log10:
+       fldlg2
+       fldl 4(%esp)
+       fyl2x
+       ret
diff --git a/src/math/i386/log10f.s b/src/math/i386/log10f.s
new file mode 100644 (file)
index 0000000..c0c0c67
--- /dev/null
@@ -0,0 +1,7 @@
+.global log10f
+.type log10f,@function
+log10f:
+       fldlg2
+       flds 4(%esp)
+       fyl2x
+       ret
diff --git a/src/math/i386/log10l.s b/src/math/i386/log10l.s
new file mode 100644 (file)
index 0000000..aaa44f2
--- /dev/null
@@ -0,0 +1,7 @@
+.global log10l
+.type log10l,@function
+log10l:
+       fldlg2
+       fldt 4(%esp)
+       fyl2x
+       ret
diff --git a/src/math/i386/logf.s b/src/math/i386/logf.s
new file mode 100644 (file)
index 0000000..da7ff3a
--- /dev/null
@@ -0,0 +1,7 @@
+.global logf
+.type logf,@function
+logf:
+       fldln2
+       flds 4(%esp)
+       fyl2x
+       ret
diff --git a/src/math/i386/logl.s b/src/math/i386/logl.s
new file mode 100644 (file)
index 0000000..d4e3339
--- /dev/null
@@ -0,0 +1,7 @@
+.global logl
+.type logl,@function
+logl:
+       fldln2
+       fldt 4(%esp)
+       fyl2x
+       ret
diff --git a/src/math/i386/lrint.s b/src/math/i386/lrint.s
new file mode 100644 (file)
index 0000000..02b83d9
--- /dev/null
@@ -0,0 +1,7 @@
+.global lrint
+.type lrint,@function
+lrint:
+       fldl 4(%esp)
+       fistpl 4(%esp)
+       mov 4(%esp),%eax
+       ret
diff --git a/src/math/i386/lrintf.s b/src/math/i386/lrintf.s
new file mode 100644 (file)
index 0000000..907aac2
--- /dev/null
@@ -0,0 +1,7 @@
+.global lrintf
+.type lrintf,@function
+lrintf:
+       flds 4(%esp)
+       fistpl 4(%esp)
+       mov 4(%esp),%eax
+       ret
diff --git a/src/math/i386/lrintl.s b/src/math/i386/lrintl.s
new file mode 100644 (file)
index 0000000..3ae05aa
--- /dev/null
@@ -0,0 +1,7 @@
+.global lrintl
+.type lrintl,@function
+lrintl:
+       fldt 4(%esp)
+       fistpl 4(%esp)
+       mov 4(%esp),%eax
+       ret