dl-procinfo.c 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* Data for x86 version of processor capability information.
  2. Copyright (C) 2017-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. /* This information must be kept in sync with the _DL_HWCAP_COUNT,
  16. HWCAP_PLATFORMS_START and HWCAP_PLATFORMS_COUNT definitions in
  17. dl-hwcap.h.
  18. If anything should be added here check whether the size of each string
  19. is still ok with the given array size.
  20. All the #ifdefs in the definitions are quite irritating but
  21. necessary if we want to avoid duplicating the information. There
  22. are three different modes:
  23. - PROCINFO_DECL is defined. This means we are only interested in
  24. declarations.
  25. - PROCINFO_DECL is not defined:
  26. + if SHARED is defined the file is included in an array
  27. initializer. The .element = { ... } syntax is needed.
  28. + if SHARED is not defined a normal array initialization is
  29. needed.
  30. */
  31. #if !IS_IN (ldconfig)
  32. # if !defined PROCINFO_DECL && defined SHARED
  33. ._dl_x86_cpu_features
  34. # else
  35. PROCINFO_CLASS struct cpu_features _dl_x86_cpu_features
  36. # endif
  37. # ifndef PROCINFO_DECL
  38. = { }
  39. # endif
  40. # if !defined SHARED || defined PROCINFO_DECL
  41. ;
  42. # else
  43. ,
  44. # endif
  45. #endif
  46. #if !defined PROCINFO_DECL && defined SHARED
  47. ._dl_x86_hwcap_flags
  48. #else
  49. PROCINFO_CLASS const char _dl_x86_hwcap_flags[3][9]
  50. #endif
  51. #ifndef PROCINFO_DECL
  52. = {
  53. "sse2", "x86_64", "avx512_1"
  54. }
  55. #endif
  56. #if !defined SHARED || defined PROCINFO_DECL
  57. ;
  58. #else
  59. ,
  60. #endif
  61. #if !defined PROCINFO_DECL && defined SHARED
  62. ._dl_x86_platforms
  63. #else
  64. PROCINFO_CLASS const char _dl_x86_platforms[4][9]
  65. #endif
  66. #ifndef PROCINFO_DECL
  67. = {
  68. "i586", "i686", "haswell", "xeon_phi"
  69. }
  70. #endif
  71. #if !defined SHARED || defined PROCINFO_DECL
  72. ;
  73. #else
  74. ,
  75. #endif