mafrasi2
mafrasi2

Reputation: 322

LLVM frontend supporting large integers

I'm currently looking for an LLVM frontend that supports large integers like i128, i256 and i512. As far as I know rust and clang support i128, but nothing above.

Does such a frontend exist already or do I have to make my own?

Upvotes: 1

Views: 296

Answers (1)

Artyer
Artyer

Reputation: 40881

Recently added into clang (In the upcoming Clang 12) is _ExtInt(N), implementing N2472 in C and C++.

Basically, the types _ExtInt(N) and unsigned _ExtInt(N) expose iN for arbitrary N in llvm. So you could use these:

typedef _ExtInt(256) i256;
typedef _ExtInt(512) i512;

in the C or C++ frontends.

Upvotes: 1

Related Questions