RDRAND and RDSEED intrinsics on various compilers?

Both GCC and Intel compiler support them. GCC support was introduced at the end of 2010. They require the header <immintrin.h>.

GCC support has been present since at least version 4.6, but there doesn’t seem to be any specific compile-time constant – you can just check __GNUC_MAJOR__ > 4 || (__GNUC_MAJOR__ == 4 && __GNUC_MINOR__ >= 6).

Leave a Comment