Lines Matching refs:b
32 static inline bool u16_add_overflow(uint16_t a, uint16_t b, uint16_t *result) in u16_add_overflow() argument
34 return __builtin_add_overflow(a, b, result); in u16_add_overflow()
37 static inline bool u32_add_overflow(uint32_t a, uint32_t b, uint32_t *result) in u32_add_overflow() argument
39 return __builtin_add_overflow(a, b, result); in u32_add_overflow()
42 static inline bool u64_add_overflow(uint64_t a, uint64_t b, uint64_t *result) in u64_add_overflow() argument
44 return __builtin_add_overflow(a, b, result); in u64_add_overflow()
47 static inline bool size_add_overflow(size_t a, size_t b, size_t *result) in size_add_overflow() argument
49 return __builtin_add_overflow(a, b, result); in size_add_overflow()
52 static inline bool u16_add_overflow(uint16_t a, uint16_t b, uint16_t *result) in u16_add_overflow() argument
54 uint16_t c = a + b; in u16_add_overflow()
61 static inline bool u32_add_overflow(uint32_t a, uint32_t b, uint32_t *result) in u32_add_overflow() argument
63 uint32_t c = a + b; in u32_add_overflow()
70 static inline bool u64_add_overflow(uint64_t a, uint64_t b, uint64_t *result) in u64_add_overflow() argument
72 uint64_t c = a + b; in u64_add_overflow()
79 static inline bool size_add_overflow(size_t a, size_t b, size_t *result) in size_add_overflow() argument
81 size_t c = a + b; in size_add_overflow()
90 static inline bool u16_mul_overflow(uint16_t a, uint16_t b, uint16_t *result) in u16_mul_overflow() argument
92 return __builtin_mul_overflow(a, b, result); in u16_mul_overflow()
95 static inline bool u32_mul_overflow(uint32_t a, uint32_t b, uint32_t *result) in u32_mul_overflow() argument
97 return __builtin_mul_overflow(a, b, result); in u32_mul_overflow()
100 static inline bool u64_mul_overflow(uint64_t a, uint64_t b, uint64_t *result) in u64_mul_overflow() argument
102 return __builtin_mul_overflow(a, b, result); in u64_mul_overflow()
105 static inline bool size_mul_overflow(size_t a, size_t b, size_t *result) in size_mul_overflow() argument
107 return __builtin_mul_overflow(a, b, result); in size_mul_overflow()
110 static inline bool u16_mul_overflow(uint16_t a, uint16_t b, uint16_t *result) in u16_mul_overflow() argument
112 uint16_t c = a * b; in u16_mul_overflow()
116 return a != 0 && (c / a) != b; in u16_mul_overflow()
119 static inline bool u32_mul_overflow(uint32_t a, uint32_t b, uint32_t *result) in u32_mul_overflow() argument
121 uint32_t c = a * b; in u32_mul_overflow()
125 return a != 0 && (c / a) != b; in u32_mul_overflow()
128 static inline bool u64_mul_overflow(uint64_t a, uint64_t b, uint64_t *result) in u64_mul_overflow() argument
130 uint64_t c = a * b; in u64_mul_overflow()
134 return a != 0 && (c / a) != b; in u64_mul_overflow()
137 static inline bool size_mul_overflow(size_t a, size_t b, size_t *result) in size_mul_overflow() argument
139 size_t c = a * b; in size_mul_overflow()
143 return a != 0 && (c / a) != b; in size_mul_overflow()
195 int b; in u32_count_leading_zeros() local
197 for (b = 0; b < 32 && (x >> 31) == 0; b++) { in u32_count_leading_zeros()
201 return b; in u32_count_leading_zeros()
229 int b; in u32_count_trailing_zeros() local
231 for (b = 0; b < 32 && (x & 1) == 0; b++) { in u32_count_trailing_zeros()
235 return b; in u32_count_trailing_zeros()