diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sail.c | 11 | ||||
| -rw-r--r-- | lib/sail.h | 4 |
2 files changed, 15 insertions, 0 deletions
@@ -134,6 +134,12 @@ void concat_str(sail_string *stro, const sail_string str1, const sail_string str /* ***** Sail integers ***** */ +inline +bool EQUAL(mach_int)(const mach_int op1, const mach_int op2) +{ + return op1 == op2; +} + #ifndef USE_INT128 inline @@ -341,6 +347,11 @@ void pow2(sail_int *rop, const sail_int exp) { /* ***** Sail bitvectors ***** */ +bool EQUAL(mach_bits)(const mach_bits op1, const mach_bits op2) +{ + return op1 == op2; +} + void CREATE(sail_bits)(sail_bits *rop) { rop->bits = malloc(sizeof(mpz_t)); @@ -82,6 +82,8 @@ void concat_str(sail_string *stro, const sail_string str1, const sail_string str typedef int64_t mach_int; +bool EQUAL(mach_int)(const mach_int, const mach_int); + /* * Integers can be either stack-allocated as 128-bit integers if * __int128 is available, or use GMP arbitrary precision @@ -165,6 +167,8 @@ typedef uint64_t mach_bits; bool eq_bit(const mach_bits a, const mach_bits b); +bool EQUAL(mach_bits)(const mach_bits, const mach_bits); + typedef struct { mp_bitcnt_t len; mpz_t *bits; |
