Back to index

glibc  2.9
Functions
qp_dtoq.c File Reference
#include "soft-fp.h"
#include "double.h"
#include "quad.h"

Go to the source code of this file.

Functions

void _Qp_dtoq (long double *c, const double a)

Function Documentation

void _Qp_dtoq ( long double *  c,
const double  a 
)

Definition at line 27 of file qp_dtoq.c.

{
  FP_DECL_EX;
  FP_DECL_D(A);
  FP_DECL_Q(C);

  FP_INIT_ROUNDMODE;
  FP_UNPACK_RAW_D(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
  FP_EXTEND(Q,D,4,2,C,A);
#else
  FP_EXTEND(Q,D,2,1,C,A);
#endif
  FP_PACK_RAW_QP(c, C);
  QP_HANDLE_EXCEPTIONS(__asm (
"      fdtoq %1, %%f60\n"
"      std %%f60, [%0]\n"
"      std %%f62, [%0+8]\n"
"      " : : "r" (c), "e" (a) : QP_CLOBBER));
}