diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-03-19 05:56:41 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-03-19 05:56:41 -0400 |
commit | 1bf4dad32727ee17e6067caac6600ca0c5ab9f2d (patch) | |
tree | 039122cbca36ce1b6f7ee17343694df678880d5f | |
parent | 0b70a1e9a9651d21242c5b6da327ecab0f1a38a6 (diff) | |
download | musl-1bf4dad32727ee17e6067caac6600ca0c5ab9f2d.tar.gz musl-1bf4dad32727ee17e6067caac6600ca0c5ab9f2d.tar.xz musl-1bf4dad32727ee17e6067caac6600ca0c5ab9f2d.zip |
asm for modf functions
-rw-r--r-- | src/math/i386/modf.s | 15 | ||||
-rw-r--r-- | src/math/i386/modff.s | 15 | ||||
-rw-r--r-- | src/math/i386/modfl.s | 15 |
3 files changed, 45 insertions, 0 deletions
diff --git a/src/math/i386/modf.s b/src/math/i386/modf.s new file mode 100644 index 00000000..b88e7841 --- /dev/null +++ b/src/math/i386/modf.s @@ -0,0 +1,15 @@ +.global modf +.type modf,@function +modf: + mov 12(%esp),%eax + fldl 4(%esp) + fld1 + fld %st(1) +1: fprem + fstsw %ax + sahf + jp 1b + fstp %st(1) + fsubr %st(1) + fstpl (%eax) + ret diff --git a/src/math/i386/modff.s b/src/math/i386/modff.s new file mode 100644 index 00000000..d29b4b60 --- /dev/null +++ b/src/math/i386/modff.s @@ -0,0 +1,15 @@ +.global modff +.type modff,@function +modff: + mov 8(%esp),%eax + flds 4(%esp) + fld1 + fld %st(1) +1: fprem + fstsw %ax + sahf + jp 1b + fstp %st(1) + fsubr %st(1) + fstps (%eax) + ret diff --git a/src/math/i386/modfl.s b/src/math/i386/modfl.s new file mode 100644 index 00000000..f9380083 --- /dev/null +++ b/src/math/i386/modfl.s @@ -0,0 +1,15 @@ +.global modfl +.type modfl,@function +modfl: + mov 16(%esp),%eax + fldt 4(%esp) + fld1 + fld %st(1) +1: fprem + fstsw %ax + sahf + jp 1b + fstp %st(1) + fsubr %st(1) + fstpt (%eax) + ret |