Lines Matching refs:pos
46 #define COMPUTE_BIT_POS(len, pos) \ argument
47 (((len - pos - 1) & 0xf8) | (pos & 0x7))
54 #define EXTRACTBIT_CMN(val, pos) ((val >> pos) & 1) argument
56 #define EXTRACTBIT(val, pos, len) (EXTRACTBIT_CMN(val, pos)) argument
58 #define EXTRACTBIT(val, pos, len) \
59 (EXTRACTBIT_CMN(val, (COMPUTE_BIT_POS(len, pos))))
63 #define SETBIT_CMN(num, pos, val) (num |= (val << pos)) argument
65 #define SETBIT(num, pos, val, len) (SETBIT_CMN(num, pos, val)) argument
67 #define SETBIT(num, pos, val, len) \
68 (SETBIT_CMN(num, (COMPUTE_BIT_POS(len, pos)), val))
72 #define UNSETBIT_CMN(num, pos) (num &= (~(1 << pos))) argument
74 #define UNSETBIT(num, pos, len) (UNSETBIT_CMN(num, pos)) argument
76 #define UNSETBIT(num, pos, len) \
77 (UNSETBIT_CMN(num, (COMPUTE_BIT_POS(len, pos))))