Lines Matching refs:bitlen
1152 int postbits = (f->bitoffs + f->bitlen) & 7; in _set_field()
1153 int bytelen = f->bitlen / 8; in _set_field()
1157 if (!bytelen && (f->bitoffs & 7) + f->bitlen < 8) { in _set_field()
1158 p[3 ^ idx] &= ~((((1 << f->bitlen) - 1)) << (f->bitoffs & 7)); in _set_field()
1160 (val & ((1 << f->bitlen) - 1)) << (f->bitoffs & 7); in _set_field()
1183 int postbits = (f->bitoffs + f->bitlen) & 7; in _get_field()
1184 int bytelen = f->bitlen / 8; in _get_field()
1189 if (!bytelen && (f->bitoffs & 7) + f->bitlen < 8) in _get_field()
1190 return (p[3 ^ idx] >> (f->bitoffs & 7)) & ((1 << f->bitlen) - in _get_field()
1197 i = base_offs + (f->bitoffs + f->bitlen) / 8; in _get_field()
1214 if (f->bitlen < 32) in _set_array()
1215 bitoffs = BE_TO_BITSOFFS(bitoffs, f->bitlen); in _set_array()
1217 memcpy((uint8_t *) buf + base_offs + bitoffs / 8, val, f->bitlen / 8); in _set_array()
1225 if (f->bitlen < 32) in _get_array()
1226 bitoffs = BE_TO_BITSOFFS(bitoffs, f->bitlen); in _get_array()
1228 memcpy(val, (uint8_t *) buf + base_offs + bitoffs / 8, f->bitlen / 8); in _get_array()
1271 if (f->bitlen <= 32) { in mad_decode_field()
1275 if (f->bitlen == 64) { in mad_decode_field()
1290 if (f->bitlen <= 32) { in mad_encode_field()
1294 if (f->bitlen == 64) { in mad_encode_field()
1306 f->def_dump_fn(buf, bufsz, val, ALIGN(f->bitlen, 8) / 8); in _mad_dump_val()
1344 f.bitlen = valsz * 8; in _mad_dump()
1353 valsz ? valsz : ALIGN(f->bitlen, 8) / 8); in _mad_print_field()