From 669184b4f33421037dae51f87a15794198566295 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 13 Sep 2021 17:05:29 -0700 Subject: Include immintrin.h instead of wmmintrin.h (#1015) immintrin.h is the de-factor standard header for clang and GCC to include Intel intrinsics. Using this header avoids requiring the compiler to use the `-maes` and `-msse4.1` compiler options on systems that may not have AES or SSE instruction support. clang: As seen in https://github.com/llvm-mirror/clang/blob/master/lib/Headers/immintrin.h, specific intrinsic header files are conditionally included depending on whether the feature is available. gcc: As seen in https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/immintrin.h, gcc includes all intrinsic header files, but each individual file guards against the feature not being available. This came out of an investigation in https://github.com/grpc/grpc/pull/27121. --- absl/random/internal/randen_hwaes.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'absl/random') diff --git a/absl/random/internal/randen_hwaes.cc b/absl/random/internal/randen_hwaes.cc index 3040b3a7..fee6677c 100644 --- a/absl/random/internal/randen_hwaes.cc +++ b/absl/random/internal/randen_hwaes.cc @@ -211,7 +211,7 @@ inline ABSL_TARGET_CRYPTO void SwapEndian(void*) {} #elif defined(ABSL_ARCH_X86_64) || defined(ABSL_ARCH_X86_32) // On x86 we rely on the aesni instructions -#include +#include namespace { -- cgit v1.2.3