From 1bf4dad32727ee17e6067caac6600ca0c5ab9f2d Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 19 Mar 2012 05:56:41 -0400 Subject: asm for modf functions --- src/math/i386/modff.s | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/math/i386/modff.s (limited to 'src/math/i386/modff.s') 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 -- cgit v1.2.1