xref: /third_party/musl/src/math/i386/fmodl.c (revision 570af302)
1570af302Sopenharmony_ci#include <math.h>
2570af302Sopenharmony_ci
3570af302Sopenharmony_cilong double fmodl(long double x, long double y)
4570af302Sopenharmony_ci{
5570af302Sopenharmony_ci	unsigned short fpsr;
6570af302Sopenharmony_ci	do __asm__ ("fprem; fnstsw %%ax" : "+t"(x), "=a"(fpsr) : "u"(y));
7570af302Sopenharmony_ci	while (fpsr & 0x400);
8570af302Sopenharmony_ci	return x;
9570af302Sopenharmony_ci}
10