Message ID | 20221002123424.3079805-2-aurelien@aurel32.net |
---|---|
State | New |
Headers | show |
Series | x86: Fix AVX2 string functions requiring BMI1, BMI2 or LZCNT (BZ #29611) | expand |
On Sun, Oct 2, 2022 at 8:34 AM Aurelien Jarno <aurelien@aurel32.net> wrote: > > The "System V Application Binary Interface AMD64 Architecture Processor > Supplement" mandates the BMI1 and BMI2 CPU features for the x86-64-v3 > level. > --- > sysdeps/x86/get-isa-level.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sysdeps/x86/get-isa-level.h b/sysdeps/x86/get-isa-level.h > index 1ade78ab73..5b4dd5f062 100644 > --- a/sysdeps/x86/get-isa-level.h > +++ b/sysdeps/x86/get-isa-level.h > @@ -47,6 +47,8 @@ get_isa_level (const struct cpu_features *cpu_features) > isa_level |= GNU_PROPERTY_X86_ISA_1_V2; > if (CPU_FEATURE_USABLE_P (cpu_features, AVX) > && CPU_FEATURE_USABLE_P (cpu_features, AVX2) > + && CPU_FEATURE_USABLE_P (cpu_features, BMI1) > + && CPU_FEATURE_USABLE_P (cpu_features, BMI2) > && CPU_FEATURE_USABLE_P (cpu_features, F16C) > && CPU_FEATURE_USABLE_P (cpu_features, FMA) > && CPU_FEATURE_USABLE_P (cpu_features, LZCNT) > -- > 2.35.1 > LGTM.
diff --git a/sysdeps/x86/get-isa-level.h b/sysdeps/x86/get-isa-level.h index 1ade78ab73..5b4dd5f062 100644 --- a/sysdeps/x86/get-isa-level.h +++ b/sysdeps/x86/get-isa-level.h @@ -47,6 +47,8 @@ get_isa_level (const struct cpu_features *cpu_features) isa_level |= GNU_PROPERTY_X86_ISA_1_V2; if (CPU_FEATURE_USABLE_P (cpu_features, AVX) && CPU_FEATURE_USABLE_P (cpu_features, AVX2) + && CPU_FEATURE_USABLE_P (cpu_features, BMI1) + && CPU_FEATURE_USABLE_P (cpu_features, BMI2) && CPU_FEATURE_USABLE_P (cpu_features, F16C) && CPU_FEATURE_USABLE_P (cpu_features, FMA) && CPU_FEATURE_USABLE_P (cpu_features, LZCNT)