I am trying to compile QuickJS, which is normally developed under linux and gcc has no problem with such code. However, I have troubles to compile this on Visual Studio 2019:
typedef unsigned __int128 uint128_t;
Does anyone know a trick to make this work as it is supposed to work?
The error is:
error C4235: Non-standard extension: The __int128 keyword is not supported for this architecture.
However, __m128 is supported, just not as unsigned, so that doesn't help with this.

__m128is defined as a union thus:Clearly it can be used for unsigned operations via its
m128_uXXmembers but it cannot be used semantically like a built-in data type - including qualifying withunsigned, and it cannot be used in built-in arithmetic operations - it requires functions/extensions defined specifically defined to operate on it. It is intended for use with SSE/SSE2 SIMD extensionsMicrosoft's implementation does not include an extension 128 bit integer type.
In terms of the QuickJS code, the problem is in the preceding libbf.h code there is:
So that for 64 bit compilation
LIMB_BITS == 64. I suggest one of two solutions:LIMB_BITS == 32__int128built-in such as Mingw64.I note that there is a QuickJS Visual Studio port here, but looking at the code and the lua script that generates the VS solution it is not immediately obvious to me how or even if this issue is resolved. The readme.md file says to download and install premake5, but the link is broken. I gave up at that point.