Lines Matching refs:b

106 #define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)  argument
160 #define INT_ADD_RANGE_OVERFLOW(a, b, min, max) \ argument
161 ((b) < 0 \
162 ? (a) < (min) - (b) \
163 : (max) - (b) < (a))
167 #define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max) \ argument
168 ((b) < 0 \
169 ? (max) + (b) < (a) \
170 : (a) < (min) + (b))
183 #define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \ argument
184 ((b) < 0 \
186 ? (a) < (max) / (b) \
187 : (b) == -1 \
189 : (min) / (b) < (a)) \
190 : (b) == 0 \
193 ? (a) < (min) / (b) \
194 : (max) / (b) < (a)))
198 #define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max) \ argument
199 ((min) < 0 && (b) == -1 && (a) < - (max))
206 #define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max) \ argument
207 INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max)
216 #define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max) \ argument
218 ? (a) < (min) >> (b) \
219 : (max) >> (b) < (a))
236 # define _GL_ADD_OVERFLOW(a, b, min, max) \ argument
237 __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
238 # define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ argument
239 __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
240 # define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ argument
241 __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
243 # define _GL_ADD_OVERFLOW(a, b, min, max) \ argument
244 ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \
245 : (a) < 0 ? (b) <= (a) + (b) \
246 : (b) < 0 ? (a) <= (a) + (b) \
247 : (a) + (b) < (b))
248 # define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ argument
249 ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \
251 : (b) < 0 ? (a) - (b) <= (a) \
252 : (a) < (b))
253 # define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ argument
254 (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \
255 || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
257 #define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ argument
258 ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
259 : (a) < 0 ? (b) <= (a) + (b) - 1 \
260 : (b) < 0 && (a) + (b) <= (a))
261 #define _GL_REMAINDER_OVERFLOW(a, b, min, max) \ argument
262 ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
263 : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \
264 : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max))
270 #define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) \ argument
271 (((b) < -_GL_SIGNED_INT_MAXIMUM (b) \
272 ? (_GL_SIGNED_INT_MAXIMUM (b) == (max) \
274 : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1)) \
275 : (a) % - (b)) \
317 #define INT_ADD_OVERFLOW(a, b) \ argument
318 _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
319 #define INT_SUBTRACT_OVERFLOW(a, b) \ argument
320 _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
327 #define INT_MULTIPLY_OVERFLOW(a, b) \ argument
328 _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
329 #define INT_DIVIDE_OVERFLOW(a, b) \ argument
330 _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW)
331 #define INT_REMAINDER_OVERFLOW(a, b) \ argument
332 _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW)
333 #define INT_LEFT_SHIFT_OVERFLOW(a, b) \ argument
334 INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \
341 #define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \ argument
342 op_result_overflow (a, b, \
343 _GL_INT_MINIMUM (0 * (b) + (a)), \
344 _GL_INT_MAXIMUM (0 * (b) + (a)))
348 #define INT_ADD_WRAPV(a, b, r) \ argument
349 _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW)
350 #define INT_SUBTRACT_WRAPV(a, b, r) \ argument
351 _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW)
352 #define INT_MULTIPLY_WRAPV(a, b, r) \ argument
353 _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
372 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) argument
374 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ argument
378 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
381 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
384 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
387 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
390 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
393 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ argument
395 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
398 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
401 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
403 : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
405 # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ argument
407 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
409 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
412 # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ argument
413 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
422 #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ argument
423 (sizeof ((a) op (b)) < sizeof (t) \
424 ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \
425 : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax))
426 #define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \ argument
427 ((overflow (a, b) \
428 || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \
429 || (tmax) < ((a) op (b))) \
430 ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
431 : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
450 #define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \ argument
451 ((t) ((ut) (a) op (ut) (b)))