128 bit integer with c on windows?

2020-06-17 05:20发布

问题:

Is there any c compiler on windows able to use 128 bit integers natively? On example, you can use gcc on linux, with __uint128_t... any other chance on windows? (It would be great if 128 bit worked on 32 bit computers as well! :D)

Matteo

回答1:

In GCC you can try ``attribute((mode(...)))`, see here and here, e.g.

typedef unsigned int myU128 __attribute__((mode(TI)));

The results depend on your platform, though.



回答2:

You could try using SSE intrinsics built into Visual C++

http://msdn.microsoft.com/en-us/library/5eawz414%28v=VS.80%29.aspx (Look at the __m128 type).