Skip to content
Snippets Groups Projects
Commit f6423058 authored by Rolf Bork's avatar Rolf Bork
Browse files

Math code for rt linux boxes.

git-svn-id: https://redoubt.ligo-wa.caltech.edu/svn/advLigoRTS/trunk@281 6dcd42c9-f523-4c6d-aada-af552506706e
parent 8e3ed97f
No related branches found
No related tags found
No related merge requests found
inline void sincos(double __x, double *__sinx, double *__cosx)
{
register long double __cosr;
register long double __sinr;
__asm __volatile__
("fsincos\n\t"
"fnstsw %%ax\n\t"
"testl $0x400, %%eax\n\t"
"jz 1f\n\t"
"fldpi\n\t"
"fadd %%st(0)\n\t"
"fxch %%st(1)\n\t"
"2: fprem1\n\t"
"fnstsw %%ax\n\t"
"testl $0x400, %%eax\n\t"
"jnz 2b\n\t"
"fstp %%st(1)\n\t"
"fsincos\n\t"
"1:"
: "=t" (__cosr), "=u" (__sinr) : "0" (__x));
*__sinx = __sinr;
*__cosx = __cosr;
}
/* Fast Pentium FPU SQRT command */
inline double lsqrt (double __x) { register double __result; __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x)); return __result; }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment