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

Go to the source code of this file.

Macros

#define _FP_FRAC_DECL_8(X)   _FP_W_TYPE X##_f[8]
 
#define _FP_FRAC_HIGH_8(X)   (X##_f[7])
 
#define _FP_FRAC_LOW_8(X)   (X##_f[0])
 
#define _FP_FRAC_WORD_8(X, w)   (X##_f[w])
 
#define _FP_FRAC_SLL_8(X, N)
 
#define _FP_FRAC_SRL_8(X, N)
 
#define _FP_FRAC_SRS_8(X, N, size)
 

Macro Definition Documentation

#define _FP_FRAC_DECL_8 (   X)    _FP_W_TYPE X##_f[8]

Definition at line 29 of file op-8.h.

#define _FP_FRAC_HIGH_8 (   X)    (X##_f[7])

Definition at line 30 of file op-8.h.

#define _FP_FRAC_LOW_8 (   X)    (X##_f[0])

Definition at line 31 of file op-8.h.

#define _FP_FRAC_SLL_8 (   X,
  N 
)
Value:
do { \
_FP_I_TYPE _up, _down, _skip, _i; \
_skip = (N) / _FP_W_TYPE_SIZE; \
_up = (N) % _FP_W_TYPE_SIZE; \
_down = _FP_W_TYPE_SIZE - _up; \
if (!_up) \
for (_i = 7; _i >= _skip; --_i) \
X##_f[_i] = X##_f[_i-_skip]; \
else \
{ \
for (_i = 7; _i > _skip; --_i) \
X##_f[_i] = X##_f[_i-_skip] << _up \
| X##_f[_i-_skip-1] >> _down; \
X##_f[_i--] = X##_f[0] << _up; \
} \
for (; _i >= 0; --_i) \
X##_f[_i] = 0; \
} while (0)

Definition at line 34 of file op-8.h.

#define _FP_FRAC_SRL_8 (   X,
  N 
)
Value:
do { \
_FP_I_TYPE _up, _down, _skip, _i; \
_skip = (N) / _FP_W_TYPE_SIZE; \
_down = (N) % _FP_W_TYPE_SIZE; \
_up = _FP_W_TYPE_SIZE - _down; \
if (!_down) \
for (_i = 0; _i <= 7-_skip; ++_i) \
X##_f[_i] = X##_f[_i+_skip]; \
else \
{ \
for (_i = 0; _i < 7-_skip; ++_i) \
X##_f[_i] = X##_f[_i+_skip] >> _down \
| X##_f[_i+_skip+1] << _up; \
X##_f[_i++] = X##_f[7] >> _down; \
} \
for (; _i < 8; ++_i) \
X##_f[_i] = 0; \
} while (0)

Definition at line 54 of file op-8.h.

#define _FP_FRAC_SRS_8 (   X,
  N,
  size 
)
Value:
do { \
_FP_I_TYPE _up, _down, _skip, _i; \
_FP_W_TYPE _s; \
_skip = (N) / _FP_W_TYPE_SIZE; \
_down = (N) % _FP_W_TYPE_SIZE; \
_up = _FP_W_TYPE_SIZE - _down; \
for (_s = _i = 0; _i < _skip; ++_i) \
_s |= X##_f[_i]; \
_s |= X##_f[_i] << _up; \
/* s is now != 0 if we want to set the LSbit */ \
if (!_down) \
for (_i = 0; _i <= 7-_skip; ++_i) \
X##_f[_i] = X##_f[_i+_skip]; \
else \
{ \
for (_i = 0; _i < 7-_skip; ++_i) \
X##_f[_i] = X##_f[_i+_skip] >> _down \
| X##_f[_i+_skip+1] << _up; \
X##_f[_i++] = X##_f[7] >> _down; \
} \
for (; _i < 8; ++_i) \
X##_f[_i] = 0; \
/* don't fix the LSB until the very end when we're sure f[0] is stable */ \
X##_f[0] |= (_s != 0); \
} while (0)

Definition at line 80 of file op-8.h.

#define _FP_FRAC_WORD_8 (   X,
  w 
)    (X##_f[w])

Definition at line 32 of file op-8.h.