diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-06-05 06:42:20 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-07-23 05:12:51 -0700 |
commit | 7c124e3714c38157230ed1a5d743b37defe64dc2 (patch) | |
tree | f1e13e18239c4421675234b56d880ae081d4bdcd /sysdeps/x86/tst-ifunc-isa.h | |
parent | 5b8d271571434a74b2464c278eafe2ff81f31029 (diff) | |
download | glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.tar.gz glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.tar.xz glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.zip |
x86: Install <bits/platform/x86.h> [BZ #27958]
1. Install <bits/platform/x86.h> for <sys/platform/x86.h> which includes <bits/platform/x86.h>. 2. Rename HAS_CPU_FEATURE to CPU_FEATURE_PRESENT which checks if the processor has the feature. 3. Rename CPU_FEATURE_USABLE to CPU_FEATURE_ACTIVE which checks if the feature is active. There may be other preconditions, like sufficient stack space or further setup for AMX, which must be satisfied before the feature can be used. This fixes BZ #27958. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/x86/tst-ifunc-isa.h')
-rw-r--r-- | sysdeps/x86/tst-ifunc-isa.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/x86/tst-ifunc-isa.h b/sysdeps/x86/tst-ifunc-isa.h index 6d906966a7..85616e29ad 100644 --- a/sysdeps/x86/tst-ifunc-isa.h +++ b/sysdeps/x86/tst-ifunc-isa.h @@ -1,4 +1,4 @@ -/* IFUNC resolver with CPU_FEATURE_USABLE. +/* IFUNC resolver with CPU_FEATURE_ACTIVE. Copyright (C) 2021 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -32,15 +32,15 @@ enum isa __attribute__ ((__optimize__ ("-fno-stack-protector"))) get_isa (void) { - if (CPU_FEATURE_USABLE (AVX512F)) + if (CPU_FEATURE_ACTIVE (AVX512F)) return avx512f; - if (CPU_FEATURE_USABLE (AVX2)) + if (CPU_FEATURE_ACTIVE (AVX2)) return avx2; - if (CPU_FEATURE_USABLE (AVX)) + if (CPU_FEATURE_ACTIVE (AVX)) return avx; - if (CPU_FEATURE_USABLE (SSE4_2)) + if (CPU_FEATURE_ACTIVE (SSE4_2)) return sse4_2; - if (CPU_FEATURE_USABLE (SSE2)) + if (CPU_FEATURE_ACTIVE (SSE2)) return sse2; return none; } |