mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-28 22:39:54 +01:00
Starting with GCC 9 or clang 9, we can actually use <immintrin.h> without any problems. We only have to flag such functions where such instructions are being used. The benefit of using intrinsic functions over inline assembler is that the compiler is given more flexibility. In particular, clang -fsanitize=memory (MemorySanitizer, MSAN) will not raise bogus alarms about memory being uninitialized. Both intrinsic functions are available starting with GCC 5 and clang 3.8. The RDRAND wrapper is available starting with clang 3.7 via <immintrin.h>. Before GCC 9 and clang 9, the RDSEED wrapper is not available via <immintrin.h> but via <x86intrin.h>, and only after jumping through some hoops to enable it.