assembly optimizations for fmod/remainder functions
[musl] / src / math / i386 / fmodl.s
diff --git a/src/math/i386/fmodl.s b/src/math/i386/fmodl.s
new file mode 100644 (file)
index 0000000..7e07e7b
--- /dev/null
@@ -0,0 +1,11 @@
+.global fmodl
+.type fmodl,@function
+fmodl:
+       fldt 16(%esp)
+       fldt 4(%esp)
+1:     fprem
+       fstsw %ax
+       sahf
+       jp 1b
+       fstp %st(1)
+       ret