Back to index

glibc  2.9
Defines
op-common.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _FP_DECL(wc, X)
#define _FP_UNPACK_CANONICAL(fs, wc, X)
#define _FP_UNPACK_SEMIRAW(fs, wc, X)   _FP_FRAC_SLL_##wc(X, _FP_WORKBITS)
#define _FP_OVERFLOW_SEMIRAW(fs, wc, X)
#define _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X)
#define _FP_CHOOSENAN_SEMIRAW(fs, wc, R, X, Y, OP)
#define _FP_EXP_NORMAL(fs, wc, X)   (((X##_e + 1) & _FP_EXPMAX_##fs) > 1)
#define _FP_PACK_SEMIRAW(fs, wc, X)
#define _FP_PACK_CANONICAL(fs, wc, X)
#define _FP_ISSIGNAN(fs, wc, X)
#define _FP_ADD_INTERNAL(fs, wc, R, X, Y, OP)
#define _FP_ADD(fs, wc, R, X, Y)   _FP_ADD_INTERNAL(fs, wc, R, X, Y, '+')
#define _FP_SUB(fs, wc, R, X, Y)
#define _FP_NEG(fs, wc, R, X)
#define _FP_MUL(fs, wc, R, X, Y)
#define _FP_DIV(fs, wc, R, X, Y)
#define _FP_CMP(fs, wc, ret, X, Y, un)
#define _FP_CMP_EQ(fs, wc, ret, X, Y)
#define _FP_CMP_UNORD(fs, wc, ret, X, Y)
#define _FP_SQRT(fs, wc, R, X)
#define _FP_TO_INT(fs, wc, r, X, rsize, rsigned)
#define _FP_FROM_INT(fs, wc, X, r, rsize, rtype)
#define FP_EXTEND(dfs, sfs, dwc, swc, D, S)
#define FP_TRUNC(dfs, sfs, dwc, swc, D, S)
#define __FP_CLZ(r, x)
#define _FP_DIV_HELP_imm(q, r, n, d)
#define _FP_DIV_MEAT_N_loop(fs, wc, R, X, Y)
#define _FP_DIV_MEAT_1_loop(fs, R, X, Y)   _FP_DIV_MEAT_N_loop (fs, 1, R, X, Y)
#define _FP_DIV_MEAT_2_loop(fs, R, X, Y)   _FP_DIV_MEAT_N_loop (fs, 2, R, X, Y)
#define _FP_DIV_MEAT_4_loop(fs, R, X, Y)   _FP_DIV_MEAT_N_loop (fs, 4, R, X, Y)

Define Documentation

#define __FP_CLZ (   r,
  x 
)
Value:
do {                                                                 \
    if (sizeof (_FP_W_TYPE) == sizeof (unsigned int))                       \
      r = __builtin_clz (x);                                                \
    else if (sizeof (_FP_W_TYPE) == sizeof (unsigned long))                 \
      r = __builtin_clzl (x);                                               \
    else if (sizeof (_FP_W_TYPE) == sizeof (unsigned long long))            \
      r = __builtin_clzll (x);                                              \
    else								      \
      abort ();                                                             \
  } while (0)

Definition at line 1287 of file op-common.h.

#define _FP_ADD (   fs,
  wc,
  R,
  X,
  Y 
)    _FP_ADD_INTERNAL(fs, wc, R, X, Y, '+')

Definition at line 709 of file op-common.h.

#define _FP_ADD_INTERNAL (   fs,
  wc,
  R,
  X,
  Y,
  OP 
)

Definition at line 296 of file op-common.h.

