Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
op-common.h File Reference

Go to the source code of this file.

Macros

#define _FP_DECL(wc, X)
 
#define _FP_UNPACK_CANONICAL(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_SQRT(fs, wc, R, X)
 
#define _FP_TO_INT(fs, wc, r, X, rsize, rsigned)
 
#define _FP_TO_INT_ROUND(fs, wc, r, X, rsize, rsigned)
 
#define _FP_FROM_INT(fs, wc, X, r, rsize, rtype)
 
#define FP_CONV(dfs, sfs, dwc, swc, D, S)
 
#define __FP_CLZ(r, x)
 
#define _FP_DIV_HELP_imm(q, r, n, d)
 

Macro Definition Documentation

#define __FP_CLZ (   r,
  x 
)
Value:
do { \
_FP_W_TYPE _t = (x); \
r = _FP_W_TYPE_SIZE - 1; \
if (_t > 0xffff) r -= 16; \
if (_t > 0xffff) _t >>= 16; \
if (_t > 0xff) r -= 8; \
if (_t > 0xff) _t >>= 8; \
if (_t & 0xf0) r -= 4; \
if (_t & 0xf0) _t >>= 4; \
if (_t & 0xc) r -= 2; \
if (_t & 0xc) _t >>= 2; \
if (_t & 0x2) r -= 1; \
} while (0)

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

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

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

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

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

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

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

#define _FP_CMP_EQ (   fs,
  wc,
  ret,
  X,
 
)
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 566 of file op-common.h.

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

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

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

Definition at line 456 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 866 of file op-common.h.

#define _FP_FROM_INT (   fs,
  wc,
  X,
  r,
  rsize,
  rtype 
)
Value:
do { \
if (r) \
{ \
unsigned rtype ur_; \
X##_c = FP_CLS_NORMAL; \
if ((X##_s = (r < 0))) \
ur_ = (unsigned rtype) -r; \
else \
ur_ = (unsigned rtype) r; \
if (rsize <= _FP_W_TYPE_SIZE) \
__FP_CLZ(X##_e, ur_); \
(_FP_W_TYPE)ur_); \
if (rsize < _FP_W_TYPE_SIZE) \
X##_e -= (_FP_W_TYPE_SIZE - rsize); \
X##_e = rsize - X##_e - 1; \
if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs <= X##_e) \
__FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\
_FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \
if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \
_FP_FRAC_SLL_##wc(X, (_FP_WFRACBITS_##fs - X##_e - 1)); \
} \
else \
{ \
X##_c = FP_CLS_ZERO, X##_s = 0; \
} \
} while (0)

Definition at line 782 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 209 of file op-common.h.

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

Definition at line 393 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 380 of file op-common.h.

#define _FP_PACK_CANONICAL (   fs,
  wc,
  X 
)

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

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

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

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

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

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

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

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

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

#define _FP_UNPACK_CANONICAL (   fs,
  wc,
  X 
)

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

#define FP_CONV (   dfs,
  sfs,
  dwc,
  swc,
  D,
  S 
)
Value:
do { \
_FP_FRAC_CONV_##dwc##_##swc(dfs, sfs, D, S); \
D##_e = S##_e; \
D##_c = S##_c; \
D##_s = S##_s; \
} while (0)

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