Back to index

glibc  2.9
Defines | Functions
qp_qtoi.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

int _Qp_qtoi (const long double *a)

Define Documentation

#define FP_ROUNDMODE   FP_RND_ZERO

Definition at line 23 of file qp_qtoi.c.


Function Documentation

int _Qp_qtoi ( const long double *  a)

Definition at line 27 of file qp_qtoi.c.

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

  FP_INIT_ROUNDMODE;
  FP_UNPACK_RAW_QP(A, a);
  FP_TO_INT_Q(r, A, 32, 1);
  QP_HANDLE_EXCEPTIONS(
       int rx;
       __asm (
"      ldd [%1], %%f52\n"
"      ldd [%1+8], %%f54\n"
"      fqtoi %%f52, %%f31\n"
"      st %%f31, [%0]\n"
"      " : : "r" (&rx), "r" (a) : QP_CLOBBER, "f31");
       r = rx);

  return r;
}