glibc/sysdeps/i386/i686/multiarch
H.J. Lu 9620398097 x86: Install <sys/platform/x86.h> [BZ #26124]
Install <sys/platform/x86.h> so that programmers can do

 #if __has_include(<sys/platform/x86.h>)
 #include <sys/platform/x86.h>
 #endif
 ...

   if (CPU_FEATURE_USABLE (SSE2))
 ...
   if (CPU_FEATURE_USABLE (AVX2))
 ...

<sys/platform/x86.h> exports only:

enum
{
  COMMON_CPUID_INDEX_1 = 0,
  COMMON_CPUID_INDEX_7,
  COMMON_CPUID_INDEX_80000001,
  COMMON_CPUID_INDEX_D_ECX_1,
  COMMON_CPUID_INDEX_80000007,
  COMMON_CPUID_INDEX_80000008,
  COMMON_CPUID_INDEX_7_ECX_1,
  /* Keep the following line at the end.  */
  COMMON_CPUID_INDEX_MAX
};

struct cpuid_features
{
  struct cpuid_registers cpuid;
  struct cpuid_registers usable;
};

struct cpu_features
{
  struct cpu_features_basic basic;
  struct cpuid_features features[COMMON_CPUID_INDEX_MAX];
};

/* Get a pointer to the CPU features structure.  */
extern const struct cpu_features *__x86_get_cpu_features
  (unsigned int max) __attribute__ ((const));

Since all feature checks are done through macros, programs compiled with
a newer <sys/platform/x86.h> are compatible with the older glibc binaries
as long as the layout of struct cpu_features is identical.  The features
array can be expanded with backward binary compatibility for both .o and
.so files.  When COMMON_CPUID_INDEX_MAX is increased to support new
processor features, __x86_get_cpu_features in the older glibc binaries
returns NULL and HAS_CPU_FEATURE/CPU_FEATURE_USABLE return false on the
new processor feature.  No new symbol version is neeeded.

Both CPU_FEATURE_USABLE and HAS_CPU_FEATURE are provided.  HAS_CPU_FEATURE
can be used to identify processor features.

Note: Although GCC has __builtin_cpu_supports, it only supports a subset
of <sys/platform/x86.h> and it is equivalent to CPU_FEATURE_USABLE.  It
doesn't support HAS_CPU_FEATURE.
2020-09-11 17:20:52 -07:00
..
bcopy-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
bcopy-sse2-unaligned.S i386: memcpy functions with SSE2 unaligned load/store 2014-12-30 07:19:38 -08:00
bcopy-ssse3-rep.S Optimize 32bit memset/memcpy with SSE2/SSSE3. 2010-01-12 11:22:03 -08:00
bcopy-ssse3.S Optimize 32bit memset/memcpy with SSE2/SSSE3. 2010-01-12 11:22:03 -08:00
bcopy.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
bzero-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
bzero-sse2-rep.S Optimize 32bit memset/memcpy with SSE2/SSSE3. 2010-01-12 11:22:03 -08:00
bzero-sse2.S Optimize 32bit memset/memcpy with SSE2/SSSE3. 2010-01-12 11:22:03 -08:00
bzero.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
ifunc-impl-list.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
ifunc-memmove.h x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
ifunc-memset.h x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
ifunc-sse2-bsf.h x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
ifunc-sse2-ssse3.h x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
ifunc-sse2.h x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
ifunc-sse4_2.h x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
ifunc-ssse3-sse4_2.h x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
locale-defines.sym SSSE3 optimized strcasecmp and strncasecmp for x86-32 2011-11-13 09:50:13 -05:00
Makefile x86: Install <sys/platform/x86.h> [BZ #26124] 2020-09-11 17:20:52 -07:00
memchr-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memchr-sse2-bsf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memchr-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memchr.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcmp-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcmp-sse4.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcmp-ssse3.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcmp.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcpy_chk-nonshared.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcpy_chk.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcpy-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcpy-sse2-unaligned.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcpy-ssse3-rep.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memcpy.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memmove_chk-nonshared.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memmove_chk.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memmove-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memmove-sse2-unaligned.S i386: memcpy functions with SSE2 unaligned load/store 2014-12-30 07:19:38 -08:00
memmove-ssse3-rep.S Optimize 32bit memset/memcpy with SSE2/SSSE3. 2010-01-12 11:22:03 -08:00
memmove-ssse3.S Optimize 32bit memset/memcpy with SSE2/SSSE3. 2010-01-12 11:22:03 -08:00
memmove.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
mempcpy_chk-nonshared.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
mempcpy_chk.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
mempcpy-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
mempcpy-sse2-unaligned.S i386: memcpy functions with SSE2 unaligned load/store 2014-12-30 07:19:38 -08:00
mempcpy-ssse3-rep.S Optimize 32bit memset/memcpy with SSE2/SSSE3. 2010-01-12 11:22:03 -08:00
mempcpy-ssse3.S Optimize 32bit memset/memcpy with SSE2/SSSE3. 2010-01-12 11:22:03 -08:00
mempcpy.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memrchr-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
memrchr-sse2-bsf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memrchr-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memrchr.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memset_chk-nonshared.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memset_chk.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memset-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memset-sse2-rep.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memset-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
memset.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
rawmemchr-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
rawmemchr-sse2-bsf.S Optimized memchr, memrchr, rawmemchr for x86-32 2011-10-12 11:42:04 -04:00
rawmemchr-sse2.S Optimized memchr, memrchr, rawmemchr for x86-32 2011-10-12 11:42:04 -04:00
rawmemchr.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
rtld-strnlen.c Fix strnlen change 2011-10-23 16:30:40 -04:00
s_fma-fma.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fma.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
s_fmaf-fma.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s_fmaf.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
sched_cpucount.c
stpcpy-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
stpcpy-sse2.S Optimized st{r,p}{,n}cpy for SSE2/SSSE3 on x86-32 2011-06-24 14:15:32 -04:00
stpcpy-ssse3.S Optimized st{r,p}{,n}cpy for SSE2/SSSE3 on x86-32 2011-06-24 14:15:32 -04:00
stpcpy.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
stpncpy-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
stpncpy-sse2.S Optimized st{r,p}{,n}cpy for SSE2/SSSE3 on x86-32 2011-06-24 14:15:32 -04:00
stpncpy-ssse3.S Optimized st{r,p}{,n}cpy for SSE2/SSSE3 on x86-32 2011-06-24 14:15:32 -04:00
stpncpy.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcasecmp_l-c.c Fix x86 strcasecmp_l (bug 13786). 2012-02-29 22:37:38 +00:00
strcasecmp_l-sse4.S Add SSE4.2 support for strcasecmp and strncasecmp on x86-32 2011-11-14 18:24:35 -05:00
strcasecmp_l-ssse3.S SSSE3 optimized strcasecmp and strncasecmp for x86-32 2011-11-13 09:50:13 -05:00
strcasecmp_l.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcasecmp-c.c SSSE3 optimized strcasecmp and strncasecmp for x86-32 2011-11-13 09:50:13 -05:00
strcasecmp.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcat-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcat-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcat-ssse3.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcat.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strchr-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strchr-sse2-bsf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strchr-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strchr.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcmp-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcmp-sse4.S i386: Remove NO_TLS_DIRECT_SEG_REFS handling 2020-05-28 11:53:08 +02:00
strcmp-ssse3.S i386: Remove NO_TLS_DIRECT_SEG_REFS handling 2020-05-28 11:53:08 +02:00
strcmp.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcpy-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcpy-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcpy.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcspn-c.c i686: Add missing IS_IN (libc) guards to vectorized strcspn 2017-06-14 14:50:11 +02:00
strcspn-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strcspn.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strlen-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strlen-sse2-bsf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strlen-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strlen.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strncase_l-c.c Fix x86 strcasecmp_l (bug 13786). 2012-02-29 22:37:38 +00:00
strncase_l-sse4.S Add SSE4.2 support for strcasecmp and strncasecmp on x86-32 2011-11-14 18:24:35 -05:00
strncase_l-ssse3.S SSSE3 optimized strcasecmp and strncasecmp for x86-32 2011-11-13 09:50:13 -05:00
strncase_l.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strncase-c.c SSSE3 optimized strcasecmp and strncasecmp for x86-32 2011-11-13 09:50:13 -05:00
strncase.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strncat-c.c Remove bits/string.h. 2017-06-20 08:21:24 -04:00
strncat-sse2.S Improve x86-32 strcat functions with SSE2/SSSE3 2011-08-04 15:33:38 -04:00
strncat-ssse3.S Improve x86-32 strcat functions with SSE2/SSSE3 2011-08-04 15:33:38 -04:00
strncat.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strncmp-c.c x86: Make strncmp usable from rtld 2018-06-12 15:00:33 +02:00
strncmp-sse4.S 32bit memcmp/strcmp/strncmp optimized for SSSE3/SSS4.2 2010-02-15 11:17:50 -08:00
strncmp-ssse3.S 32bit memcmp/strcmp/strncmp optimized for SSSE3/SSS4.2 2010-02-15 11:17:50 -08:00
strncmp.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strncpy-c.c Optimized st{r,p}{,n}cpy for SSE2/SSSE3 on x86-32 2011-06-24 14:15:32 -04:00
strncpy-sse2.S Optimized st{r,p}{,n}cpy for SSE2/SSSE3 on x86-32 2011-06-24 14:15:32 -04:00
strncpy-ssse3.S Optimized st{r,p}{,n}cpy for SSE2/SSSE3 on x86-32 2011-06-24 14:15:32 -04:00
strncpy.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strnlen-c.c Use libc_hidden_proto / libc_hidden_def with __strnlen. 2015-06-02 20:24:25 +00:00
strnlen-sse2.S Add optimized wcslen and strnlen for x86-32 2011-10-23 15:17:23 -04:00
strnlen.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strpbrk-c.c
strpbrk-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strpbrk.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strrchr-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strrchr-sse2-bsf.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strrchr-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strrchr.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strspn-c.c
strspn-ia32.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
strspn.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
varshift.c i686: Add missing IS_IN (libc) guards to vectorized strcspn 2017-06-14 14:50:11 +02:00
varshift.h Clean up SSE variable shifts 2010-08-24 11:35:01 -07:00
wcschr-c.c powerpc: Fix __wcschr static build 2015-04-15 16:01:48 -03:00
wcschr-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wcschr.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wcscmp-c.c Fix regcomp wcscoll, wcscmp namespace (bug 18497). 2015-06-09 21:07:30 +00:00
wcscmp-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wcscmp.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wcscpy-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wcscpy-ssse3.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wcscpy.c x86: Support usable check for all CPU features 2020-07-13 06:05:16 -07:00
wcslen-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wcslen-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wcslen.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wcsrchr-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wcsrchr-sse2.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wcsrchr.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wmemcmp-c.c Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wmemcmp-sse4.S Optimized memcmp and wmemcmp for x86-64 and x86-32 2011-10-15 11:10:08 -04:00
wmemcmp-ssse3.S Optimized memcmp and wmemcmp for x86-64 and x86-32 2011-10-15 11:10:08 -04:00
wmemcmp.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00