dl-procinfo.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* Data for AArch64 version of processor capability information.
  2. Linux version.
  3. Copyright (C) 2017-2019 Free Software Foundation, Inc.
  4. This file is part of the GNU C Library.
  5. The GNU C Library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with the GNU C Library; if not, see
  15. <http://www.gnu.org/licenses/>. */
  16. /* If anything should be added here check whether the size of each string
  17. is still ok with the given array size.
  18. All the #ifdefs in the definitions are quite irritating but
  19. necessary if we want to avoid duplicating the information. There
  20. are three different modes:
  21. - PROCINFO_DECL is defined. This means we are only interested in
  22. declarations.
  23. - PROCINFO_DECL is not defined:
  24. + if SHARED is defined the file is included in an array
  25. initializer. The .element = { ... } syntax is needed.
  26. + if SHARED is not defined a normal array initialization is
  27. needed.
  28. */
  29. #ifndef PROCINFO_CLASS
  30. # define PROCINFO_CLASS
  31. #endif
  32. #if !IS_IN (ldconfig)
  33. # if !defined PROCINFO_DECL && defined SHARED
  34. ._dl_aarch64_cpu_features
  35. # else
  36. PROCINFO_CLASS struct cpu_features _dl_aarch64_cpu_features
  37. # endif
  38. # ifndef PROCINFO_DECL
  39. = { }
  40. # endif
  41. # if !defined SHARED || defined PROCINFO_DECL
  42. ;
  43. # else
  44. ,
  45. # endif
  46. #endif
  47. /* Number of HWCAP bits set. */
  48. #define _DL_HWCAP_COUNT 29
  49. #if !defined PROCINFO_DECL && defined SHARED
  50. ._dl_aarch64_cap_flags
  51. #else
  52. PROCINFO_CLASS const char _dl_aarch64_cap_flags[_DL_HWCAP_COUNT][10]
  53. #endif
  54. #ifndef PROCINFO_DECL
  55. /* Matches the names in arch/arm64/kernel/cpuinfo.c of Linux. */
  56. = { "fp", "asimd", "evtstrm", "aes", "pmull", "sha1", "sha2", "crc32",
  57. "atomics", "fphp", "asimdhp", "cpuid", "asimdrdm", "jscvt", "fcma",
  58. "lrcpc", "dcpop", "sha3", "sm3", "sm4", "asimddp", "sha512", "sve",
  59. "asimdfhm", "dit", "uscat", "ilrcpc", "flagm", "ssbs" }
  60. #endif
  61. #if !defined SHARED || defined PROCINFO_DECL
  62. ;
  63. #else
  64. ,
  65. #endif
  66. #undef PROCINFO_DECL
  67. #undef PROCINFO_CLASS