From: H.J. Lu Date: Sun, 29 Jul 2018 13:08:59 +0000 (-0700) Subject: x86: Correct index_cpu_LZCNT [BZ #23456] X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86e0996b1a02b3b46185f5fd28b78f0223956008;p=thirdparty%2Fglibc.git x86: Correct index_cpu_LZCNT [BZ #23456] cpu-features.h has #define bit_cpu_LZCNT (1 << 5) #define index_cpu_LZCNT COMMON_CPUID_INDEX_1 #define reg_LZCNT But the LZCNT feature bit is in COMMON_CPUID_INDEX_80000001: Initial EAX Value: 80000001H ECX Extended Processor Signature and Feature Bits: Bit 05: LZCNT available index_cpu_LZCNT should be COMMON_CPUID_INDEX_80000001, not COMMON_CPUID_INDEX_1. The VMX feature bit is in COMMON_CPUID_INDEX_1: Initial EAX Value: 01H Feature Information Returned in the ECX Register: 5 VMX Reviewed-by: Carlos O'Donell [BZ #23456] * sysdeps/x86/cpu-features.h (index_cpu_LZCNT): Set to COMMON_CPUID_INDEX_80000001. (cherry picked from commit 65d87ade1ee6f3ac099105e3511bd09bdc24cf3f) --- diff --git a/ChangeLog b/ChangeLog index 39d910f3e21..831579524d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-07-29 H.J. Lu + + [BZ #23456] + * sysdeps/x86/cpu-features.h (index_cpu_LZCNT): Set to + COMMON_CPUID_INDEX_80000001. + 2018-07-06 Florian Weimer * conform/conformtest.pl (checknamespace): Escape literal braces diff --git a/NEWS b/NEWS index fa6218105ac..e0c11b1ea96 100644 --- a/NEWS +++ b/NEWS @@ -147,6 +147,7 @@ The following bugs are resolved with this release: [23313] libio: Disable vtable validation in case of interposition [23349] Various glibc headers no longer compatible with [23363] stdio-common/tst-printf.c has non-free license + [23456] Wrong index_cpu_LZCNT Version 2.26 diff --git a/sysdeps/x86/cpu-features.h b/sysdeps/x86/cpu-features.h index 1d88f7a68c1..a6fae060143 100644 --- a/sysdeps/x86/cpu-features.h +++ b/sysdeps/x86/cpu-features.h @@ -292,7 +292,7 @@ extern const struct cpu_features *__get_cpu_features (void) # define index_cpu_HTT COMMON_CPUID_INDEX_1 # define index_cpu_BMI1 COMMON_CPUID_INDEX_7 # define index_cpu_BMI2 COMMON_CPUID_INDEX_7 -# define index_cpu_LZCNT COMMON_CPUID_INDEX_1 +# define index_cpu_LZCNT COMMON_CPUID_INDEX_80000001 # define index_cpu_MOVBE COMMON_CPUID_INDEX_1 # define index_cpu_POPCNT COMMON_CPUID_INDEX_1