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