08c3a6
commit c51d8d383cfb92142b86d8d1822159f3bea10d16
08c3a6
Author: Noah Goldstein <goldstein.w.n@gmail.com>
08c3a6
Date:   Thu Jun 16 15:01:08 2022 -0700
08c3a6
08c3a6
    x86: Add BMI1/BMI2 checks for ISA_V3 check
08c3a6
    
08c3a6
    BMI1/BMI2 are part of the ISA V3 requirements:
08c3a6
    https://en.wikipedia.org/wiki/X86-64
08c3a6
    
08c3a6
    And defined by GCC when building with `-march=x86-64-v3`
08c3a6
    
08c3a6
    (cherry picked from commit 8da9f346cb2051844348785b8a932ec44489e0b7)
08c3a6
08c3a6
diff --git a/sysdeps/x86/isa-level.c b/sysdeps/x86/isa-level.c
08c3a6
index 49ef4aa6122072cf..07815381122c94c3 100644
08c3a6
--- a/sysdeps/x86/isa-level.c
08c3a6
+++ b/sysdeps/x86/isa-level.c
08c3a6
@@ -47,7 +47,8 @@
08c3a6
 # endif
08c3a6
 
08c3a6
 # if ISA_V2 && defined __AVX__ && defined __AVX2__ && defined __F16C__ \
08c3a6
-     && defined __FMA__ && defined __LZCNT__ && defined HAVE_X86_MOVBE
08c3a6
+     && defined __FMA__ && defined __LZCNT__ && defined HAVE_X86_MOVBE \
08c3a6
+     && defined __BMI__ && defined __BMI2__
08c3a6
 /* NB: ISAs in x86-64 ISA level v3 are used.  */
08c3a6
 #  define ISA_V3	GNU_PROPERTY_X86_ISA_1_V3
08c3a6
 # else