Skip to content

Commit

Permalink
Runtime: avoid using _BitInt(256) on systems that only support 128 bi…
Browse files Browse the repository at this point in the history
…t ints
  • Loading branch information
alastairreid committed Jan 2, 2025
1 parent 5a6e1b2 commit 3b883b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/include/asl/runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <stdio.h>
#include <stdint.h>
#include <limits.h>

// The following types are used in the foreign function interface
typedef __int128 ASL_int_t;
Expand All @@ -20,8 +21,12 @@ typedef uint16_t ASL_bits16_t;
typedef uint32_t ASL_bits32_t;
typedef uint64_t ASL_bits64_t;
typedef unsigned __int128 ASL_bits128_t;
#if BITINT_MAXWIDTH >= 256
typedef unsigned _BitInt(256) ASL_bits256_t;
#endif
#if BITINT_MAXWIDTH >= 256
typedef unsigned _BitInt(512) ASL_bits512_t;
#endif

#define ASL_cast_bits_512_64(x) ((ASL_bits64_t)(x))
#define ASL_cast_bits_256_64(x) ((ASL_bits64_t)(x))
Expand Down

0 comments on commit 3b883b5

Please sign in to comment.