| 1 |
/** |
| 2 |
* This file has no copyright assigned and is placed in the Public Domain. |
| 3 |
* This file is part of the mingw-w64 runtime package. |
| 4 |
* No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| 5 |
*/ |
| 6 |
double fmod (double x, double y); |
| 7 |
|
| 8 |
double |
| 9 |
fmod (double x, double y) |
| 10 |
{ |
| 11 |
double res = 0.0; |
| 12 |
|
| 13 |
asm volatile ( |
| 14 |
"1:\tfprem\n\t" |
| 15 |
"fstsw %%ax\n\t" |
| 16 |
"sahf\n\t" |
| 17 |
"jp 1b\n\t" |
| 18 |
"fstp %%st(1)" |
| 19 |
: "=t" (res) : "0" (x), "u" (y) : "ax", "st(1)"); |
| 20 |
return res; |
| 21 |
} |