Skip to content

Commit

Permalink
Disable AVX512 IFMA usage on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Sep 25, 2024
1 parent 454a298 commit 0449e0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crypto/fipsmodule/cpucap/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,12 @@ OPENSSL_INLINE int CRYPTO_is_VPCLMULQDQ_capable(void) {
// 1100_0000_0010_0011_0000_0000_0000_0000
#define CPU_CAP_AVX512IFMA_BITFLAGS 0xC0230000
OPENSSL_INLINE int CRYPTO_is_AVX512IFMA_capable(void) {
#if defined(OPENSSL_WINDOWS)
return 0;
#else
return (OPENSSL_ia32cap_get()[2] & CPU_CAP_AVX512IFMA_BITFLAGS) ==
CPU_CAP_AVX512IFMA_BITFLAGS;
#endif
}

OPENSSL_INLINE int CRYPTO_is_VBMI2_capable(void) {
Expand Down

0 comments on commit 0449e0c

Please sign in to comment.