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()
117 static struct tnum hma(struct tnum acc, u64 value, u64 mask) in hma() argument
119 while (mask) { in hma()
120 if (mask & 1) in hma()
122 mask >>= 1; in hma()
134 acc = hma(TNUM(pi, 0), a.mask, b.mask | b.value); in tnum_mul()
135 return hma(acc, b.mask, a.value); in tnum_mul()
146 mu = a.mask & b.mask; in tnum_intersect()
153 a.mask &= (1ULL << (size * 8)) - 1; in tnum_cast()
161 return !((a.value | a.mask) & (size - 1)); in tnum_is_aligned()
166 if (b.mask & ~a.mask) in tnum_in()
168 b.value &= ~a.mask; in tnum_in()
174 return snprintf(str, size, "(%#llx; %#llx)", a.value, a.mask); in tnum_strn()
184 if (a.mask & 1) in tnum_sbin()
191 a.mask >>= 1; in tnum_sbin()