69#if defined(HAVE__BUILTIN_OP_OVERFLOW)
70 return __builtin_add_overflow(
a,
b, result);
87#if defined(HAVE__BUILTIN_OP_OVERFLOW)
88 return __builtin_sub_overflow(
a,
b, result);
105#if defined(HAVE__BUILTIN_OP_OVERFLOW)
106 return __builtin_mul_overflow(
a,
b, result);
123#if defined(HAVE__BUILTIN_OP_OVERFLOW)
124 return __builtin_sub_overflow(0,
a, result);
153#if defined(HAVE__BUILTIN_OP_OVERFLOW)
154 return __builtin_add_overflow(
a,
b, result);
171#if defined(HAVE__BUILTIN_OP_OVERFLOW)
172 return __builtin_sub_overflow(
a,
b, result);
189#if defined(HAVE__BUILTIN_OP_OVERFLOW)
190 return __builtin_mul_overflow(
a,
b, result);
207#if defined(HAVE__BUILTIN_OP_OVERFLOW)
208 return __builtin_sub_overflow(0,
a, result);
237#if defined(HAVE__BUILTIN_OP_OVERFLOW)
238 return __builtin_add_overflow(
a,
b, result);
239#elif defined(HAVE_INT128)
240 int128
res = (int128)
a + (int128)
b;
264#if defined(HAVE__BUILTIN_OP_OVERFLOW)
265 return __builtin_sub_overflow(
a,
b, result);
266#elif defined(HAVE_INT128)
267 int128
res = (int128)
a - (int128)
b;
295#if defined(HAVE__BUILTIN_OP_OVERFLOW)
296 return __builtin_mul_overflow(
a,
b, result);
297#elif defined(HAVE_INT128)
298 int128
res = (int128)
a * (int128)
b;
321 a != 0 &&
a != 1 &&
b != 0 &&
b != 1 &&
338#if defined(HAVE__BUILTIN_OP_OVERFLOW)
339 return __builtin_sub_overflow(0,
a, result);
370#if defined(HAVE__BUILTIN_OP_OVERFLOW)
371 return __builtin_add_overflow(
a,
b, result);
388#if defined(HAVE__BUILTIN_OP_OVERFLOW)
389 return __builtin_sub_overflow(
a,
b, result);
404#if defined(HAVE__BUILTIN_OP_OVERFLOW)
405 return __builtin_mul_overflow(
a,
b, result);
422#if defined(HAVE__BUILTIN_OP_OVERFLOW)
423 return __builtin_sub_overflow(0,
a, result);
443#if defined(HAVE__BUILTIN_OP_OVERFLOW)
444 return __builtin_add_overflow(
a,
b, result);
461#if defined(HAVE__BUILTIN_OP_OVERFLOW)
462 return __builtin_sub_overflow(
a,
b, result);
477#if defined(HAVE__BUILTIN_OP_OVERFLOW)
478 return __builtin_mul_overflow(
a,
b, result);
495#if defined(HAVE__BUILTIN_OP_OVERFLOW)
496 return __builtin_sub_overflow(0,
a, result);
516#if defined(HAVE__BUILTIN_OP_OVERFLOW)
517 return __builtin_add_overflow(
a,
b, result);
534#if defined(HAVE__BUILTIN_OP_OVERFLOW)
535 return __builtin_sub_overflow(
a,
b, result);
550#if defined(HAVE__BUILTIN_OP_OVERFLOW)
551 return __builtin_mul_overflow(
a,
b, result);
552#elif defined(HAVE_INT128)
553 uint128
res = (uint128)
a * (uint128)
b;
565 if (
a != 0 &&
b !=
res /
a)
578#if defined(HAVE__BUILTIN_OP_OVERFLOW)
579 return __builtin_sub_overflow(0,
a, result);
580#elif defined(HAVE_INT128)
581 int128
res = -((int128)
a);
648 return (
a >
b) - (
a <
b);
654 return (
a >
b) - (
a <
b);
660 return (
a >
b) - (
a <
b);
666 return (
a >
b) - (
a <
b);
672 return (
a >
b) - (
a <
b);
static void PGresult * res
static bool pg_mul_s64_overflow(int64 a, int64 b, int64 *result)
static bool pg_neg_s32_overflow(int32 a, int32 *result)
static int pg_cmp_s16(int16 a, int16 b)
static uint64 pg_abs_s64(int64 a)
static bool pg_sub_u32_overflow(uint32 a, uint32 b, uint32 *result)
static int pg_cmp_u32(uint32 a, uint32 b)
static bool pg_add_u32_overflow(uint32 a, uint32 b, uint32 *result)
static bool pg_neg_s16_overflow(int16 a, int16 *result)
static bool pg_sub_s64_overflow(int64 a, int64 b, int64 *result)
static bool pg_add_u64_overflow(uint64 a, uint64 b, uint64 *result)
static int pg_cmp_u16(uint16 a, uint16 b)
static bool pg_neg_u32_overflow(uint32 a, int32 *result)
static bool pg_sub_s16_overflow(int16 a, int16 b, int16 *result)
static bool pg_neg_u16_overflow(uint16 a, int16 *result)
static bool pg_neg_s64_overflow(int64 a, int64 *result)
static bool pg_mul_s32_overflow(int32 a, int32 b, int32 *result)
static bool pg_mul_u16_overflow(uint16 a, uint16 b, uint16 *result)
static bool pg_mul_u32_overflow(uint32 a, uint32 b, uint32 *result)
static bool pg_mul_s16_overflow(int16 a, int16 b, int16 *result)
static int pg_cmp_s64(int64 a, int64 b)
static bool pg_mul_u64_overflow(uint64 a, uint64 b, uint64 *result)
static bool pg_sub_u16_overflow(uint16 a, uint16 b, uint16 *result)
static bool pg_add_u16_overflow(uint16 a, uint16 b, uint16 *result)
static bool pg_add_s16_overflow(int16 a, int16 b, int16 *result)
static uint32 pg_abs_s32(int32 a)
static int pg_cmp_s32(int32 a, int32 b)
static int pg_cmp_u64(uint64 a, uint64 b)
static int pg_cmp_size(size_t a, size_t b)
static uint16 pg_abs_s16(int16 a)
static bool pg_sub_s32_overflow(int32 a, int32 b, int32 *result)
static bool pg_neg_u64_overflow(uint64 a, int64 *result)
static bool pg_add_s64_overflow(int64 a, int64 b, int64 *result)
static bool pg_sub_u64_overflow(uint64 a, uint64 b, uint64 *result)
static bool pg_add_s32_overflow(int32 a, int32 b, int32 *result)