Back to index

glibc  2.9
Defines | Functions
qp_qtoux.c File Reference
#include "soft-fp.h"
#include "quad.h"

Go to the source code of this file.

Defines

#define FP_ROUNDMODE   FP_RND_ZERO

Functions

unsigned long _Qp_qtoux (const long double *a)

Define Documentation

#define FP_ROUNDMODE   FP_RND_ZERO

Definition at line 23 of file qp_qtoux.c.


Function Documentation

unsigned long _Qp_qtoux ( const long double *  a)

Definition at line 27 of file qp_qtoux.c.

{
  FP_DECL_EX;
  FP_DECL_Q(A);
  unsigned long r;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_RAW_QP(A, a);
  FP_TO_INT_Q(r, A, 64, -1);
  QP_HANDLE_EXCEPTIONS(
       unsigned long rx;
       __asm (
"      ldd [%1], %%f52\n"
"      ldd [%1+8], %%f54\n"
"      fqtox %%f52, %%f60\n"
"      std %%f60, [%0]\n"
"      " : : "r" (&rx), "r" (a) : QP_CLOBBER);
       r = rx);

  return r;
}