xref: /freebsd-src/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FMV.td (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1*0fca6ea1SDimitry Andric//=------ AArch64FMV.td - Describe AArch64 FMV Features ------*- tablegen -*-=//
2*0fca6ea1SDimitry Andric//
3*0fca6ea1SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0fca6ea1SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
5*0fca6ea1SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0fca6ea1SDimitry Andric//
7*0fca6ea1SDimitry Andric//===----------------------------------------------------------------------===//
8*0fca6ea1SDimitry Andric//
9*0fca6ea1SDimitry Andric// Function MultiVersioning (FMV) properties. FMV features are accepted by the
10*0fca6ea1SDimitry Andric// attributes target_version and target_clones, and they correspond to a mapping
11*0fca6ea1SDimitry Andric// from the FMV feature name to:
12*0fca6ea1SDimitry Andric//  - A bit in the FMV ABI, as defined by the ACLE.
13*0fca6ea1SDimitry Andric//  - The FMV priority, as defined by the ACLE.
14*0fca6ea1SDimitry Andric//  - A list of backend features.
15*0fca6ea1SDimitry Andric//
16*0fca6ea1SDimitry Andric// The list of backend features is not a set of dependencies; it is specific to
17*0fca6ea1SDimitry Andric// LLVM and indicates how to do codegen when the FMV feature is present.
18*0fca6ea1SDimitry Andric//
19*0fca6ea1SDimitry Andric// Therefore FMVExtensions are separated from regular AArch64 Extensions, which
20*0fca6ea1SDimitry Andric// encode dependencies between themselves and other SubtargetFeatures.
21*0fca6ea1SDimitry Andric//===----------------------------------------------------------------------===//
22*0fca6ea1SDimitry Andric
23*0fca6ea1SDimitry Andric
24*0fca6ea1SDimitry Andric// Something you can add to target_version or target_clones.
25*0fca6ea1SDimitry Andricclass FMVExtension<string n, string b, string f, int p> {
26*0fca6ea1SDimitry Andric    // Name, as spelled in target_version or target_clones. e.g. "memtag".
27*0fca6ea1SDimitry Andric    string Name = n;
28*0fca6ea1SDimitry Andric
29*0fca6ea1SDimitry Andric    // A C++ expression giving the number of the bit in the FMV ABI.
30*0fca6ea1SDimitry Andric    // Currently this is given as a value from the enum "CPUFeatures".
31*0fca6ea1SDimitry Andric    string Bit = b;
32*0fca6ea1SDimitry Andric
33*0fca6ea1SDimitry Andric    // SubtargetFeatures enabled for codegen when this FMV feature is present.
34*0fca6ea1SDimitry Andric    string BackendFeatures = f;
35*0fca6ea1SDimitry Andric
36*0fca6ea1SDimitry Andric    // The FMV priority.
37*0fca6ea1SDimitry Andric    int Priority = p;
38*0fca6ea1SDimitry Andric}
39*0fca6ea1SDimitry Andric
40*0fca6ea1SDimitry Andricdef : FMVExtension<"aes", "FEAT_AES", "+fp-armv8,+neon", 150>;
41*0fca6ea1SDimitry Andricdef : FMVExtension<"bf16", "FEAT_BF16", "+bf16", 280>;
42*0fca6ea1SDimitry Andricdef : FMVExtension<"bti", "FEAT_BTI", "+bti", 510>;
43*0fca6ea1SDimitry Andricdef : FMVExtension<"crc", "FEAT_CRC", "+crc", 110>;
44*0fca6ea1SDimitry Andricdef : FMVExtension<"dgh", "FEAT_DGH", "", 260>;
45*0fca6ea1SDimitry Andricdef : FMVExtension<"dit", "FEAT_DIT", "+dit", 180>;
46*0fca6ea1SDimitry Andricdef : FMVExtension<"dotprod", "FEAT_DOTPROD", "+dotprod,+fp-armv8,+neon", 104>;
47*0fca6ea1SDimitry Andricdef : FMVExtension<"dpb", "FEAT_DPB", "+ccpp", 190>;
48*0fca6ea1SDimitry Andricdef : FMVExtension<"dpb2", "FEAT_DPB2", "+ccpp,+ccdp", 200>;
49*0fca6ea1SDimitry Andricdef : FMVExtension<"ebf16", "FEAT_EBF16", "+bf16", 290>;
50*0fca6ea1SDimitry Andricdef : FMVExtension<"f32mm", "FEAT_SVE_F32MM", "+sve,+f32mm,+fullfp16,+fp-armv8,+neon", 350>;
51*0fca6ea1SDimitry Andricdef : FMVExtension<"f64mm", "FEAT_SVE_F64MM", "+sve,+f64mm,+fullfp16,+fp-armv8,+neon", 360>;
52*0fca6ea1SDimitry Andricdef : FMVExtension<"fcma", "FEAT_FCMA", "+fp-armv8,+neon,+complxnum", 220>;
53*0fca6ea1SDimitry Andricdef : FMVExtension<"flagm", "FEAT_FLAGM", "+flagm", 20>;
54*0fca6ea1SDimitry Andricdef : FMVExtension<"flagm2", "FEAT_FLAGM2", "+flagm,+altnzcv", 30>;
55*0fca6ea1SDimitry Andricdef : FMVExtension<"fp", "FEAT_FP", "+fp-armv8,+neon", 90>;
56*0fca6ea1SDimitry Andricdef : FMVExtension<"fp16", "FEAT_FP16", "+fullfp16,+fp-armv8,+neon", 170>;
57*0fca6ea1SDimitry Andricdef : FMVExtension<"fp16fml", "FEAT_FP16FML", "+fp16fml,+fullfp16,+fp-armv8,+neon", 175>;
58*0fca6ea1SDimitry Andricdef : FMVExtension<"frintts", "FEAT_FRINTTS", "+fptoint", 250>;
59*0fca6ea1SDimitry Andricdef : FMVExtension<"i8mm", "FEAT_I8MM", "+i8mm", 270>;
60*0fca6ea1SDimitry Andricdef : FMVExtension<"jscvt", "FEAT_JSCVT", "+fp-armv8,+neon,+jsconv", 210>;
61*0fca6ea1SDimitry Andricdef : FMVExtension<"ls64", "FEAT_LS64", "", 520>;
62*0fca6ea1SDimitry Andricdef : FMVExtension<"ls64_accdata", "FEAT_LS64_ACCDATA", "+ls64", 540>;
63*0fca6ea1SDimitry Andricdef : FMVExtension<"ls64_v", "FEAT_LS64_V", "", 530>;
64*0fca6ea1SDimitry Andricdef : FMVExtension<"lse", "FEAT_LSE", "+lse", 80>;
65*0fca6ea1SDimitry Andricdef : FMVExtension<"memtag", "FEAT_MEMTAG", "", 440>;
66*0fca6ea1SDimitry Andricdef : FMVExtension<"memtag2", "FEAT_MEMTAG2", "+mte", 450>;
67*0fca6ea1SDimitry Andricdef : FMVExtension<"memtag3", "FEAT_MEMTAG3", "+mte", 460>;
68*0fca6ea1SDimitry Andricdef : FMVExtension<"mops", "FEAT_MOPS", "+mops", 650>;
69*0fca6ea1SDimitry Andricdef : FMVExtension<"pmull", "FEAT_PMULL", "+aes,+fp-armv8,+neon", 160>;
70*0fca6ea1SDimitry Andricdef : FMVExtension<"predres", "FEAT_PREDRES", "+predres", 480>;
71*0fca6ea1SDimitry Andricdef : FMVExtension<"rcpc", "FEAT_RCPC", "+rcpc", 230>;
72*0fca6ea1SDimitry Andricdef : FMVExtension<"rcpc2", "FEAT_RCPC2", "+rcpc", 240>;
73*0fca6ea1SDimitry Andricdef : FMVExtension<"rcpc3", "FEAT_RCPC3", "+rcpc,+rcpc3", 241>;
74*0fca6ea1SDimitry Andricdef : FMVExtension<"rdm", "FEAT_RDM", "+rdm,+fp-armv8,+neon", 108>;
75*0fca6ea1SDimitry Andricdef : FMVExtension<"rng", "FEAT_RNG", "+rand", 10>;
76*0fca6ea1SDimitry Andricdef : FMVExtension<"rpres", "FEAT_RPRES", "", 300>;
77*0fca6ea1SDimitry Andricdef : FMVExtension<"sb", "FEAT_SB", "+sb", 470>;
78*0fca6ea1SDimitry Andricdef : FMVExtension<"sha1", "FEAT_SHA1", "+fp-armv8,+neon", 120>;
79*0fca6ea1SDimitry Andricdef : FMVExtension<"sha2", "FEAT_SHA2", "+sha2,+fp-armv8,+neon", 130>;
80*0fca6ea1SDimitry Andricdef : FMVExtension<"sha3", "FEAT_SHA3", "+sha3,+sha2,+fp-armv8,+neon", 140>;
81*0fca6ea1SDimitry Andricdef : FMVExtension<"simd", "FEAT_SIMD", "+fp-armv8,+neon", 100>;
82*0fca6ea1SDimitry Andricdef : FMVExtension<"sm4", "FEAT_SM4", "+sm4,+fp-armv8,+neon", 106>;
83*0fca6ea1SDimitry Andricdef : FMVExtension<"sme", "FEAT_SME", "+sme,+bf16", 430>;
84*0fca6ea1SDimitry Andricdef : FMVExtension<"sme-f64f64", "FEAT_SME_F64", "+sme,+sme-f64f64,+bf16", 560>;
85*0fca6ea1SDimitry Andricdef : FMVExtension<"sme-i16i64", "FEAT_SME_I64", "+sme,+sme-i16i64,+bf16", 570>;
86*0fca6ea1SDimitry Andricdef : FMVExtension<"sme2", "FEAT_SME2", "+sme2,+sme,+bf16", 580>;
87*0fca6ea1SDimitry Andricdef : FMVExtension<"ssbs", "FEAT_SSBS", "", 490>;
88*0fca6ea1SDimitry Andricdef : FMVExtension<"ssbs2", "FEAT_SSBS2", "+ssbs", 500>;
89*0fca6ea1SDimitry Andricdef : FMVExtension<"sve", "FEAT_SVE", "+sve,+fullfp16,+fp-armv8,+neon", 310>;
90*0fca6ea1SDimitry Andricdef : FMVExtension<"sve-bf16", "FEAT_SVE_BF16", "+sve,+bf16,+fullfp16,+fp-armv8,+neon", 320>;
91*0fca6ea1SDimitry Andricdef : FMVExtension<"sve-ebf16", "FEAT_SVE_EBF16", "+sve,+bf16,+fullfp16,+fp-armv8,+neon", 330>;
92*0fca6ea1SDimitry Andricdef : FMVExtension<"sve-i8mm", "FEAT_SVE_I8MM", "+sve,+i8mm,+fullfp16,+fp-armv8,+neon", 340>;
93*0fca6ea1SDimitry Andricdef : FMVExtension<"sve2", "FEAT_SVE2", "+sve2,+sve,+fullfp16,+fp-armv8,+neon", 370>;
94*0fca6ea1SDimitry Andricdef : FMVExtension<"sve2-aes", "FEAT_SVE_AES", "+sve2,+sve,+sve2-aes,+fullfp16,+fp-armv8,+neon", 380>;
95*0fca6ea1SDimitry Andricdef : FMVExtension<"sve2-bitperm", "FEAT_SVE_BITPERM", "+sve2,+sve,+sve2-bitperm,+fullfp16,+fp-armv8,+neon", 400>;
96*0fca6ea1SDimitry Andricdef : FMVExtension<"sve2-pmull128", "FEAT_SVE_PMULL128", "+sve2,+sve,+sve2-aes,+fullfp16,+fp-armv8,+neon", 390>;
97*0fca6ea1SDimitry Andricdef : FMVExtension<"sve2-sha3", "FEAT_SVE_SHA3", "+sve2,+sve,+sve2-sha3,+fullfp16,+fp-armv8,+neon", 410>;
98*0fca6ea1SDimitry Andricdef : FMVExtension<"sve2-sm4", "FEAT_SVE_SM4", "+sve2,+sve,+sve2-sm4,+fullfp16,+fp-armv8,+neon", 420>;
99*0fca6ea1SDimitry Andricdef : FMVExtension<"wfxt", "FEAT_WFXT", "+wfxt", 550>;
100