Home
last modified time | relevance | path

Searched refs:bits (Results 1 – 25 of 25) sorted by relevance

/lib/zlib_inflate/
Dinffast.c83 unsigned bits; /* local strm->bits */ in inflate_fast() local
110 bits = state->bits; in inflate_fast()
119 if (bits < 15) { in inflate_fast()
120 hold += (unsigned long)(*in++) << bits; in inflate_fast()
121 bits += 8; in inflate_fast()
122 hold += (unsigned long)(*in++) << bits; in inflate_fast()
123 bits += 8; in inflate_fast()
127 op = (unsigned)(this.bits); in inflate_fast()
129 bits -= op; in inflate_fast()
138 if (bits < op) { in inflate_fast()
[all …]
Dinflate.c47 state->bits = 0; in zlib_inflateReset()
172 if (state->mode == STORED && state->bits == 0) { in zlib_inflateSyncPacket()
192 bits = state->bits; \
203 state->bits = bits; \
210 bits = 0; \
219 hold += (unsigned long)(*next++) << bits; \
220 bits += 8; \
227 while (bits < (unsigned)(n)) \
239 bits -= (unsigned)(n); \
245 hold >>= bits & 7; \
[all …]
Dinftrees.c24 code **table, unsigned *bits, unsigned short *work) in zlib_inflate_table() argument
99 root = *bits; in zlib_inflate_table()
105 this.bits = (unsigned char)1; in zlib_inflate_table()
109 *bits = 1; in zlib_inflate_table()
204 this.bits = (unsigned char)(len - drop); in zlib_inflate_table()
272 (*table)[low].bits = (unsigned char)root; in zlib_inflate_table()
285 this.bits = (unsigned char)(len - drop); in zlib_inflate_table()
293 this.bits = (unsigned char)len; in zlib_inflate_table()
313 *bits = root; in zlib_inflate_table()
Dinftrees.h29 unsigned char bits; /* bits in this part of the code */ member
58 unsigned *bits, unsigned short *work);
Dinflate.h92 unsigned bits; /* number of bits in "in" */ member
/lib/
Dbitmap.c49 const unsigned long *bitmap2, unsigned int bits) in __bitmap_equal() argument
51 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_equal()
56 if (bits % BITS_PER_LONG) in __bitmap_equal()
57 if ((bitmap1[k] ^ bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_equal()
67 unsigned int bits) in __bitmap_or_equal() argument
69 unsigned int k, lim = bits / BITS_PER_LONG; in __bitmap_or_equal()
77 if (!(bits % BITS_PER_LONG)) in __bitmap_or_equal()
81 return (tmp & BITMAP_LAST_WORD_MASK(bits)) == 0; in __bitmap_or_equal()
84 void __bitmap_complement(unsigned long *dst, const unsigned long *src, unsigned int bits) in __bitmap_complement() argument
86 unsigned int k, lim = BITS_TO_LONGS(bits); in __bitmap_complement()
[all …]
Dcrc4.c25 uint8_t crc4(uint8_t c, uint64_t x, int bits) in crc4() argument
30 x &= (1ull << bits) - 1; in crc4()
33 bits = (bits + 3) & ~0x3; in crc4()
36 for (i = bits - 4; i >= 0; i -= 4) in crc4()
Dtest_printf.c542 unsigned long *bits = bitmap_zalloc(nbits, GFP_KERNEL); in large_bitmap() local
543 if (!bits) in large_bitmap()
546 bitmap_set(bits, 1, 20); in large_bitmap()
547 bitmap_set(bits, 60000, 15); in large_bitmap()
548 test("1-20,60000-60014", "%*pbl", nbits, bits); in large_bitmap()
549 bitmap_free(bits); in large_bitmap()
555 DECLARE_BITMAP(bits, 20); in bitmap()
559 bitmap_zero(bits, 20); in bitmap()
560 test("00000|00000", "%20pb|%*pb", bits, 20, bits); in bitmap()
561 test("|", "%20pbl|%*pbl", bits, 20, bits); in bitmap()
[all …]
Dlist_sort.c220 size_t bits; in list_sort() local
224 for (bits = count; bits & 1; bits >>= 1) in list_sort()
227 if (likely(bits)) { in list_sort()
Dtest_bitmap.c546 DECLARE_BITMAP(bits, CLUMP_EXP_NUMBITS); in test_for_each_set_clump8()
551 bitmap_zero(bits, CLUMP_EXP_NUMBITS); in test_for_each_set_clump8()
552 bitmap_set(bits, 0, 1); /* 0x01 */ in test_for_each_set_clump8()
553 bitmap_set(bits, 9, 1); /* 0x02 */ in test_for_each_set_clump8()
554 bitmap_set(bits, 27, 3); /* 0x28 */ in test_for_each_set_clump8()
555 bitmap_set(bits, 35, 3); /* 0x28 */ in test_for_each_set_clump8()
556 bitmap_set(bits, 40, 4); /* 0x0F */ in test_for_each_set_clump8()
557 bitmap_set(bits, 48, 8); /* 0xFF */ in test_for_each_set_clump8()
558 bitmap_set(bits, 56, 1); /* 0x05 - part 1 */ in test_for_each_set_clump8()
559 bitmap_set(bits, 58, 1); /* 0x05 - part 2 */ in test_for_each_set_clump8()
[all …]
Drandom32.c575 unsigned int x, y, bits, samples; in prandom32_state_selftest() local
594 bits = hweight32(xor); in prandom32_state_selftest()
595 total += (bits - 16) * (bits - 16); in prandom32_state_selftest()
602 bits = int_sqrt(total / (samples * (samples - 1)) * 4); in prandom32_state_selftest()
603 if (bits > 6) in prandom32_state_selftest()
606 bits, ~flip, data[0] & ~flip); in prandom32_state_selftest()
610 bits+1); in prandom32_state_selftest()
Dtest_kasan.c918 long *bits; in kasan_bitops_generic() local
927 bits = kzalloc(sizeof(*bits) + 1, GFP_KERNEL); in kasan_bitops_generic()
928 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, bits); in kasan_bitops_generic()
935 kasan_bitops_modify(test, BITS_PER_LONG, bits); in kasan_bitops_generic()
940 kasan_bitops_test_and_modify(test, BITS_PER_LONG + BITS_PER_BYTE, bits); in kasan_bitops_generic()
942 kfree(bits); in kasan_bitops_generic()
947 long *bits; in kasan_bitops_tags() local
953 bits = kzalloc(48, GFP_KERNEL); in kasan_bitops_tags()
954 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, bits); in kasan_bitops_tags()
957 kasan_bitops_modify(test, BITS_PER_LONG, (void *)bits + 48); in kasan_bitops_tags()
[all …]
Dnodemask.c27 bit = bitmap_ord_to_pos(maskp->bits, in node_random()
Ddecompress_bunzip2.c118 unsigned int bits = 0; in get_bits() local
138 bits = bd->inbufBits&((1 << bd->inbufBitCount)-1); in get_bits()
140 bits <<= bits_wanted; in get_bits()
149 bits |= (bd->inbufBits >> bd->inbufBitCount)&((1 << bits_wanted)-1); in get_bits()
151 return bits; in get_bits()
Dgenalloc.c253 bit = find_next_bit(chunk->bits, end_bit, 0); in gen_pool_destroy()
303 start_bit = algo(chunk->bits, end_bit, start_bit, in gen_pool_alloc_algo_owner()
307 remain = bitmap_set_ll(chunk->bits, start_bit, nbits); in gen_pool_alloc_algo_owner()
309 remain = bitmap_clear_ll(chunk->bits, start_bit, in gen_pool_alloc_algo_owner()
506 remain = bitmap_clear_ll(chunk->bits, start_bit, nbits); in gen_pool_free_owner()
Dsbitmap.c301 unsigned int bits = min(8 - byte_bits, word_bits); in sbitmap_bitmap_show() local
303 byte |= (word & (BIT(bits) - 1)) << byte_bits; in sbitmap_bitmap_show()
304 byte_bits += bits; in sbitmap_bitmap_show()
311 word >>= bits; in sbitmap_bitmap_show()
312 word_bits -= bits; in sbitmap_bitmap_show()
Dubsan.c72 unsigned bits = type_bit_width(type); in is_inline_int() local
76 return bits <= inline_bits; in is_inline_int()
DKconfig404 number of data bits to protect, 'm' should be chosen such
412 Constant value for error correction capability in bits 't'.
DKconfig.debug2322 tristate "KUnit test for bits.h"
2325 This builds the bits unit test.
2326 Tests the logic of macros defined in bits.h.
/lib/842/
D842_decompress.c89 u8 *in = p->in, b = p->bit, bits = b + n; in next_bits() local
99 if (bits > 64) in next_bits()
101 else if (p->ilen < 8 && bits > 32 && bits <= 56) in next_bits()
103 else if (p->ilen < 4 && bits > 16 && bits <= 24) in next_bits()
106 if (DIV_ROUND_UP(bits, 8) > p->ilen) in next_bits()
109 if (bits <= 8) in next_bits()
110 *d = *in >> (8 - bits); in next_bits()
111 else if (bits <= 16) in next_bits()
112 *d = be16_to_cpu(get_unaligned((__be16 *)in)) >> (16 - bits); in next_bits()
113 else if (bits <= 32) in next_bits()
[all …]
D842_compress.c169 int b = p->bit, bits = b + n, s = round_up(bits, 8) - bits; in add_bits() local
181 if (bits > 64) in add_bits()
183 else if (p->olen < 8 && bits > 32 && bits <= 56) in add_bits()
185 else if (p->olen < 4 && bits > 16 && bits <= 24) in add_bits()
188 if (DIV_ROUND_UP(bits, 8) > p->olen) in add_bits()
194 if (bits <= 8) in add_bits()
196 else if (bits <= 16) in add_bits()
198 else if (bits <= 24) in add_bits()
200 else if (bits <= 32) in add_bits()
202 else if (bits <= 40) in add_bits()
[all …]
/lib/zlib_deflate/
Ddeftree.c175 int bits; /* bit counter */ in tr_static_init() local
218 for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; in tr_static_init()
366 int bits; /* bit length */ in gen_bitlen() local
371 for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; in gen_bitlen()
380 bits = tree[tree[n].Dad].Len + 1; in gen_bitlen()
381 if (bits > max_length) bits = max_length, overflow++; in gen_bitlen()
382 tree[n].Len = (ush)bits; in gen_bitlen()
387 s->bl_count[bits]++; in gen_bitlen()
391 s->opt_len += (ulg)f * (bits + xbits); in gen_bitlen()
401 bits = max_length-1; in gen_bitlen()
[all …]
/lib/zlib_dfltcc/
Ddfltcc_util.h74 const char *bits, in is_bit_set() argument
78 return bits[n / 8] & (1 << (7 - (n % 8))); in is_bit_set()
82 char *bits, in turn_bit_off() argument
86 bits[n / 8] &= ~(1 << (7 - (n % 8))); in turn_bit_off()
Ddfltcc_inflate.c104 if (state->bits != 0) { in dfltcc_inflate()
107 state->bits = 0; in dfltcc_inflate()
123 param->sbb = state->bits; in dfltcc_inflate()
138 state->bits = param->sbb; in dfltcc_inflate()
/lib/crypto/
Dsha256.c248 __be64 bits; in __sha256_final() local
254 bits = cpu_to_be64(sctx->count << 3); in __sha256_final()
262 sha256_update(sctx, (const u8 *)&bits, sizeof(bits)); in __sha256_final()