Line data Source code
1 : //===- AARCH64TargetParser.def - AARCH64 target parsing defines ---------*- C++ -*-===//
2 : //
3 : // The LLVM Compiler Infrastructure
4 : //
5 : // This file is distributed under the University of Illinois Open Source
6 : // License. See LICENSE.TXT for details.
7 : //
8 : //===----------------------------------------------------------------------===//
9 : //
10 : // This file provides defines to build up the AARCH64 target parser's logic.
11 : //
12 : //===----------------------------------------------------------------------===//
13 :
14 : // NOTE: NO INCLUDE GUARD DESIRED!
15 :
16 : #ifndef AARCH64_ARCH
17 : #define AARCH64_ARCH(NAME, ID, CPU_ATTR, SUB_ARCH, ARCH_ATTR, ARCH_FPU, ARCH_BASE_EXT)
18 : #endif
19 : AARCH64_ARCH("invalid", INVALID, "", "",
20 : ARMBuildAttrs::CPUArch::v8_A, FK_NONE, AArch64::AEK_NONE)
21 : AARCH64_ARCH("armv8-a", ARMV8A, "8-A", "v8", ARMBuildAttrs::CPUArch::v8_A,
22 : FK_CRYPTO_NEON_FP_ARMV8,
23 : (AArch64::AEK_CRYPTO | AArch64::AEK_FP | AArch64::AEK_SIMD))
24 : AARCH64_ARCH("armv8.1-a", ARMV8_1A, "8.1-A", "v8.1a",
25 : ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
26 : (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
27 : AArch64::AEK_SIMD | AArch64::AEK_LSE | AArch64::AEK_RDM))
28 : AARCH64_ARCH("armv8.2-a", ARMV8_2A, "8.2-A", "v8.2a",
29 : ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
30 : (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
31 : AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
32 : AArch64::AEK_RDM))
33 : AARCH64_ARCH("armv8.3-a", ARMV8_3A, "8.3-A", "v8.3a",
34 : ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
35 : (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
36 : AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
37 : AArch64::AEK_RDM | AArch64::AEK_RCPC))
38 : AARCH64_ARCH("armv8.4-a", ARMV8_4A, "8.4-A", "v8.4a",
39 : ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
40 : (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
41 : AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
42 : AArch64::AEK_RDM | AArch64::AEK_RCPC | AArch64::AEK_DOTPROD))
43 : AARCH64_ARCH("armv8.5-a", ARMV8_5A, "8.5-A", "v8.5a",
44 : ARMBuildAttrs::CPUArch::v8_A, FK_CRYPTO_NEON_FP_ARMV8,
45 : (AArch64::AEK_CRC | AArch64::AEK_CRYPTO | AArch64::AEK_FP |
46 : AArch64::AEK_SIMD | AArch64::AEK_RAS | AArch64::AEK_LSE |
47 : AArch64::AEK_RDM | AArch64::AEK_RCPC | AArch64::AEK_DOTPROD))
48 : #undef AARCH64_ARCH
49 :
50 : #ifndef AARCH64_ARCH_EXT_NAME
51 : #define AARCH64_ARCH_EXT_NAME(NAME, ID, FEATURE, NEGFEATURE)
52 : #endif
53 : // FIXME: This would be nicer were it tablegen
54 : AARCH64_ARCH_EXT_NAME("invalid", AArch64::AEK_INVALID, nullptr, nullptr)
55 : AARCH64_ARCH_EXT_NAME("none", AArch64::AEK_NONE, nullptr, nullptr)
56 : AARCH64_ARCH_EXT_NAME("crc", AArch64::AEK_CRC, "+crc", "-crc")
57 : AARCH64_ARCH_EXT_NAME("lse", AArch64::AEK_LSE, "+lse", "-lse")
58 : AARCH64_ARCH_EXT_NAME("rdm", AArch64::AEK_RDM, "+rdm", "-rdm")
59 : AARCH64_ARCH_EXT_NAME("crypto", AArch64::AEK_CRYPTO, "+crypto","-crypto")
60 : AARCH64_ARCH_EXT_NAME("sm4", AArch64::AEK_SM4, "+sm4", "-sm4")
61 : AARCH64_ARCH_EXT_NAME("sha3", AArch64::AEK_SHA3, "+sha3", "-sha3")
62 : AARCH64_ARCH_EXT_NAME("sha2", AArch64::AEK_SHA2, "+sha2", "-sha2")
63 : AARCH64_ARCH_EXT_NAME("aes", AArch64::AEK_AES, "+aes", "-aes")
64 : AARCH64_ARCH_EXT_NAME("dotprod", AArch64::AEK_DOTPROD, "+dotprod","-dotprod")
65 : AARCH64_ARCH_EXT_NAME("fp", AArch64::AEK_FP, "+fp-armv8", "-fp-armv8")
66 : AARCH64_ARCH_EXT_NAME("simd", AArch64::AEK_SIMD, "+neon", "-neon")
67 : AARCH64_ARCH_EXT_NAME("fp16", AArch64::AEK_FP16, "+fullfp16", "-fullfp16")
68 : AARCH64_ARCH_EXT_NAME("fp16fml", AArch64::AEK_FP16FML, "+fp16fml", "-fp16fml")
69 : AARCH64_ARCH_EXT_NAME("profile", AArch64::AEK_PROFILE, "+spe", "-spe")
70 : AARCH64_ARCH_EXT_NAME("ras", AArch64::AEK_RAS, "+ras", "-ras")
71 : AARCH64_ARCH_EXT_NAME("sve", AArch64::AEK_SVE, "+sve", "-sve")
72 : AARCH64_ARCH_EXT_NAME("rcpc", AArch64::AEK_RCPC, "+rcpc", "-rcpc")
73 : AARCH64_ARCH_EXT_NAME("rng", AArch64::AEK_RAND, "+rand", "-rand")
74 : AARCH64_ARCH_EXT_NAME("memtag", AArch64::AEK_MTE, "+mte", "-mte")
75 : #undef AARCH64_ARCH_EXT_NAME
76 :
77 : #ifndef AARCH64_CPU_NAME
78 : #define AARCH64_CPU_NAME(NAME, ID, DEFAULT_FPU, IS_DEFAULT, DEFAULT_EXT)
79 : #endif
80 674 : AARCH64_CPU_NAME("cortex-a35", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
81 : (AArch64::AEK_CRC))
82 674 : AARCH64_CPU_NAME("cortex-a53", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, true,
83 : (AArch64::AEK_CRC))
84 674 : AARCH64_CPU_NAME("cortex-a55", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
85 : (AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC))
86 674 : AARCH64_CPU_NAME("cortex-a57", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
87 : (AArch64::AEK_CRC))
88 674 : AARCH64_CPU_NAME("cortex-a72", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
89 : (AArch64::AEK_CRC))
90 674 : AARCH64_CPU_NAME("cortex-a73", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
91 : (AArch64::AEK_CRC))
92 674 : AARCH64_CPU_NAME("cortex-a75", ARMV8_2A, FK_CRYPTO_NEON_FP_ARMV8, false,
93 : (AArch64::AEK_FP16 | AArch64::AEK_DOTPROD | AArch64::AEK_RCPC))
94 674 : AARCH64_CPU_NAME("cyclone", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
95 : (AArch64::AEK_NONE))
96 674 : AARCH64_CPU_NAME("exynos-m1", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
97 : (AArch64::AEK_CRC))
98 674 : AARCH64_CPU_NAME("exynos-m2", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
99 : (AArch64::AEK_CRC))
100 674 : AARCH64_CPU_NAME("exynos-m3", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
101 : (AArch64::AEK_CRC))
102 674 : AARCH64_CPU_NAME("exynos-m4", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
103 : (AArch64::AEK_CRC))
104 674 : AARCH64_CPU_NAME("falkor", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
105 : (AArch64::AEK_CRC | AArch64::AEK_RDM))
106 674 : AARCH64_CPU_NAME("saphira", ARMV8_3A, FK_CRYPTO_NEON_FP_ARMV8, false,
107 : (AArch64::AEK_PROFILE))
108 674 : AARCH64_CPU_NAME("kryo", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
109 : (AArch64::AEK_CRC))
110 674 : AARCH64_CPU_NAME("thunderx2t99", ARMV8_1A, FK_CRYPTO_NEON_FP_ARMV8, false,
111 : (AArch64::AEK_NONE))
112 674 : AARCH64_CPU_NAME("thunderx", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
113 : (AArch64::AEK_CRC | AArch64::AEK_PROFILE))
114 674 : AARCH64_CPU_NAME("thunderxt88", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
115 : (AArch64::AEK_CRC | AArch64::AEK_PROFILE))
116 674 : AARCH64_CPU_NAME("thunderxt81", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
117 : (AArch64::AEK_CRC | AArch64::AEK_PROFILE))
118 674 : AARCH64_CPU_NAME("thunderxt83", ARMV8A, FK_CRYPTO_NEON_FP_ARMV8, false,
119 : (AArch64::AEK_CRC | AArch64::AEK_PROFILE))
120 : // Invalid CPU
121 675 : AARCH64_CPU_NAME("invalid", INVALID, FK_INVALID, true, AArch64::AEK_INVALID)
122 : #undef AARCH64_CPU_NAME
|