Lines Matching refs:bits

23    case 1:  return v.bits.u32;  in get_bits64()
24 case 8: return v.bits.u8; in get_bits64()
25 case 16: return v.bits.u16; in get_bits64()
26 case 32: return v.bits.u32; in get_bits64()
27 case 64: return v.bits.u64; in get_bits64()
40 case 1: fprintf(fp, "%08x", v.bits.u32); break; in print_vbits()
41 case 8: fprintf(fp, "%02x", v.bits.u8); break; in print_vbits()
42 case 16: fprintf(fp, "%04x", v.bits.u16); break; in print_vbits()
43 case 32: fprintf(fp, "%08x", v.bits.u32); break; in print_vbits()
44 case 64: fprintf(fp, "%016"PRIx64, v.bits.u64); break; in print_vbits()
47 fprintf(fp, "%016"PRIx64, v.bits.u128[1]); in print_vbits()
48 fprintf(fp, "%016"PRIx64, v.bits.u128[0]); in print_vbits()
50 fprintf(fp, "%016"PRIx64, v.bits.u128[0]); in print_vbits()
51 fprintf(fp, "%016"PRIx64, v.bits.u128[1]); in print_vbits()
56 fprintf(fp, "%016"PRIx64, v.bits.u256[3]); in print_vbits()
57 fprintf(fp, "%016"PRIx64, v.bits.u256[2]); in print_vbits()
58 fprintf(fp, "%016"PRIx64, v.bits.u256[1]); in print_vbits()
59 fprintf(fp, "%016"PRIx64, v.bits.u256[0]); in print_vbits()
61 fprintf(fp, "%016"PRIx64, v.bits.u256[0]); in print_vbits()
62 fprintf(fp, "%016"PRIx64, v.bits.u256[1]); in print_vbits()
63 fprintf(fp, "%016"PRIx64, v.bits.u256[2]); in print_vbits()
64 fprintf(fp, "%016"PRIx64, v.bits.u256[3]); in print_vbits()
80 case 1: new.bits.u32 = 0x01; break; in undefined_vbits()
81 case 8: new.bits.u8 = 0xff; break; in undefined_vbits()
82 case 16: new.bits.u16 = 0xffff; break; in undefined_vbits()
83 case 32: new.bits.u32 = ~0; break; in undefined_vbits()
84 case 64: new.bits.u64 = ~0ull; break; in undefined_vbits()
85 case 128: new.bits.u128[0] = ~0ull; in undefined_vbits()
86 new.bits.u128[1] = ~0ull; in undefined_vbits()
88 case 256: new.bits.u256[0] = ~0ull; in undefined_vbits()
89 new.bits.u256[1] = ~0ull; in undefined_vbits()
90 new.bits.u256[2] = ~0ull; in undefined_vbits()
91 new.bits.u256[3] = ~0ull; in undefined_vbits()
107 case 1: new.bits.u32 = 0x0; break; in defined_vbits()
108 case 8: new.bits.u8 = 0x0; break; in defined_vbits()
109 case 16: new.bits.u16 = 0x0; break; in defined_vbits()
110 case 32: new.bits.u32 = 0x0; break; in defined_vbits()
111 case 64: new.bits.u64 = 0x0; break; in defined_vbits()
112 case 128: new.bits.u128[0] = 0x0; in defined_vbits()
113 new.bits.u128[1] = 0x0; in defined_vbits()
115 case 256: new.bits.u256[0] = 0x0; in defined_vbits()
116 new.bits.u256[1] = 0x0; in defined_vbits()
117 new.bits.u256[2] = 0x0; in defined_vbits()
118 new.bits.u256[3] = 0x0; in defined_vbits()
134 case 1: return v1.bits.u32 == v2.bits.u32; in equal_vbits()
135 case 8: return v1.bits.u8 == v2.bits.u8; in equal_vbits()
136 case 16: return v1.bits.u16 == v2.bits.u16; in equal_vbits()
137 case 32: return v1.bits.u32 == v2.bits.u32; in equal_vbits()
138 case 64: return v1.bits.u64 == v2.bits.u64; in equal_vbits()
139 case 128: return v1.bits.u128[0] == v2.bits.u128[0] && in equal_vbits()
140 v1.bits.u128[1] == v2.bits.u128[1]; in equal_vbits()
141 case 256: return v1.bits.u256[0] == v2.bits.u256[0] && in equal_vbits()
142 v1.bits.u256[1] == v2.bits.u256[1] && in equal_vbits()
143 v1.bits.u256[2] == v2.bits.u256[2] && in equal_vbits()
144 v1.bits.u256[3] == v2.bits.u256[3]; in equal_vbits()
162 uint64_t bits; in truncate_vbits() local
165 bits = get_bits64(v); in truncate_vbits()
168 bits = v.bits.u128[0]; in truncate_vbits()
170 bits = v.bits.u128[1]; in truncate_vbits()
173 bits = v.bits.u256[0]; in truncate_vbits()
175 bits = v.bits.u256[3]; in truncate_vbits()
180 case 1: new.bits.u32 = bits & 0x01; break; in truncate_vbits()
181 case 8: new.bits.u8 = bits & 0xff; break; in truncate_vbits()
182 case 16: new.bits.u16 = bits & 0xffff; break; in truncate_vbits()
183 case 32: new.bits.u32 = bits & ~0u; break; in truncate_vbits()
184 case 64: new.bits.u64 = bits & ~0ll; break; in truncate_vbits()
195 new.bits.u128[0] = v.bits.u256[0]; in truncate_vbits()
196 new.bits.u128[1] = v.bits.u256[1]; in truncate_vbits()
198 new.bits.u128[0] = v.bits.u256[2]; in truncate_vbits()
199 new.bits.u128[1] = v.bits.u256[3]; in truncate_vbits()
226 uint64_t bits = left64(get_bits64(v)); in left_vbits() local
229 case 8: new.bits.u8 = bits & 0xff; break; in left_vbits()
230 case 16: new.bits.u16 = bits & 0xffff; break; in left_vbits()
231 case 32: new.bits.u32 = bits & ~0u; break; in left_vbits()
232 case 64: new.bits.u64 = bits & ~0ll; break; in left_vbits()
235 new.bits.u128[0] = bits; in left_vbits()
236 if (bits & (1ull << 63)) { // MSB is set in left_vbits()
237 new.bits.u128[1] = ~0ull; in left_vbits()
239 new.bits.u128[1] = 0; in left_vbits()
242 new.bits.u128[1] = bits; in left_vbits()
243 if (bits & (1ull << 63)) { // MSB is set in left_vbits()
244 new.bits.u128[0] = ~0ull; in left_vbits()
246 new.bits.u128[0] = 0; in left_vbits()
252 new.bits.u256[0] = bits; in left_vbits()
253 if (bits & (1ull << 63)) { // MSB is set in left_vbits()
254 new.bits.u256[1] = ~0ull; in left_vbits()
255 new.bits.u256[2] = ~0ull; in left_vbits()
256 new.bits.u256[3] = ~0ull; in left_vbits()
258 new.bits.u256[1] = 0; in left_vbits()
259 new.bits.u256[2] = 0; in left_vbits()
260 new.bits.u256[3] = 0; in left_vbits()
263 new.bits.u256[3] = bits; in left_vbits()
264 if (bits & (1ull << 63)) { // MSB is set in left_vbits()
265 new.bits.u256[0] = ~0ull; in left_vbits()
266 new.bits.u256[1] = ~0ull; in left_vbits()
267 new.bits.u256[2] = ~0ull; in left_vbits()
269 new.bits.u256[0] = 0; in left_vbits()
270 new.bits.u256[1] = 0; in left_vbits()
271 new.bits.u256[2] = 0; in left_vbits()
283 if (v.bits.u128[1] != 0) { in left_vbits()
284 new.bits.u128[0] = v.bits.u128[0]; in left_vbits()
285 new.bits.u128[1] = left64(v.bits.u128[1]); in left_vbits()
287 new.bits.u128[0] = left64(v.bits.u128[0]); in left_vbits()
288 if (new.bits.u128[0] & (1ull << 63)) { // MSB is set in left_vbits()
289 new.bits.u128[1] = ~0ull; in left_vbits()
291 new.bits.u128[1] = 0; in left_vbits()
295 if (v.bits.u128[0] != 0) { in left_vbits()
296 new.bits.u128[0] = left64(v.bits.u128[0]); in left_vbits()
297 new.bits.u128[1] = v.bits.u128[1]; in left_vbits()
299 new.bits.u128[1] = left64(v.bits.u128[1]); in left_vbits()
300 if (new.bits.u128[1] & (1ull << 63)) { // MSB is set in left_vbits()
301 new.bits.u128[0] = ~0ull; in left_vbits()
303 new.bits.u128[0] = 0; in left_vbits()
312 uint64_t b1 = new.bits.u128[1]; in left_vbits()
313 uint64_t b0 = new.bits.u128[0]; in left_vbits()
315 new.bits.u256[0] = b0; in left_vbits()
316 new.bits.u256[1] = b1; in left_vbits()
318 if (new.bits.u256[1] & (1ull << 63)) { // MSB is set in left_vbits()
319 new.bits.u256[2] = ~0ull; in left_vbits()
320 new.bits.u256[3] = ~0ull; in left_vbits()
322 new.bits.u256[2] = 0; in left_vbits()
323 new.bits.u256[3] = 0; in left_vbits()
326 uint64_t b1 = new.bits.u128[0]; in left_vbits()
327 uint64_t b0 = new.bits.u128[1]; in left_vbits()
329 new.bits.u256[2] = b0; in left_vbits()
330 new.bits.u256[3] = b1; in left_vbits()
332 if (new.bits.u256[2] & (1ull << 63)) { // MSB is set in left_vbits()
333 new.bits.u256[0] = ~0ull; in left_vbits()
334 new.bits.u256[1] = ~0ull; in left_vbits()
336 new.bits.u256[0] = 0; in left_vbits()
337 new.bits.u256[1] = 0; in left_vbits()
355 case 8: new.bits.u8 = v1.bits.u8 | v2.bits.u8; break; in or_vbits()
356 case 16: new.bits.u16 = v1.bits.u16 | v2.bits.u16; break; in or_vbits()
357 case 32: new.bits.u32 = v1.bits.u32 | v2.bits.u32; break; in or_vbits()
358 case 64: new.bits.u64 = v1.bits.u64 | v2.bits.u64; break; in or_vbits()
359 case 128: new.bits.u128[0] = v1.bits.u128[0] | v2.bits.u128[0]; in or_vbits()
360 new.bits.u128[1] = v1.bits.u128[1] | v2.bits.u128[1]; in or_vbits()
362 case 256: new.bits.u256[0] = v1.bits.u256[0] | v2.bits.u256[0]; in or_vbits()
363 new.bits.u256[1] = v1.bits.u256[1] | v2.bits.u256[1]; in or_vbits()
364 new.bits.u256[2] = v1.bits.u256[2] | v2.bits.u256[2]; in or_vbits()
365 new.bits.u256[3] = v1.bits.u256[3] | v2.bits.u256[3]; in or_vbits()
383 case 8: new.bits.u8 = v1.bits.u8 & v2.bits.u8; break; in and_vbits()
384 case 16: new.bits.u16 = v1.bits.u16 & v2.bits.u16; break; in and_vbits()
385 case 32: new.bits.u32 = v1.bits.u32 & v2.bits.u32; break; in and_vbits()
386 case 64: new.bits.u64 = v1.bits.u64 & v2.bits.u64; break; in and_vbits()
387 case 128: new.bits.u128[0] = v1.bits.u128[0] & v2.bits.u128[0]; in and_vbits()
388 new.bits.u128[1] = v1.bits.u128[1] & v2.bits.u128[1]; in and_vbits()
390 case 256: new.bits.u256[0] = v1.bits.u256[0] & v2.bits.u256[0]; in and_vbits()
391 new.bits.u256[1] = v1.bits.u256[1] & v2.bits.u256[1]; in and_vbits()
392 new.bits.u256[2] = v1.bits.u256[2] & v2.bits.u256[2]; in and_vbits()
393 new.bits.u256[3] = v1.bits.u256[3] & v2.bits.u256[3]; in and_vbits()
411 case 8: new.bits.u16 = v1.bits.u8; in concat_vbits()
412 new.bits.u16 = (new.bits.u16 << 8) | v2.bits.u8; break; in concat_vbits()
413 case 16: new.bits.u32 = v1.bits.u16; in concat_vbits()
414 new.bits.u32 = (new.bits.u32 << 16) | v2.bits.u16; break; in concat_vbits()
415 case 32: new.bits.u64 = v1.bits.u32; in concat_vbits()
416 new.bits.u64 = (new.bits.u64 << 32) | v2.bits.u32; break; in concat_vbits()
419 new.bits.u128[0] = v2.bits.u64; in concat_vbits()
420 new.bits.u128[1] = v1.bits.u64; in concat_vbits()
422 new.bits.u128[0] = v1.bits.u64; in concat_vbits()
423 new.bits.u128[1] = v2.bits.u64; in concat_vbits()
428 new.bits.u256[0] = v2.bits.u128[0]; in concat_vbits()
429 new.bits.u256[1] = v2.bits.u128[1]; in concat_vbits()
430 new.bits.u256[2] = v1.bits.u128[0]; in concat_vbits()
431 new.bits.u256[3] = v1.bits.u128[1]; in concat_vbits()
433 new.bits.u256[0] = v1.bits.u128[0]; in concat_vbits()
434 new.bits.u256[1] = v1.bits.u128[1]; in concat_vbits()
435 new.bits.u256[2] = v2.bits.u128[0]; in concat_vbits()
436 new.bits.u256[3] = v2.bits.u128[1]; in concat_vbits()
454 case 16: new.bits.u8 = v.bits.u16 >> 8; break; in upper_vbits()
455 case 32: new.bits.u16 = v.bits.u32 >> 16; break; in upper_vbits()
456 case 64: new.bits.u32 = v.bits.u64 >> 32; break; in upper_vbits()
459 new.bits.u64 = v.bits.u128[1]; in upper_vbits()
461 new.bits.u64 = v.bits.u128[0]; in upper_vbits()
465 new.bits.u128[0] = v.bits.u256[2]; in upper_vbits()
466 new.bits.u128[1] = v.bits.u256[3]; in upper_vbits()
468 new.bits.u128[0] = v.bits.u256[0]; in upper_vbits()
469 new.bits.u128[1] = v.bits.u256[1]; in upper_vbits()
491 uint64_t bits = get_bits64(v); in zextend_vbits() local
494 case 8: new.bits.u8 = bits; break; in zextend_vbits()
495 case 16: new.bits.u16 = bits; break; in zextend_vbits()
496 case 32: new.bits.u32 = bits; break; in zextend_vbits()
497 case 64: new.bits.u64 = bits; break; in zextend_vbits()
500 new.bits.u128[0] = bits; in zextend_vbits()
501 new.bits.u128[1] = 0; in zextend_vbits()
503 new.bits.u128[0] = 0; in zextend_vbits()
504 new.bits.u128[1] = bits; in zextend_vbits()
509 new.bits.u256[0] = bits; in zextend_vbits()
510 new.bits.u256[1] = 0; in zextend_vbits()
511 new.bits.u256[2] = 0; in zextend_vbits()
512 new.bits.u256[3] = 0; in zextend_vbits()
514 new.bits.u256[0] = 0; in zextend_vbits()
515 new.bits.u256[1] = 0; in zextend_vbits()
516 new.bits.u256[2] = 0; in zextend_vbits()
517 new.bits.u256[3] = bits; in zextend_vbits()
530 new.bits.u256[0] = v.bits.u128[0]; in zextend_vbits()
531 new.bits.u256[1] = v.bits.u128[1]; in zextend_vbits()
532 new.bits.u256[2] = 0; in zextend_vbits()
533 new.bits.u256[3] = 0; in zextend_vbits()
535 new.bits.u256[0] = 0; in zextend_vbits()
536 new.bits.u256[1] = 0; in zextend_vbits()
537 new.bits.u256[2] = v.bits.u128[1]; in zextend_vbits()
538 new.bits.u256[3] = v.bits.u128[0]; in zextend_vbits()
556 case 8: if (v.bits.u8 == 0x80) sextend = 1; break; in sextend_vbits()
557 case 16: if (v.bits.u16 == 0x8000) sextend = 1; break; in sextend_vbits()
558 case 32: if (v.bits.u32 == 0x80000000) sextend = 1; break; in sextend_vbits()
559 case 64: if (v.bits.u64 == (1ull << 63)) sextend = 1; break; in sextend_vbits()
560 case 128: if (v.bits.u128[1] == (1ull << 63)) sextend = 1; break; in sextend_vbits()
561 case 256: if (v.bits.u256[3] == (1ull << 63)) sextend = 1; break; in sextend_vbits()
579 case 1: new.bits.u32 = 1 << bitno; break; in onehot_vbits()
580 case 8: new.bits.u8 = 1 << bitno; break; in onehot_vbits()
581 case 16: new.bits.u16 = 1 << bitno; break; in onehot_vbits()
582 case 32: new.bits.u32 = 1u << bitno; break; in onehot_vbits()
583 case 64: new.bits.u64 = 1ull << bitno; break; in onehot_vbits()
587 new.bits.u128[0] = 1ull << bitno; in onehot_vbits()
588 new.bits.u128[1] = 0; in onehot_vbits()
590 new.bits.u128[0] = 0; in onehot_vbits()
591 new.bits.u128[1] = 1ull << (bitno - 64); in onehot_vbits()
595 new.bits.u128[0] = 0; in onehot_vbits()
596 new.bits.u128[1] = 1ull << bitno; in onehot_vbits()
598 new.bits.u128[0] = 1ull << (bitno - 64); in onehot_vbits()
599 new.bits.u128[1] = 0; in onehot_vbits()
606 new.bits.u256[0] = 1ull << bitno; in onehot_vbits()
607 new.bits.u256[1] = 0; in onehot_vbits()
608 new.bits.u256[2] = 0; in onehot_vbits()
609 new.bits.u256[3] = 0; in onehot_vbits()
611 new.bits.u256[0] = 0; in onehot_vbits()
612 new.bits.u256[1] = 1ull << (bitno - 64); in onehot_vbits()
613 new.bits.u256[2] = 0; in onehot_vbits()
614 new.bits.u256[3] = 0; in onehot_vbits()
616 new.bits.u256[0] = 0; in onehot_vbits()
617 new.bits.u256[1] = 0; in onehot_vbits()
618 new.bits.u256[2] = 1ull << (bitno - 128); in onehot_vbits()
619 new.bits.u256[3] = 0; in onehot_vbits()
621 new.bits.u256[0] = 0; in onehot_vbits()
622 new.bits.u256[1] = 0; in onehot_vbits()
623 new.bits.u256[2] = 0; in onehot_vbits()
624 new.bits.u256[3] = 1ull << (bitno - 192); in onehot_vbits()
628 new.bits.u256[0] = 0; in onehot_vbits()
629 new.bits.u256[1] = 0; in onehot_vbits()
630 new.bits.u256[2] = 0; in onehot_vbits()
631 new.bits.u256[3] = 1ull << bitno; in onehot_vbits()
633 new.bits.u256[0] = 0; in onehot_vbits()
634 new.bits.u256[1] = 0; in onehot_vbits()
635 new.bits.u256[2] = 1ull << (bitno - 64); in onehot_vbits()
636 new.bits.u256[3] = 0; in onehot_vbits()
638 new.bits.u256[0] = 0; in onehot_vbits()
639 new.bits.u256[1] = 1ull << (bitno - 128); in onehot_vbits()
640 new.bits.u256[2] = 0; in onehot_vbits()
641 new.bits.u256[3] = 0; in onehot_vbits()
643 new.bits.u256[0] = 1ull << (bitno - 192); in onehot_vbits()
644 new.bits.u256[1] = 0; in onehot_vbits()
645 new.bits.u256[2] = 0; in onehot_vbits()
646 new.bits.u256[3] = 0; in onehot_vbits()
672 case 8: new.bits.u8 <<= shift_amount; break; in shl_vbits()
673 case 16: new.bits.u16 <<= shift_amount; break; in shl_vbits()
674 case 32: new.bits.u32 <<= shift_amount; break; in shl_vbits()
675 case 64: new.bits.u64 <<= shift_amount; break; in shl_vbits()
694 case 8: new.bits.u8 >>= shift_amount; break; in shr_vbits()
695 case 16: new.bits.u16 >>= shift_amount; break; in shr_vbits()
696 case 32: new.bits.u32 >>= shift_amount; break; in shr_vbits()
697 case 64: new.bits.u64 >>= shift_amount; break; in shr_vbits()
718 new.bits.u8 >>= shift_amount; in sar_vbits()
719 msb = (v.bits.u8 & 0x80) != 0; in sar_vbits()
722 new.bits.u16 >>= shift_amount; in sar_vbits()
723 msb = (v.bits.u16 & 0x8000) != 0; in sar_vbits()
726 new.bits.u32 >>= shift_amount; in sar_vbits()
727 msb = (v.bits.u32 & (1u << 31)) != 0; in sar_vbits()
730 new.bits.u64 >>= shift_amount; in sar_vbits()
731 msb = (v.bits.u64 & (1ull << 63)) != 0; in sar_vbits()
758 new.bits.u32 = 0xE; in cmpord_vbits()
762 new.bits.u64 = 0xE; in cmpord_vbits()