Back to index

glibc  2.9
e_fmodl.c
Go to the documentation of this file.
00001 /*
00002  * Written by J.T. Conklin <jtc@netbsd.org>.
00003  * Public domain.
00004  *
00005  * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
00006  */
00007 
00008 #include <math_private.h>
00009 
00010 long double
00011 __ieee754_fmodl (long double x, long double y)
00012 {
00013   long double res;
00014 
00015   asm ("1:\tfprem\n"
00016        "fstsw   %%ax\n"
00017        "sahf\n"
00018        "jp      1b\n"
00019        "fstp    %%st(1)"
00020        : "=t" (res) : "0" (x), "u" (y) : "ax", "st(1)");
00021   return res;
00022 }