Lines Matching defs:tnum

0 /* tnum: tracked (or tristate) numbers
3 * A tnum tracks knowledge about the bits of a value. Each bit can be either
5 * propagate the unknown bits such that the tnum result represents all the
14 struct tnum {
20 /* Represent a known constant as a tnum. */
21 struct tnum tnum_const(u64 value);
23 extern const struct tnum tnum_unknown;
30 struct tnum tnum_range(u64 min, u64 max);
33 /* Shift a tnum left (by a fixed shift) */
34 struct tnum tnum_lshift(struct tnum a, u8 shift);
35 /* Shift (rsh) a tnum right (by a fixed shift) */
36 struct tnum tnum_rshift(struct tnum a, u8 shift);
37 /* Shift (arsh) a tnum right (by a fixed min_shift) */
38 struct tnum tnum_arshift(struct tnum a, u8 min_shift, u8 insn_bitness);
40 struct tnum tnum_add(struct tnum a, struct tnum b);
42 struct tnum tnum_sub(struct tnum a, struct tnum b);
44 struct tnum tnum_and(struct tnum a, struct tnum b);
46 struct tnum tnum_or(struct tnum a, struct tnum b);
48 struct tnum tnum_xor(struct tnum a, struct tnum b);
50 struct tnum tnum_mul(struct tnum a, struct tnum b);
52 /* Return a tnum representing numbers satisfying both @a and @b */
53 struct tnum tnum_intersect(struct tnum a, struct tnum b);
56 struct tnum tnum_cast(struct tnum a, u8 size);
59 static inline bool tnum_is_const(struct tnum a)
65 static inline bool tnum_equals_const(struct tnum a, u64 b)
71 static inline bool tnum_is_unknown(struct tnum a)
79 bool tnum_is_aligned(struct tnum a, u64 size);
84 * return true unexpectedly due to tnum limited ability to represent tight
93 bool tnum_in(struct tnum a, struct tnum b);
100 /* Format a tnum as a pair of hex numbers (value; mask) */
101 int tnum_strn(char *str, size_t size, struct tnum a);
102 /* Format a tnum as tristate binary expansion */
103 int tnum_sbin(char *str, size_t size, struct tnum a);
106 struct tnum tnum_subreg(struct tnum a);
107 /* Returns the tnum with the lower 32-bit subreg cleared */
108 struct tnum tnum_clear_subreg(struct tnum a);
109 /* Returns the tnum with the lower 32-bit subreg in *reg* set to the lower
112 struct tnum tnum_with_subreg(struct tnum reg, struct tnum subreg);
113 /* Returns the tnum with the lower 32-bit subreg set to value */
114 struct tnum tnum_const_subreg(struct tnum a, u32 value);
116 static inline bool tnum_subreg_is_const(struct tnum a)