Add incomplet long double math support to libmingwex.a

This commit is contained in:
Danny Smith
2002-07-29 03:00:10 +00:00
parent 840e611264
commit b8cdc234c6
143 changed files with 5213 additions and 639 deletions

View File

@@ -0,0 +1,22 @@
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
*
* Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
*/
#include <math.h>
long double
fmodl (long double x, long double y)
{
long double res;
asm ("1:\tfprem\n\t"
"fstsw %%ax\n\t"
"sahf\n\t"
"jp 1b\n\t"
"fstp %%st(1)"
: "=t" (res) : "0" (x), "u" (y) : "ax", "st(1)");
return res;
}