glibc/sysdeps/unix/sysv/linux/i386
H.J. Lu ff6d62e9ed <sys/platform/x86.h>: Remove the C preprocessor magic
In <sys/platform/x86.h>, define CPU features as enum instead of using
the C preprocessor magic to make it easier to wrap this functionality
in other languages.  Move the C preprocessor magic to internal header
for better GCC codegen when more than one features are checked in a
single expression as in x86-64 dl-hwcaps-subdirs.c.

1. Rename COMMON_CPUID_INDEX_XXX to CPUID_INDEX_XXX.
2. Move CPUID_INDEX_MAX to sysdeps/x86/include/cpu-features.h.
3. Remove struct cpu_features and __x86_get_cpu_features from
<sys/platform/x86.h>.
4. Add __x86_get_cpuid_feature_leaf to <sys/platform/x86.h> and put it
in libc.
5. Make __get_cpu_features() private to glibc.
6. Replace __x86_get_cpu_features(N) with __get_cpu_features().
7. Add _dl_x86_get_cpu_features to GLIBC_PRIVATE.
8. Use a single enum index for each CPU feature detection.
9. Pass the CPUID feature leaf to __x86_get_cpuid_feature_leaf.
10. Return zero struct cpuid_feature for the older glibc binary with a
smaller CPUID_INDEX_MAX [BZ #27104].
11. Inside glibc, use the C preprocessor magic so that cpu_features data
can be loaded just once leading to more compact code for glibc.

256 bits are used for each CPUID leaf.  Some leaves only contain a few
features.  We can add exceptions to such leaves.  But it will increase
code sizes and it is harder to provide backward/forward compatibilities
when new features are added to such leaves in the future.

When new leaves are added, _rtld_global_ro offsets will change which
leads to race condition during in-place updates. We may avoid in-place
updates by

1. Rename the old glibc.
2. Install the new glibc.
3. Remove the old glibc.

NB: A function, __x86_get_cpuid_feature_leaf , is used to avoid the copy
relocation issue with IFUNC resolver as shown in IFUNC resolver tests.
2021-01-21 05:58:17 -08:00
..
i686 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
i786
____longjmp_chk.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
arch-syscall.h Update syscall lists for Linux 5.10. 2020-12-16 02:08:52 +00:00
brk.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
c++-types.data
clone.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
configure Require Linux kernel 3.2 or later on x86 / x86_64. 2017-05-08 10:45:20 +00:00
configure.ac Require Linux kernel 3.2 or later on x86 / x86_64. 2017-05-08 10:45:20 +00:00
dl-librecon.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-procinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getcontext.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Implies
jmp_buf-macros.h Add jmp_buf-macros.h 2017-11-09 05:10:03 -08:00
kernel-features.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld.abilist <sys/platform/x86.h>: Remove the C preprocessor magic 2021-01-21 05:58:17 -08:00
ldconfig.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libanl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libBrokenLocale.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libc-do-syscall.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc.abilist <sys/platform/x86.h>: Remove the C preprocessor magic 2021-01-21 05:58:17 -08:00
libcrypt.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libdl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libm.abilist New exp10f version without SVID compat wrapper 2020-06-19 12:08:47 -03:00
libnsl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libpthread.abilist nptl: Move pthread_gettattr_np into libc 2020-05-20 20:27:49 +02:00
libresolv.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
librt.abilist Finish move of clock_* functions to libc. [BZ #24959] 2019-09-04 14:39:38 +02:00
libthread_db.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libutil.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
localplt.data ld.so: Do not export free/calloc/malloc/realloc functions [BZ #25486] 2020-02-15 11:01:23 +01:00
makecontext.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile i386: Fix i386 sigaction sa_restorer initialization (BZ#21269) 2018-03-05 18:08:27 -03:00
register-dump.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
setcontext.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
shlib-versions Clean up gnu/lib-names.h generation (bug 14171). 2014-09-26 17:33:04 +00:00
sigaction.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
startup.h Use <startup.h> in __libc_init_secure 2021-01-19 09:55:47 -08:00
struct_kernel_msqid64_ds.h sysv: linux: Add 64-bit time_t variant for msgctl 2020-07-09 12:05:40 -03:00
struct_kernel_semid64_ds.h sysv: linux: Add 64-bit time_t variant for semctl 2020-07-09 12:05:35 -03:00
struct_kernel_shmid64_ds.h sysv: linux: Add 64-bit time_t variant for shmctl 2020-07-09 12:05:47 -03:00
swapcontext.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
syscall.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
syscalls.list posix: Consolidate Linux waitpid syscall 2017-05-18 18:06:47 -03:00
sysdep.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-bz21269.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ucontext_i.sym i386: Enable CET support in ucontext functions 2020-02-14 15:15:25 -08:00
Versions Clean pthread functions namespaces for C11 threads 2017-06-23 17:38:17 -03:00
vfork.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00