Lines Matching refs:mask
12 #define TNUM(_v, _m) (struct tnum){.value = _v, .mask = _m}
14 const struct tnum tnum_unknown = { .value = 0, .mask = -1 };
39 return TNUM(a.value << shift, a.mask << shift); in tnum_lshift()
44 return TNUM(a.value >> shift, a.mask >> shift); in tnum_rshift()
56 (u32)(((s32)a.mask) >> min_shift)); in tnum_arshift()
59 (s64)a.mask >> min_shift); in tnum_arshift()
66 sm = a.mask + b.mask; in tnum_add()
70 mu = chi | a.mask | b.mask; in tnum_add()
79 alpha = dv + a.mask; in tnum_sub()
80 beta = dv - b.mask; in tnum_sub()
82 mu = chi | a.mask | b.mask; in tnum_sub()
90 alpha = a.value | a.mask; in tnum_and()
91 beta = b.value | b.mask; in tnum_and()
101 mu = a.mask | b.mask; in tnum_or()
110 mu = a.mask | b.mask; in tnum_xor()
127 while (a.value || a.mask) { in tnum_mul()
130 acc_m = tnum_add(acc_m, TNUM(0, b.mask)); in tnum_mul()
132 else if (a.mask & 1) in tnum_mul()
133 acc_m = tnum_add(acc_m, TNUM(0, b.value | b.mask)); in tnum_mul()
149 mu = a.mask & b.mask; in tnum_intersect()
156 a.mask &= (1ULL << (size * 8)) - 1; in tnum_cast()
164 return !((a.value | a.mask) & (size - 1)); in tnum_is_aligned()
169 if (b.mask & ~a.mask) in tnum_in()
171 b.value &= ~a.mask; in tnum_in()
177 return snprintf(str, size, "(%#llx; %#llx)", a.value, a.mask); in tnum_strn()
187 if (a.mask & 1) in tnum_sbin()
194 a.mask >>= 1; in tnum_sbin()