Recommit [NFC] Better encapsulation of llvm::Optional Storage
[llvm-complete.git] / include / llvm / Support / AArch64TargetParser.def
blobd8c69c2ed370a5f5c702fa176848d5bb5057cbba
1 //===- AARCH64TargetParser.def - AARCH64 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 AARCH64 target parser's logic.
11 //===----------------------------------------------------------------------===//
13 // NOTE: NO INCLUDE GUARD DESIRED!
15 #ifndef AARCH64_ARCH
16 #define AARCH64_ARCH(NAME, ID, CPU_ATTR, SUB_ARCH, ARCH_ATTR, ARCH_FPU, ARCH_BASE_EXT)
17 #endif
18 AARCH64_ARCH("invalid", INVALID, "", "",
19 ARMBuildAttrs::CPUArch::v8_A, FK_NONE, AArch64::AEK_NONE)
20 AARCH64_ARCH("armv8-a", ARMV8A, "8-A", "v8", ARMBuildAttrs::CPUArch::v8_A,
21 FK_CRYPTO_NEON_FP_ARMV8,
22 (AArch64::AEK_CRYPTO | AArch64::AEK_FP | AArch64::AEK_SIMD))
23 AARCH64_ARCH("armv8.1-a", ARMV8_1A, "8.1-A", "v8.1a",
24 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
25 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
26 AArch64::AEK_SIMD | AArch64::AEK_LSE | AArch64::AEK_RDM))
27 AARCH64_ARCH("armv8.2-a", ARMV8_2A, "8.2-A", "v8.2a",
28 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
29 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
30 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
31 AArch64::AEK_RDM))
32 AARCH64_ARCH("armv8.3-a", ARMV8_3A, "8.3-A", "v8.3a",
33 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
34 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
35 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
36 AArch64::AEK_RDM | AArch64::AEK_RCPC))
37 AARCH64_ARCH("armv8.4-a", ARMV8_4A, "8.4-A", "v8.4a",
38 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
39 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
40 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
41 AArch64::AEK_RDM | AArch64::AEK_RCPC | AArch64::AEK_DOTPROD))
42 AARCH64_ARCH("armv8.5-a", ARMV8_5A, "8.5-A", "v8.5a",
43 ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
44 (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
45 AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
46 AArch64::AEK_RDM | AArch64::AEK_RCPC | AArch64::AEK_DOTPROD))
47 #undef AARCH64_ARCH
49 #ifndef AARCH64_ARCH_EXT_NAME
50 #define AARCH64_ARCH_EXT_NAME(NAME, ID, FEATURE, NEGFEATURE)
51 #endif
52 // FIXME: This would be nicer were it tablegen
53 AARCH64_ARCH_EXT_NAME("invalid", AArch64::AEK_INVALID, nullptr, nullptr)
54 AARCH64_ARCH_EXT_NAME("none", AArch64::AEK_NONE, nullptr, nullptr)
55 AARCH64_ARCH_EXT_NAME("crc", AArch64::AEK_CRC, "+crc", "-crc")
56 AARCH64_ARCH_EXT_NAME("lse", AArch64::AEK_LSE, "+lse", "-lse")
57 AARCH64_ARCH_EXT_NAME("rdm", AArch64::AEK_RDM, "+rdm", "-rdm")
58 AARCH64_ARCH_EXT_NAME("crypto", AArch64::AEK_CRYPTO, "+crypto","-crypto")
59 AARCH64_ARCH_EXT_NAME("sm4", AArch64::AEK_SM4, "+sm4", "-sm4")
60 AARCH64_ARCH_EXT_NAME("sha3", AArch64::AEK_SHA3, "+sha3", "-sha3")
61 AARCH64_ARCH_EXT_NAME("sha2", AArch64::AEK_SHA2, "+sha2", "-sha2")
62 AARCH64_ARCH_EXT_NAME("aes", AArch64::AEK_AES, "+aes", "-aes")
63 AARCH64_ARCH_EXT_NAME("dotprod", AArch64::AEK_DOTPROD, "+dotprod","-dotprod")
64 AARCH64_ARCH_EXT_NAME("fp", AArch64::AEK_FP, "+fp-armv8", "-fp-armv8")
65 AARCH64_ARCH_EXT_NAME("simd", AArch64::AEK_SIMD, "+neon", "-neon")
66 AARCH64_ARCH_EXT_NAME("fp16", AArch64::AEK_FP16, "+fullfp16", "-fullfp16")
67 AARCH64_ARCH_EXT_NAME("fp16fml", AArch64::AEK_FP16FML, "+fp16fml", "-fp16fml")
68 AARCH64_ARCH_EXT_NAME("profile", AArch64::AEK_PROFILE, "+spe", "-spe")
69 AARCH64_ARCH_EXT_NAME("ras", AArch64::AEK_RAS, "+ras", "-ras")
70 AARCH64_ARCH_EXT_NAME("sve", AArch64::AEK_SVE, "+sve", "-sve")
71 AARCH64_ARCH_EXT_NAME("rcpc", AArch64::AEK_RCPC, "+rcpc", "-rcpc")
72 AARCH64_ARCH_EXT_NAME("rng", AArch64::AEK_RAND, "+rand", "-rand")
73 AARCH64_ARCH_EXT_NAME("memtag", AArch64::AEK_MTE, "+mte", "-mte")
74 AARCH64_ARCH_EXT_NAME("ssbs", AArch64::AEK_SSBS, "+ssbs", "-ssbs")
75 AARCH64_ARCH_EXT_NAME("sb", AArch64::AEK_SB, "+sb", "-sb")
76 AARCH64_ARCH_EXT_NAME("predres", AArch64::AEK_PREDRES, "+predres", "-predres")
77 #undef AARCH64_ARCH_EXT_NAME
79 #ifndef AARCH64_CPU_NAME
80 #define AARCH64_CPU_NAME(NAME, ID, DEFAULT_FPU, IS_DEFAULT, DEFAULT_EXT)
81 #endif
82 AARCH64_CPU_NAME("cortex-a35", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
83 (AArch64::AEK_CRC))
84 AARCH64_CPU_NAME("cortex-a53", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, true,
85 (AArch64::AEK_CRC))
86 AARCH64_CPU_NAME("cortex-a55", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
87 (AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC))
88 AARCH64_CPU_NAME("cortex-a57", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
89 (AArch64::AEK_CRC))
90 AARCH64_CPU_NAME("cortex-a72", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
91 (AArch64::AEK_CRC))
92 AARCH64_CPU_NAME("cortex-a73", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
93 (AArch64::AEK_CRC))
94 AARCH64_CPU_NAME("cortex-a75", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
95 (AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC))
96 AARCH64_CPU_NAME("cyclone", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
97 (AArch64::AEK_NONE))
98 AARCH64_CPU_NAME("exynos-m1", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
99 (AArch64::AEK_CRC))
100 AARCH64_CPU_NAME("exynos-m2", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
101 (AArch64::AEK_CRC))
102 AARCH64_CPU_NAME("exynos-m3", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
103 (AArch64::AEK_CRC))
104 AARCH64_CPU_NAME("exynos-m4", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
105 (AArch64::AEK_FP16 | AArch64::AEK_DOTPROD))
106 AARCH64_CPU_NAME("falkor", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
107 (AArch64::AEK_CRC | AArch64::AEK_RDM))
108 AARCH64_CPU_NAME("saphira", ARMV8_3A, FK_CRYPTO_NEON_FP_ARMV8, false,
109 (AArch64::AEK_PROFILE))
110 AARCH64_CPU_NAME("kryo", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
111 (AArch64::AEK_CRC))
112 AARCH64_CPU_NAME("thunderx2t99", ARMV8_1A, FK_CRYPTO_NEON_FP_ARMV8, false,
113 (AArch64::AEK_NONE))
114 AARCH64_CPU_NAME("thunderx", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
115 (AArch64::AEK_CRC | AArch64::AEK_PROFILE))
116 AARCH64_CPU_NAME("thunderxt88", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
117 (AArch64::AEK_CRC | AArch64::AEK_PROFILE))
118 AARCH64_CPU_NAME("thunderxt81", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
119 (AArch64::AEK_CRC | AArch64::AEK_PROFILE))
120 AARCH64_CPU_NAME("thunderxt83", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
121 (AArch64::AEK_CRC | AArch64::AEK_PROFILE))
122 AARCH64_CPU_NAME("tsv110", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
123 (AArch64::AEK_PROFILE | AArch64::AEK_FP16 | AArch64::AEK_FP16FML |
124 AArch64::AEK_DOTPROD))
125 // Invalid CPU
126 AARCH64_CPU_NAME("invalid", INVALID, FK_INVALID, true, AArch64::AEK_INVALID)
127 #undef AARCH64_CPU_NAME