diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-03-17 11:38:13 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-03-17 11:38:13 -0700 |
commit | b170d2e7ab998180abbd24fdd6c03ecb4293d000 (patch) | |
tree | c0a40c921b23042f341f08a5c9397e7f18a5b0af /sysdeps/x86 | |
parent | 20409ce5e806c7d2fba103d6b88b5a0c2f2fbf5a (diff) | |
download | glibc-b170d2e7ab998180abbd24fdd6c03ecb4293d000.tar.gz glibc-b170d2e7ab998180abbd24fdd6c03ecb4293d000.tar.xz glibc-b170d2e7ab998180abbd24fdd6c03ecb4293d000.zip |
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.
Diffstat (limited to 'sysdeps/x86')
-rw-r--r-- | sysdeps/x86/cpu-features.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index 4e8f179000..33788ed323 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -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: |