Back to index

glibc  2.9
Functions
qp_qtos.c File Reference
#include "soft-fp.h"
#include "single.h"
#include "quad.h"

Go to the source code of this file.

Functions

float _Qp_qtos (const long double *a)

Function Documentation

float _Qp_qtos ( const long double *  a)

Definition at line 27 of file qp_qtos.c.

{
  FP_DECL_EX;
  FP_DECL_Q(A);
  FP_DECL_S(R);
  float r;

  FP_INIT_ROUNDMODE;
  FP_UNPACK_SEMIRAW_QP(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
  FP_TRUNC(S,Q,1,4,R,A);
#else
  FP_TRUNC(S,Q,1,2,R,A);
#endif
  FP_PACK_SEMIRAW_S(r, R);

  QP_HANDLE_EXCEPTIONS(__asm (
"      ldd [%1], %%f52\n"
"      ldd [%1+8], %%f54\n"
"      fqtos %%f52, %0\n"
"      " : "=&f" (r) : "r" (a) : QP_CLOBBER));

  return r;
}