V8: [PATCH] x86: Support usable check for all CPU features

Florian Weimer fweimer@redhat.com
Tue Jul 7 11:18:12 GMT 2020


* H. J. Lu:

> Good point.  Here is the updated patch to only copy known bits.

I see a build failure.  What other patches do I need to apply before
this one?

In file included from ../sysdeps/x86/ldsodefs.h:24,
                 from ../sysdeps/gnu/ldsodefs.h:46,
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
                 from ../sysdeps/x86/init-arch.h:21,
                 from ../sysdeps/x86/cacheinfo.c:26:
../sysdeps/x86/cacheinfo.c: In function ‘init_cacheinfo’:
../sysdeps/x86/cpu-features.h:123:20: error: ‘index_arch_AVX512F_Usable’ undeclared (first use in this function)
  123 |   ((ptr->preferred[index_arch_##name] & bit_arch_##name) != 0)
      |                    ^~~~~~~~~~~
../sysdeps/x86/cpu-features.h:143:3: note: in expansion of macro ‘CPU_FEATURE_PREFERRED_P’
  143 |   CPU_FEATURE_PREFERRED_P (ptr, name)
      |   ^~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86/cacheinfo.c:886:7: note: in expansion of macro ‘CPU_FEATURES_ARCH_P’
  886 |   if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable)
      |       ^~~~~~~~~~~~~~~~~~~
../sysdeps/x86/cpu-features.h:123:20: note: each undeclared identifier is reported only once for each function it appears in
  123 |   ((ptr->preferred[index_arch_##name] & bit_arch_##name) != 0)
      |                    ^~~~~~~~~~~
../sysdeps/x86/cpu-features.h:143:3: note: in expansion of macro ‘CPU_FEATURE_PREFERRED_P’
  143 |   CPU_FEATURE_PREFERRED_P (ptr, name)
      |   ^~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86/cacheinfo.c:886:7: note: in expansion of macro ‘CPU_FEATURES_ARCH_P’
  886 |   if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable)
      |       ^~~~~~~~~~~~~~~~~~~
../sysdeps/x86/cpu-features.h:123:41: error: ‘bit_arch_AVX512F_Usable’ undeclared (first use in this function)
  123 |   ((ptr->preferred[index_arch_##name] & bit_arch_##name) != 0)
      |                                         ^~~~~~~~~
../sysdeps/x86/cpu-features.h:143:3: note: in expansion of macro ‘CPU_FEATURE_PREFERRED_P’
  143 |   CPU_FEATURE_PREFERRED_P (ptr, name)
      |   ^~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86/cacheinfo.c:886:7: note: in expansion of macro ‘CPU_FEATURES_ARCH_P’
  886 |   if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable)
      |       ^~~~~~~~~~~~~~~~~~~

I'm particularly interested in the size of the data structure.

Thanks,
Florian



More information about the Libc-alpha mailing list