#define _FP_CHECK_SIGNAN_SEMIRAW (   fs,
  wc,
  X 
)
Value:
do {                                                    \
  if (X##_e == _FP_EXPMAX_##fs                                 \
      && !_FP_FRAC_ZEROP_##wc(X)                        \
      && !(_FP_FRAC_HIGH_##fs(X) & _FP_QNANBIT_SH_##fs))       \
    FP_SET_EXCEPTION(FP_EX_INVALID);                           \
} while (0)

Definition at line 110 of file op-common.h.

#define _FP_CHOOSENAN_SEMIRAW (   fs,
  wc,
  R,
  X,
  Y,
  OP 
)
Value:
do {                                                           \
  /* _FP_CHOOSENAN expects raw values, so shift as required.  */      \
  _FP_FRAC_SRL_##wc(X, _FP_WORKBITS);                                 \
  _FP_FRAC_SRL_##wc(Y, _FP_WORKBITS);                                 \
  _FP_CHOOSENAN(fs, wc, R, X, Y, OP);                                 \
  _FP_FRAC_SLL_##wc(R, _FP_WORKBITS);                                 \
} while (0)

Definition at line 120 of file op-common.h.

#define _FP_CMP (   fs,
  wc,
  ret,
  X,
  Y,
  un 
)

Definition at line 862 of file op-common.h.

#define _FP_CMP_EQ (   fs,
  wc,
  ret,
  X,
  Y 
)
Value:
do {                                                               \
    /* NANs are unordered */                                              \
    if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X))             \
       || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y)))          \
      {                                                                   \
       ret = 1;                                                    \
      }                                                                   \
    else                                                           \
      {                                                                   \
       ret = !(X##_e == Y##_e                                             \
              && _FP_FRAC_EQ_##wc(X, Y)                            \
              && (X##_s == Y##_s || (!X##_e && _FP_FRAC_ZEROP_##wc(X)))); \
      }                                                                   \
  } while (0)

Definition at line 902 of file op-common.h.

#define _FP_CMP_UNORD (   fs,
  wc,
  ret,
  X,
  Y 
)
Value:
do {                                                           \
    ret = ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X))      \
          || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y)));  \
  } while (0)

Definition at line 920 of file op-common.h.

#define _FP_DECL (   wc,
  X 
)
Value:
_FP_I_TYPE X##_c __attribute__((unused)), X##_s, X##_e; \
  _FP_FRAC_DECL_##wc(X)

Definition at line 33 of file op-common.h.

#define _FP_DIV (   fs,
  wc,
  R,
  X,
  Y 
)

Definition at line 798 of file op-common.h.

#define _FP_DIV_HELP_imm (   q,
  r,
  n,
  d 
)
Value:
do {                                      \
    q = n / d, r = n % d;                 \
  } while (0)

Definition at line 1300 of file op-common.h.

#define _FP_DIV_MEAT_1_loop (   fs,
  R,
  X,
  Y 
)    _FP_DIV_MEAT_N_loop (fs, 1, R, X, Y)

Definition at line 1343 of file op-common.h.

#define _FP_DIV_MEAT_2_loop (   fs,
  R,
  X,
  Y 
)    _FP_DIV_MEAT_N_loop (fs, 2, R, X, Y)

Definition at line 1344 of file op-common.h.

#define _FP_DIV_MEAT_4_loop (   fs,
  R,
  X,
  Y 
)    _FP_DIV_MEAT_N_loop (fs, 4, R, X, Y)

Definition at line 1345 of file op-common.h.

#define _FP_DIV_MEAT_N_loop (   fs,
  wc,
  R,
  X,
  Y 
)

Definition at line 1308 of file op-common.h.

#define _FP_EXP_NORMAL (   fs,
  wc,
  X 
)    (((X##_e + 1) & _FP_EXPMAX_##fs) > 1)

Definition at line 130 of file op-common.h.

#define _FP_FROM_INT (   fs,
  wc,
  X,
  r,
  rsize,
  rtype 
)

Definition at line 1069 of file op-common.h.

#define _FP_ISSIGNAN (   fs,
  wc,
  X 
)
Value:
({                                                      \
  int __ret = 0;                                        \
  if (X##_e == _FP_EXPMAX_##fs)                                \
    {                                                   \
      if (!_FP_FRAC_ZEROP_##wc(X)                       \
         && !(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs))   \
       __ret = 1;                                       \
    }                                                   \
  __ret;                                                \
})

Definition at line 279 of file op-common.h.

#define _FP_MUL (   fs,
  wc,
  R,
  X,
  Y 
)

Definition at line 735 of file op-common.h.

#define _FP_NEG (   fs,
  wc,
  R,
  X 
)
Value:
do {                               \
    _FP_FRAC_COPY_##wc(R, X);             \
    R##_c = X##_c;                 \
    R##_e = X##_e;                 \
    R##_s = 1 ^ X##_s;                    \
  } while (0)

