24 #ifndef USE_NATIVE_INT128
26 #define USE_NATIVE_INT128 1
28 #define USE_NATIVE_INT128 0
64 *i128 += (int128)
x * (int128)
y;
109 #ifdef WORDS_BIGENDIAN
131 uint64 oldlo = i128->
lo;
134 if (((int64) v < 0 && (int64) oldlo < 0) ||
135 (((int64) v < 0 || (int64) oldlo < 0) && (int64) i128->
lo >= 0))
151 uint64 oldlo = i128->
lo;
156 if ((int64) oldlo < 0 && (int64) i128->
lo >= 0)
161 if (!((int64) oldlo < 0 || (int64) i128->
lo >= 0))
170 #define INT64_AU32(i64) ((i64) >> 32)
171 #define INT64_AL32(i64) ((i64) & UINT64CONST(0xFFFFFFFF))
181 "arithmetic right shift is needed");
202 if (
x != 0 &&
y != 0)
211 i128->
hi += x_u32 * y_u32;
218 i128->
hi += ((uint64) tmp) >> 32;
226 i128->
hi += ((uint64) tmp) >> 32;
260 val.hi = (v < 0) ? -INT64CONST(1) : INT64CONST(0);
271 return (int64)
val.lo;
#define StaticAssertDecl(condition, errmessage)
static void int128_add_uint64(INT128 *i128, uint64 v)
static int int128_compare(INT128 x, INT128 y)
static INT128 int64_to_int128(int64 v)
static void int128_add_int64(INT128 *i128, int64 v)
static int64 int128_to_int64(INT128 val)
static void int128_add_int64_mul_int64(INT128 *i128, int64 x, int64 y)