Lines Matching defs:bits
169 * significant bits of the output; the last component will be written to
170 * the most significant bits.
193 * significant bits of the output; the last component will be written to
194 * the most significant bits.
220 * the least significant bits of the input; the last component will be
221 * extracted from the most significant bits.
242 * the least significant bits of the input; the last component will be
243 * extracted from the most significant bits.
580 uint32_t r = v; // r will be reversed bits of v; first get LSB of v
588 r <<= s; // shift when v's highest bits are zero
637 bitfield_extract_uint(uint32_t value, int offset, int bits)
639 if (bits == 0)
641 else if (offset < 0 || bits < 0)
643 else if (offset + bits > 32)
646 value <<= 32 - bits - offset;
647 value >>= 32 - bits;
653 bitfield_extract_int(int32_t value, int offset, int bits)
655 if (bits == 0)
657 else if (offset < 0 || bits < 0)
659 else if (offset + bits > 32)
662 value <<= 32 - bits - offset;
663 value >>= 32 - bits;
669 bitfield_insert(uint32_t base, uint32_t insert, int offset, int bits)
671 if (bits == 0)
673 else if (offset < 0 || bits < 0)
675 else if (offset + bits > 32)
678 unsigned insert_mask = ((1ull << bits) - 1) << offset;