File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 5
5
6
6
typedef u64 ttype ;
7
7
8
+ // https://stackoverflow.com/questions/16088282/is-there-a-128-bit-integer-in-gcc
9
+ // gcc: 128-bit ints only available on 64-bit platforms, not 32-bit
10
+ #ifdef __SIZEOF_INT128__
8
11
// GCC only??
9
12
typedef __int128 int128_t ;
10
13
typedef unsigned __int128 uint128_t ;
11
14
static const uint128_t UINT128_MAX = (uint128_t )((int128_t )(-1L ));
12
-
13
15
#define BIGTTYPE uint128_t
14
16
#define BIGTTYPE_MAX UINT128_MAX
15
17
typedef uint128_t bigttype ;
16
18
19
+ #else
20
+ // Fall back to using just 64-bit types. This *should* still work okay, because
21
+ // we're careful to check the max possible value before using BIGT types; search
22
+ // for "use_tmath" in the code.
23
+ #define BIGTTYPE uint64_t
24
+ #define BIGTTYPE_MAX UINT64_MAX
25
+ typedef uint64_t bigttype ;
26
+
27
+ #endif
28
+
17
29
#define TTYPE_INTEGER 1
18
30
19
31
#define TTYPE_MIN 0
You can’t perform that action at this time.
0 commit comments