Lines Matching refs:val
53 * extracts a single bit at position pos from a given value, val, for an
56 #define EXTRACTBIT_CMN(val, pos) ((val >> pos) & 1)
58 #define EXTRACTBIT(val, pos, len) (EXTRACTBIT_CMN(val, pos))
60 #define EXTRACTBIT(val, pos, len) \
61 (EXTRACTBIT_CMN(val, (COMPUTE_BIT_POS(len, pos))))
64 /* sets the bit at position pos of num to 1 if val == 1 */
65 #define SETBIT_CMN(num, pos, val) (num |= (val << pos))
67 #define SETBIT(num, pos, val, len) (SETBIT_CMN(num, pos, val))
69 #define SETBIT(num, pos, val, len) \
70 (SETBIT_CMN(num, (COMPUTE_BIT_POS(len, pos)), val))