ARMTargetParser.def 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. //===- ARMTargetParser.def - ARM target parsing defines ---------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file provides defines to build up the ARM target parser's logic.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. // NOTE: NO INCLUDE GUARD DESIRED!
  13. #ifndef ARM_FPU
  14. #define ARM_FPU(NAME, KIND, VERSION, NEON_SUPPORT, RESTRICTION)
  15. #endif
  16. ARM_FPU("invalid", FK_INVALID, FPUVersion::NONE, NeonSupportLevel::None, FPURestriction::None)
  17. ARM_FPU("none", FK_NONE, FPUVersion::NONE, NeonSupportLevel::None, FPURestriction::None)
  18. ARM_FPU("vfp", FK_VFP, FPUVersion::VFPV2, NeonSupportLevel::None, FPURestriction::None)
  19. ARM_FPU("vfpv2", FK_VFPV2, FPUVersion::VFPV2, NeonSupportLevel::None, FPURestriction::None)
  20. ARM_FPU("vfpv3", FK_VFPV3, FPUVersion::VFPV3, NeonSupportLevel::None, FPURestriction::None)
  21. ARM_FPU("vfpv3-fp16", FK_VFPV3_FP16, FPUVersion::VFPV3_FP16, NeonSupportLevel::None, FPURestriction::None)
  22. ARM_FPU("vfpv3-d16", FK_VFPV3_D16, FPUVersion::VFPV3, NeonSupportLevel::None, FPURestriction::D16)
  23. ARM_FPU("vfpv3-d16-fp16", FK_VFPV3_D16_FP16, FPUVersion::VFPV3_FP16, NeonSupportLevel::None, FPURestriction::D16)
  24. ARM_FPU("vfpv3xd", FK_VFPV3XD, FPUVersion::VFPV3, NeonSupportLevel::None, FPURestriction::SP_D16)
  25. ARM_FPU("vfpv3xd-fp16", FK_VFPV3XD_FP16, FPUVersion::VFPV3_FP16, NeonSupportLevel::None, FPURestriction::SP_D16)
  26. ARM_FPU("vfpv4", FK_VFPV4, FPUVersion::VFPV4, NeonSupportLevel::None, FPURestriction::None)
  27. ARM_FPU("vfpv4-d16", FK_VFPV4_D16, FPUVersion::VFPV4, NeonSupportLevel::None, FPURestriction::D16)
  28. ARM_FPU("fpv4-sp-d16", FK_FPV4_SP_D16, FPUVersion::VFPV4, NeonSupportLevel::None, FPURestriction::SP_D16)
  29. ARM_FPU("fpv5-d16", FK_FPV5_D16, FPUVersion::VFPV5, NeonSupportLevel::None, FPURestriction::D16)
  30. ARM_FPU("fpv5-sp-d16", FK_FPV5_SP_D16, FPUVersion::VFPV5, NeonSupportLevel::None, FPURestriction::SP_D16)
  31. ARM_FPU("fp-armv8", FK_FP_ARMV8, FPUVersion::VFPV5, NeonSupportLevel::None, FPURestriction::None)
  32. ARM_FPU("fp-armv8-fullfp16-d16", FK_FP_ARMV8_FULLFP16_D16, FPUVersion::VFPV5_FULLFP16, NeonSupportLevel::None, FPURestriction::D16)
  33. ARM_FPU("fp-armv8-fullfp16-sp-d16", FK_FP_ARMV8_FULLFP16_SP_D16, FPUVersion::VFPV5_FULLFP16, NeonSupportLevel::None, FPURestriction::SP_D16)
  34. ARM_FPU("neon", FK_NEON, FPUVersion::VFPV3, NeonSupportLevel::Neon, FPURestriction::None)
  35. ARM_FPU("neon-fp16", FK_NEON_FP16, FPUVersion::VFPV3_FP16, NeonSupportLevel::Neon, FPURestriction::None)
  36. ARM_FPU("neon-vfpv4", FK_NEON_VFPV4, FPUVersion::VFPV4, NeonSupportLevel::Neon, FPURestriction::None)
  37. ARM_FPU("neon-fp-armv8", FK_NEON_FP_ARMV8, FPUVersion::VFPV5, NeonSupportLevel::Neon, FPURestriction::None)
  38. ARM_FPU("crypto-neon-fp-armv8", FK_CRYPTO_NEON_FP_ARMV8, FPUVersion::VFPV5, NeonSupportLevel::Crypto,
  39. FPURestriction::None)
  40. ARM_FPU("softvfp", FK_SOFTVFP, FPUVersion::NONE, NeonSupportLevel::None, FPURestriction::None)
  41. #undef ARM_FPU
  42. #ifndef ARM_ARCH
  43. #define ARM_ARCH(NAME, ID, CPU_ATTR, ARCH_FEATURE, ARCH_ATTR, ARCH_FPU, ARCH_BASE_EXT)
  44. #endif
  45. ARM_ARCH("invalid", INVALID, "", "+",
  46. ARMBuildAttrs::CPUArch::Pre_v4, FK_NONE, ARM::AEK_NONE)
  47. ARM_ARCH("armv4", ARMV4, "4", "+v4", ARMBuildAttrs::CPUArch::v4,
  48. FK_NONE, ARM::AEK_NONE)
  49. ARM_ARCH("armv4t", ARMV4T, "4T", "+v4t", ARMBuildAttrs::CPUArch::v4T,
  50. FK_NONE, ARM::AEK_NONE)
  51. ARM_ARCH("armv5t", ARMV5T, "5T", "+v5", ARMBuildAttrs::CPUArch::v5T,
  52. FK_NONE, ARM::AEK_NONE)
  53. ARM_ARCH("armv5te", ARMV5TE, "5TE", "+v5e", ARMBuildAttrs::CPUArch::v5TE,
  54. FK_NONE, ARM::AEK_DSP)
  55. ARM_ARCH("armv5tej", ARMV5TEJ, "5TEJ", "+v5e", ARMBuildAttrs::CPUArch::v5TEJ,
  56. FK_NONE, ARM::AEK_DSP)
  57. ARM_ARCH("armv6", ARMV6, "6", "+v6", ARMBuildAttrs::CPUArch::v6,
  58. FK_VFPV2, ARM::AEK_DSP)
  59. ARM_ARCH("armv6k", ARMV6K, "6K", "+v6k", ARMBuildAttrs::CPUArch::v6K,
  60. FK_VFPV2, ARM::AEK_DSP)
  61. ARM_ARCH("armv6t2", ARMV6T2, "6T2", "+v6t2", ARMBuildAttrs::CPUArch::v6T2,
  62. FK_NONE, ARM::AEK_DSP)
  63. ARM_ARCH("armv6kz", ARMV6KZ, "6KZ", "+v6kz", ARMBuildAttrs::CPUArch::v6KZ,
  64. FK_VFPV2, (ARM::AEK_SEC | ARM::AEK_DSP))
  65. ARM_ARCH("armv6-m", ARMV6M, "6-M", "+v6m", ARMBuildAttrs::CPUArch::v6_M,
  66. FK_NONE, ARM::AEK_NONE)
  67. ARM_ARCH("armv7-a", ARMV7A, "7-A", "+v7", ARMBuildAttrs::CPUArch::v7,
  68. FK_NEON, ARM::AEK_DSP)
  69. ARM_ARCH("armv7ve", ARMV7VE, "7VE", "+v7ve", ARMBuildAttrs::CPUArch::v7,
  70. FK_NEON, (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT |
  71. ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP))
  72. ARM_ARCH("armv7-r", ARMV7R, "7-R", "+v7r", ARMBuildAttrs::CPUArch::v7,
  73. FK_NONE, (ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP))
  74. ARM_ARCH("armv7-m", ARMV7M, "7-M", "+v7m", ARMBuildAttrs::CPUArch::v7,
  75. FK_NONE, ARM::AEK_HWDIVTHUMB)
  76. ARM_ARCH("armv7e-m", ARMV7EM, "7E-M", "+v7em", ARMBuildAttrs::CPUArch::v7E_M,
  77. FK_NONE, (ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP))
  78. ARM_ARCH("armv8-a", ARMV8A, "8-A", "+v8a", ARMBuildAttrs::CPUArch::v8_A,
  79. FK_CRYPTO_NEON_FP_ARMV8,
  80. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  81. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC))
  82. ARM_ARCH("armv8.1-a", ARMV8_1A, "8.1-A", "+v8.1a",
  83. ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
  84. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  85. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC))
  86. ARM_ARCH("armv8.2-a", ARMV8_2A, "8.2-A", "+v8.2a",
  87. ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
  88. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  89. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS))
  90. ARM_ARCH("armv8.3-a", ARMV8_3A, "8.3-A", "+v8.3a",
  91. ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
  92. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  93. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS))
  94. ARM_ARCH("armv8.4-a", ARMV8_4A, "8.4-A", "+v8.4a",
  95. ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
  96. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  97. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  98. ARM::AEK_DOTPROD))
  99. ARM_ARCH("armv8.5-a", ARMV8_5A, "8.5-A", "+v8.5a",
  100. ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
  101. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  102. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  103. ARM::AEK_DOTPROD))
  104. ARM_ARCH("armv8.6-a", ARMV8_6A, "8.6-A", "+v8.6a",
  105. ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
  106. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  107. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  108. ARM::AEK_DOTPROD | ARM::AEK_BF16 | ARM::AEK_I8MM))
  109. ARM_ARCH("armv8.7-a", ARMV8_7A, "8.7-A", "+v8.7a",
  110. ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
  111. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  112. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  113. ARM::AEK_DOTPROD | ARM::AEK_BF16 | ARM::AEK_I8MM))
  114. ARM_ARCH("armv8.8-a", ARMV8_8A, "8.8-A", "+v8.8a",
  115. ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
  116. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  117. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  118. ARM::AEK_DOTPROD | ARM::AEK_BF16 | ARM::AEK_SHA2 | ARM::AEK_AES |
  119. ARM::AEK_I8MM))
  120. ARM_ARCH("armv8.9-a", ARMV8_9A, "8.9-A", "+v8.9a",
  121. ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
  122. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  123. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  124. ARM::AEK_DOTPROD | ARM::AEK_BF16 | ARM::AEK_SHA2 | ARM::AEK_AES |
  125. ARM::AEK_I8MM))
  126. ARM_ARCH("armv9-a", ARMV9A, "9-A", "+v9a",
  127. ARMBuildAttrs::CPUArch::v9_A, FK_NEON_FP_ARMV8,
  128. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  129. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  130. ARM::AEK_DOTPROD))
  131. ARM_ARCH("armv9.1-a", ARMV9_1A, "9.1-A", "+v9.1a",
  132. ARMBuildAttrs::CPUArch::v9_A, FK_NEON_FP_ARMV8,
  133. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  134. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  135. ARM::AEK_DOTPROD | ARM::AEK_BF16 | ARM::AEK_I8MM))
  136. ARM_ARCH("armv9.2-a", ARMV9_2A, "9.2-A", "+v9.2a",
  137. ARMBuildAttrs::CPUArch::v9_A, FK_NEON_FP_ARMV8,
  138. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  139. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  140. ARM::AEK_DOTPROD | ARM::AEK_BF16 | ARM::AEK_I8MM))
  141. ARM_ARCH("armv9.3-a", ARMV9_3A, "9.3-A", "+v9.3a",
  142. ARMBuildAttrs::CPUArch::v9_A, FK_CRYPTO_NEON_FP_ARMV8,
  143. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  144. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  145. ARM::AEK_DOTPROD | ARM::AEK_BF16 | ARM::AEK_I8MM))
  146. ARM_ARCH("armv9.4-a", ARMV9_4A, "9.4-A", "+v9.4a",
  147. ARMBuildAttrs::CPUArch::v9_A, FK_NEON_FP_ARMV8,
  148. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  149. ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP | ARM::AEK_CRC | ARM::AEK_RAS |
  150. ARM::AEK_DOTPROD | ARM::AEK_BF16 | ARM::AEK_I8MM))
  151. ARM_ARCH("armv8-r", ARMV8R, "8-R", "+v8r", ARMBuildAttrs::CPUArch::v8_R,
  152. FK_NEON_FP_ARMV8,
  153. (ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB |
  154. ARM::AEK_DSP | ARM::AEK_CRC))
  155. ARM_ARCH("armv8-m.base", ARMV8MBaseline, "8-M.Baseline", "+v8m.base",
  156. ARMBuildAttrs::CPUArch::v8_M_Base, FK_NONE, ARM::AEK_HWDIVTHUMB)
  157. ARM_ARCH("armv8-m.main", ARMV8MMainline, "8-M.Mainline", "+v8m.main",
  158. ARMBuildAttrs::CPUArch::v8_M_Main, FK_FPV5_D16, ARM::AEK_HWDIVTHUMB)
  159. ARM_ARCH("armv8.1-m.main", ARMV8_1MMainline, "8.1-M.Mainline", "+v8.1m.main",
  160. ARMBuildAttrs::CPUArch::v8_1_M_Main, FK_FP_ARMV8_FULLFP16_SP_D16, ARM::AEK_HWDIVTHUMB | ARM::AEK_RAS | ARM::AEK_LOB)
  161. // Non-standard Arch names.
  162. ARM_ARCH("iwmmxt", IWMMXT, "iwmmxt", "+", ARMBuildAttrs::CPUArch::v5TE,
  163. FK_NONE, ARM::AEK_NONE)
  164. ARM_ARCH("iwmmxt2", IWMMXT2, "iwmmxt2", "+", ARMBuildAttrs::CPUArch::v5TE,
  165. FK_NONE, ARM::AEK_NONE)
  166. ARM_ARCH("xscale", XSCALE, "xscale", "+v5e", ARMBuildAttrs::CPUArch::v5TE,
  167. FK_NONE, ARM::AEK_NONE)
  168. ARM_ARCH("armv7s", ARMV7S, "7-S", "+v7s", ARMBuildAttrs::CPUArch::v7,
  169. FK_NEON_VFPV4, ARM::AEK_DSP)
  170. ARM_ARCH("armv7k", ARMV7K, "7-K", "+v7k", ARMBuildAttrs::CPUArch::v7,
  171. FK_NONE, ARM::AEK_DSP)
  172. #undef ARM_ARCH
  173. #ifndef ARM_ARCH_EXT_NAME
  174. #define ARM_ARCH_EXT_NAME(NAME, ID, FEATURE, NEGFEATURE)
  175. #endif
  176. ARM_ARCH_EXT_NAME("invalid", ARM::AEK_INVALID, {}, {})
  177. ARM_ARCH_EXT_NAME("none", ARM::AEK_NONE, {}, {})
  178. ARM_ARCH_EXT_NAME("crc", ARM::AEK_CRC, "+crc", "-crc")
  179. ARM_ARCH_EXT_NAME("crypto", ARM::AEK_CRYPTO, "+crypto","-crypto")
  180. ARM_ARCH_EXT_NAME("sha2", ARM::AEK_SHA2, "+sha2", "-sha2")
  181. ARM_ARCH_EXT_NAME("aes", ARM::AEK_AES, "+aes", "-aes")
  182. ARM_ARCH_EXT_NAME("dotprod", ARM::AEK_DOTPROD, "+dotprod","-dotprod")
  183. ARM_ARCH_EXT_NAME("dsp", ARM::AEK_DSP, "+dsp", "-dsp")
  184. ARM_ARCH_EXT_NAME("fp", ARM::AEK_FP, {}, {})
  185. ARM_ARCH_EXT_NAME("fp.dp", ARM::AEK_FP_DP, {}, {})
  186. ARM_ARCH_EXT_NAME("mve", (ARM::AEK_DSP | ARM::AEK_SIMD), "+mve", "-mve")
  187. ARM_ARCH_EXT_NAME("mve.fp", (ARM::AEK_DSP | ARM::AEK_SIMD | ARM::AEK_FP), "+mve.fp", "-mve.fp")
  188. ARM_ARCH_EXT_NAME("idiv", (ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB), {}, {})
  189. ARM_ARCH_EXT_NAME("mp", ARM::AEK_MP, {}, {})
  190. ARM_ARCH_EXT_NAME("simd", ARM::AEK_SIMD, {}, {})
  191. ARM_ARCH_EXT_NAME("sec", ARM::AEK_SEC, {}, {})
  192. ARM_ARCH_EXT_NAME("virt", ARM::AEK_VIRT, {}, {})
  193. ARM_ARCH_EXT_NAME("fp16", ARM::AEK_FP16, "+fullfp16", "-fullfp16")
  194. ARM_ARCH_EXT_NAME("ras", ARM::AEK_RAS, "+ras", "-ras")
  195. ARM_ARCH_EXT_NAME("os", ARM::AEK_OS, {}, {})
  196. ARM_ARCH_EXT_NAME("iwmmxt", ARM::AEK_IWMMXT, {}, {})
  197. ARM_ARCH_EXT_NAME("iwmmxt2", ARM::AEK_IWMMXT2, {}, {})
  198. ARM_ARCH_EXT_NAME("maverick", ARM::AEK_MAVERICK, {}, {})
  199. ARM_ARCH_EXT_NAME("xscale", ARM::AEK_XSCALE, {}, {})
  200. ARM_ARCH_EXT_NAME("fp16fml", ARM::AEK_FP16FML, "+fp16fml", "-fp16fml")
  201. ARM_ARCH_EXT_NAME("bf16", ARM::AEK_BF16, "+bf16", "-bf16")
  202. ARM_ARCH_EXT_NAME("sb", ARM::AEK_SB, "+sb", "-sb")
  203. ARM_ARCH_EXT_NAME("i8mm", ARM::AEK_I8MM, "+i8mm", "-i8mm")
  204. ARM_ARCH_EXT_NAME("lob", ARM::AEK_LOB, "+lob", "-lob")
  205. ARM_ARCH_EXT_NAME("cdecp0", ARM::AEK_CDECP0, "+cdecp0", "-cdecp0")
  206. ARM_ARCH_EXT_NAME("cdecp1", ARM::AEK_CDECP1, "+cdecp1", "-cdecp1")
  207. ARM_ARCH_EXT_NAME("cdecp2", ARM::AEK_CDECP2, "+cdecp2", "-cdecp2")
  208. ARM_ARCH_EXT_NAME("cdecp3", ARM::AEK_CDECP3, "+cdecp3", "-cdecp3")
  209. ARM_ARCH_EXT_NAME("cdecp4", ARM::AEK_CDECP4, "+cdecp4", "-cdecp4")
  210. ARM_ARCH_EXT_NAME("cdecp5", ARM::AEK_CDECP5, "+cdecp5", "-cdecp5")
  211. ARM_ARCH_EXT_NAME("cdecp6", ARM::AEK_CDECP6, "+cdecp6", "-cdecp6")
  212. ARM_ARCH_EXT_NAME("cdecp7", ARM::AEK_CDECP7, "+cdecp7", "-cdecp7")
  213. ARM_ARCH_EXT_NAME("pacbti", ARM::AEK_PACBTI, "+pacbti", "-pacbti")
  214. #undef ARM_ARCH_EXT_NAME
  215. #ifndef ARM_HW_DIV_NAME
  216. #define ARM_HW_DIV_NAME(NAME, ID)
  217. #endif
  218. ARM_HW_DIV_NAME("invalid", ARM::AEK_INVALID)
  219. ARM_HW_DIV_NAME("none", ARM::AEK_NONE)
  220. ARM_HW_DIV_NAME("thumb", ARM::AEK_HWDIVTHUMB)
  221. ARM_HW_DIV_NAME("arm", ARM::AEK_HWDIVARM)
  222. ARM_HW_DIV_NAME("arm,thumb", (ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB))
  223. #undef ARM_HW_DIV_NAME
  224. #ifndef ARM_CPU_NAME
  225. #define ARM_CPU_NAME(NAME, ID, DEFAULT_FPU, IS_DEFAULT, DEFAULT_EXT)
  226. #endif
  227. ARM_CPU_NAME("arm8", ARMV4, FK_NONE, false, ARM::AEK_NONE)
  228. ARM_CPU_NAME("arm810", ARMV4, FK_NONE, false, ARM::AEK_NONE)
  229. ARM_CPU_NAME("strongarm", ARMV4, FK_NONE, true, ARM::AEK_NONE)
  230. ARM_CPU_NAME("strongarm110", ARMV4, FK_NONE, false, ARM::AEK_NONE)
  231. ARM_CPU_NAME("strongarm1100", ARMV4, FK_NONE, false, ARM::AEK_NONE)
  232. ARM_CPU_NAME("strongarm1110", ARMV4, FK_NONE, false, ARM::AEK_NONE)
  233. ARM_CPU_NAME("arm7tdmi", ARMV4T, FK_NONE, true, ARM::AEK_NONE)
  234. ARM_CPU_NAME("arm7tdmi-s", ARMV4T, FK_NONE, false, ARM::AEK_NONE)
  235. ARM_CPU_NAME("arm710t", ARMV4T, FK_NONE, false, ARM::AEK_NONE)
  236. ARM_CPU_NAME("arm720t", ARMV4T, FK_NONE, false, ARM::AEK_NONE)
  237. ARM_CPU_NAME("arm9", ARMV4T, FK_NONE, false, ARM::AEK_NONE)
  238. ARM_CPU_NAME("arm9tdmi", ARMV4T, FK_NONE, false, ARM::AEK_NONE)
  239. ARM_CPU_NAME("arm920", ARMV4T, FK_NONE, false, ARM::AEK_NONE)
  240. ARM_CPU_NAME("arm920t", ARMV4T, FK_NONE, false, ARM::AEK_NONE)
  241. ARM_CPU_NAME("arm922t", ARMV4T, FK_NONE, false, ARM::AEK_NONE)
  242. ARM_CPU_NAME("arm940t", ARMV4T, FK_NONE, false, ARM::AEK_NONE)
  243. ARM_CPU_NAME("ep9312", ARMV4T, FK_NONE, false, ARM::AEK_NONE)
  244. ARM_CPU_NAME("arm10tdmi", ARMV5T, FK_NONE, true, ARM::AEK_NONE)
  245. ARM_CPU_NAME("arm1020t", ARMV5T, FK_NONE, false, ARM::AEK_NONE)
  246. ARM_CPU_NAME("arm9e", ARMV5TE, FK_NONE, false, ARM::AEK_NONE)
  247. ARM_CPU_NAME("arm946e-s", ARMV5TE, FK_NONE, false, ARM::AEK_NONE)
  248. ARM_CPU_NAME("arm966e-s", ARMV5TE, FK_NONE, false, ARM::AEK_NONE)
  249. ARM_CPU_NAME("arm968e-s", ARMV5TE, FK_NONE, false, ARM::AEK_NONE)
  250. ARM_CPU_NAME("arm10e", ARMV5TE, FK_NONE, false, ARM::AEK_NONE)
  251. ARM_CPU_NAME("arm1020e", ARMV5TE, FK_NONE, false, ARM::AEK_NONE)
  252. ARM_CPU_NAME("arm1022e", ARMV5TE, FK_NONE, true, ARM::AEK_NONE)
  253. ARM_CPU_NAME("arm926ej-s", ARMV5TEJ, FK_NONE, true, ARM::AEK_NONE)
  254. ARM_CPU_NAME("arm1136j-s", ARMV6, FK_NONE, false, ARM::AEK_NONE)
  255. ARM_CPU_NAME("arm1136jf-s", ARMV6, FK_VFPV2, true, ARM::AEK_NONE)
  256. ARM_CPU_NAME("mpcore", ARMV6K, FK_VFPV2, true, ARM::AEK_NONE)
  257. ARM_CPU_NAME("mpcorenovfp", ARMV6K, FK_NONE, false, ARM::AEK_NONE)
  258. ARM_CPU_NAME("arm1176jz-s", ARMV6KZ, FK_NONE, false, ARM::AEK_NONE)
  259. ARM_CPU_NAME("arm1176jzf-s", ARMV6KZ, FK_VFPV2, true, ARM::AEK_NONE)
  260. ARM_CPU_NAME("arm1156t2-s", ARMV6T2, FK_NONE, true, ARM::AEK_NONE)
  261. ARM_CPU_NAME("arm1156t2f-s", ARMV6T2, FK_VFPV2, false, ARM::AEK_NONE)
  262. ARM_CPU_NAME("cortex-m0", ARMV6M, FK_NONE, true, ARM::AEK_NONE)
  263. ARM_CPU_NAME("cortex-m0plus", ARMV6M, FK_NONE, false, ARM::AEK_NONE)
  264. ARM_CPU_NAME("cortex-m1", ARMV6M, FK_NONE, false, ARM::AEK_NONE)
  265. ARM_CPU_NAME("sc000", ARMV6M, FK_NONE, false, ARM::AEK_NONE)
  266. ARM_CPU_NAME("cortex-a5", ARMV7A, FK_NEON_VFPV4, false,
  267. (ARM::AEK_SEC | ARM::AEK_MP))
  268. ARM_CPU_NAME("cortex-a7", ARMV7A, FK_NEON_VFPV4, false,
  269. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  270. ARM::AEK_HWDIVTHUMB))
  271. ARM_CPU_NAME("cortex-a8", ARMV7A, FK_NEON, false, ARM::AEK_SEC)
  272. ARM_CPU_NAME("cortex-a9", ARMV7A, FK_NEON_FP16, false, (ARM::AEK_SEC | ARM::AEK_MP))
  273. ARM_CPU_NAME("cortex-a12", ARMV7A, FK_NEON_VFPV4, false,
  274. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  275. ARM::AEK_HWDIVTHUMB))
  276. ARM_CPU_NAME("cortex-a15", ARMV7A, FK_NEON_VFPV4, false,
  277. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  278. ARM::AEK_HWDIVTHUMB))
  279. ARM_CPU_NAME("cortex-a17", ARMV7A, FK_NEON_VFPV4, false,
  280. (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | ARM::AEK_HWDIVARM |
  281. ARM::AEK_HWDIVTHUMB))
  282. ARM_CPU_NAME("krait", ARMV7A, FK_NEON_VFPV4, false,
  283. (ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB))
  284. ARM_CPU_NAME("cortex-r4", ARMV7R, FK_NONE, true, ARM::AEK_NONE)
  285. ARM_CPU_NAME("cortex-r4f", ARMV7R, FK_VFPV3_D16, false, ARM::AEK_NONE)
  286. ARM_CPU_NAME("cortex-r5", ARMV7R, FK_VFPV3_D16, false,
  287. (ARM::AEK_MP | ARM::AEK_HWDIVARM))
  288. ARM_CPU_NAME("cortex-r7", ARMV7R, FK_VFPV3_D16_FP16, false,
  289. (ARM::AEK_MP | ARM::AEK_HWDIVARM))
  290. ARM_CPU_NAME("cortex-r8", ARMV7R, FK_VFPV3_D16_FP16, false,
  291. (ARM::AEK_MP | ARM::AEK_HWDIVARM))
  292. ARM_CPU_NAME("cortex-r52", ARMV8R, FK_NEON_FP_ARMV8, true, ARM::AEK_NONE)
  293. ARM_CPU_NAME("sc300", ARMV7M, FK_NONE, false, ARM::AEK_NONE)
  294. ARM_CPU_NAME("cortex-m3", ARMV7M, FK_NONE, true, ARM::AEK_NONE)
  295. ARM_CPU_NAME("cortex-m4", ARMV7EM, FK_FPV4_SP_D16, true, ARM::AEK_NONE)
  296. ARM_CPU_NAME("cortex-m7", ARMV7EM, FK_FPV5_D16, false, ARM::AEK_NONE)
  297. ARM_CPU_NAME("cortex-m23", ARMV8MBaseline, FK_NONE, false, ARM::AEK_NONE)
  298. ARM_CPU_NAME("cortex-m33", ARMV8MMainline, FK_FPV5_SP_D16, false, ARM::AEK_DSP)
  299. ARM_CPU_NAME("cortex-m35p", ARMV8MMainline, FK_FPV5_SP_D16, false, ARM::AEK_DSP)
  300. ARM_CPU_NAME("cortex-m55", ARMV8_1MMainline, FK_FP_ARMV8_FULLFP16_D16, false,
  301. (ARM::AEK_DSP | ARM::AEK_SIMD | ARM::AEK_FP | ARM::AEK_FP16))
  302. ARM_CPU_NAME("cortex-m85", ARMV8_1MMainline, FK_FP_ARMV8_FULLFP16_D16, false,
  303. (ARM::AEK_DSP | ARM::AEK_SIMD | ARM::AEK_FP | ARM::AEK_FP16 |
  304. ARM::AEK_RAS | ARM::AEK_PACBTI))
  305. ARM_CPU_NAME("cortex-a32", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
  306. ARM_CPU_NAME("cortex-a35", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
  307. ARM_CPU_NAME("cortex-a53", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
  308. ARM_CPU_NAME("cortex-a55", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  309. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  310. ARM_CPU_NAME("cortex-a57", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
  311. ARM_CPU_NAME("cortex-a72", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
  312. ARM_CPU_NAME("cortex-a73", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
  313. ARM_CPU_NAME("cortex-a75", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  314. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  315. ARM_CPU_NAME("cortex-a76", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  316. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  317. ARM_CPU_NAME("cortex-a76ae", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  318. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  319. ARM_CPU_NAME("cortex-a77", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  320. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  321. ARM_CPU_NAME("cortex-a78", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  322. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  323. ARM_CPU_NAME("cortex-a78c", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  324. ARM::AEK_FP16 | ARM::AEK_DOTPROD)
  325. ARM_CPU_NAME("cortex-a710", ARMV9A, FK_NEON_FP_ARMV8, false,
  326. (ARM::AEK_DOTPROD | ARM::AEK_FP16FML | ARM::AEK_BF16 | ARM::AEK_SB |
  327. ARM::AEK_I8MM))
  328. ARM_CPU_NAME("cortex-x1", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  329. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  330. ARM_CPU_NAME("cortex-x1c", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  331. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  332. ARM_CPU_NAME("neoverse-n1", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  333. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  334. ARM_CPU_NAME("neoverse-n2", ARMV8_5A, FK_CRYPTO_NEON_FP_ARMV8, false,
  335. (ARM::AEK_BF16 | ARM::AEK_DOTPROD | ARM::AEK_I8MM | ARM::AEK_RAS |
  336. ARM::AEK_SB))
  337. ARM_CPU_NAME("neoverse-v1", ARMV8_4A, FK_CRYPTO_NEON_FP_ARMV8, false,
  338. (ARM::AEK_RAS | ARM::AEK_FP16 | ARM::AEK_BF16 | ARM::AEK_DOTPROD))
  339. ARM_CPU_NAME("cyclone", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
  340. ARM_CPU_NAME("exynos-m3", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
  341. ARM_CPU_NAME("exynos-m4", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  342. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  343. ARM_CPU_NAME("exynos-m5", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
  344. (ARM::AEK_FP16 | ARM::AEK_DOTPROD))
  345. ARM_CPU_NAME("kryo", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false, ARM::AEK_CRC)
  346. // Non-standard Arch names.
  347. ARM_CPU_NAME("iwmmxt", IWMMXT, FK_NONE, true, ARM::AEK_NONE)
  348. ARM_CPU_NAME("xscale", XSCALE, FK_NONE, true, ARM::AEK_NONE)
  349. ARM_CPU_NAME("swift", ARMV7S, FK_NEON_VFPV4, true,
  350. (ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB))
  351. // Invalid CPU
  352. ARM_CPU_NAME("invalid", INVALID, FK_INVALID, true, ARM::AEK_INVALID)
  353. #undef ARM_CPU_NAME