mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 04:50:07 +00:00
Use CPU_FEATURES_CPU_P to check if AVX is available
Don't use bit_cpu_AVX directly. * sysdeps/x86/cpu-features.c (init_cpu_features): Check AVX with CPU_FEATURES_CPU_P.
This commit is contained in:
parent
20409ce5e8
commit
b170d2e7ab
@ -1,3 +1,8 @@
|
||||
2017-03-17 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* sysdeps/x86/cpu-features.c (init_cpu_features): Check AVX with
|
||||
CPU_FEATURES_CPU_P.
|
||||
|
||||
2017-03-17 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
[BZ #21259]
|
||||
|
@ -126,7 +126,6 @@ init_cpu_features (struct cpu_features *cpu_features)
|
||||
|
||||
if (family == 0x06)
|
||||
{
|
||||
ecx = cpu_features->cpuid[COMMON_CPUID_INDEX_1].ecx;
|
||||
model += extended_model;
|
||||
switch (model)
|
||||
{
|
||||
@ -176,7 +175,7 @@ init_cpu_features (struct cpu_features *cpu_features)
|
||||
default:
|
||||
/* Unknown family 0x06 processors. Assuming this is one
|
||||
of Core i3/i5/i7 processors if AVX is available. */
|
||||
if ((ecx & bit_cpu_AVX) == 0)
|
||||
if (!CPU_FEATURES_CPU_P (cpu_features, AVX))
|
||||
break;
|
||||
|
||||
case 0x1a:
|
||||
|
Loading…
Reference in New Issue
Block a user