Definition at line 722 of file op-common.h.

#define _FP_OVERFLOW_SEMIRAW (   fs,
  wc,
  X 
)
Value:
do {                                             \
  if (FP_ROUNDMODE == FP_RND_NEAREST                    \
      || (FP_ROUNDMODE == FP_RND_PINF && !X##_s) \
      || (FP_ROUNDMODE == FP_RND_MINF && X##_s)) \
    {                                            \
      X##_e = _FP_EXPMAX_##fs;                          \
      _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc);          \
    }                                            \
  else                                           \
    {                                            \
      X##_e = _FP_EXPMAX_##fs - 1;               \
      _FP_FRAC_SET_##wc(X, _FP_MAXFRAC_##wc);           \
    }                                            \
    FP_SET_EXCEPTION(FP_EX_INEXACT);                    \
    FP_SET_EXCEPTION(FP_EX_OVERFLOW);                   \
} while (0)

Definition at line 90 of file op-common.h.

#define _FP_PACK_CANONICAL (   fs,
  wc,
  X 
)

Definition at line 171 of file op-common.h.

#define _FP_PACK_SEMIRAW (   fs,
  wc,
  X 
)
Value:
do {                                                    \
  _FP_ROUND(wc, X);                                     \
  if (_FP_FRAC_HIGH_##fs(X)                             \
      & (_FP_OVERFLOW_##fs >> 1))                       \
    {                                                   \
      _FP_FRAC_HIGH_##fs(X) &= ~(_FP_OVERFLOW_##fs >> 1);      \
      X##_e++;                                                 \
      if (X##_e == _FP_EXPMAX_##fs)                            \
       _FP_OVERFLOW_SEMIRAW(fs, wc, X);                 \
    }                                                   \
  _FP_FRAC_SRL_##wc(X, _FP_WORKBITS);                          \
  if (!_FP_EXP_NORMAL(fs, wc, X) && !_FP_FRAC_ZEROP_##wc(X))   \
    {                                                   \
      if (X##_e == 0)                                          \
       FP_SET_EXCEPTION(FP_EX_UNDERFLOW);               \
      else                                              \
       {                                                \
         if (!_FP_KEEPNANFRACP)                         \
           {                                            \
             _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs);           \
             X##_s = _FP_NANSIGN_##fs;                         \
           }                                            \
         else                                           \
           _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs;      \
       }                                                \
    }                                                   \
} while (0)

Definition at line 135 of file op-common.h.

#define _FP_SQRT (   fs,
  wc,
  R,
  X 
)

Definition at line 930 of file op-common.h.

#define _FP_SUB (   fs,
  wc,
  R,
  X,
  Y 
)
Value:
do {                                                               \
    if (!(Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) Y##_s ^= 1; \
    _FP_ADD_INTERNAL(fs, wc, R, X, Y, '-');                               \
  } while (0)

Definition at line 710 of file op-common.h.

#define _FP_TO_INT (   fs,
  wc,
  r,
  X,
  rsize,
  rsigned 
)

Definition at line 995 of file op-common.h.

#define _FP_UNPACK_CANONICAL (   fs,
  wc,
  X 
)

Definition at line 42 of file op-common.h.

#define _FP_UNPACK_SEMIRAW (   fs,
  wc,
  X 
)    _FP_FRAC_SLL_##wc(X, _FP_WORKBITS)

Definition at line 86 of file op-common.h.

#define FP_EXTEND (   dfs,
  sfs,
  dwc,
  swc,
  D,
  S 
)

Definition at line 1140 of file op-common.h.

#define FP_TRUNC (   dfs,
  sfs,
  dwc,
  swc,
  D,
  S 
)

Definition at line 1197 of file op-common.h.