diff options
Diffstat (limited to 'sysdeps/x86_64/multiarch/init-arch.c')
-rw-r--r-- | sysdeps/x86_64/multiarch/init-arch.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c index 4fabbee06d..76d146c1f0 100644 --- a/sysdeps/x86_64/multiarch/init-arch.c +++ b/sysdeps/x86_64/multiarch/init-arch.c @@ -147,13 +147,13 @@ __init_cpu_features (void) if (__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & bit_AVX) { /* Reset the AVX bit in case OSXSAVE is disabled. */ - if ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & bit_OSXSAVE) == 0 - || ({ unsigned int xcrlow; - unsigned int xcrhigh; - asm ("xgetbv" - : "=a" (xcrlow), "=d" (xcrhigh) : "c" (0)); - (xcrlow & 6) != 6; })) - __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx &= ~bit_AVX; + if ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & bit_OSXSAVE) != 0 + && ({ unsigned int xcrlow; + unsigned int xcrhigh; + asm ("xgetbv" + : "=a" (xcrlow), "=d" (xcrhigh) : "c" (0)); + (xcrlow & 6) == 6; })) + __cpu_features.feature[index_YMM_Usable] |= bit_YMM_Usable; } __cpu_features.family = family; |