Coverage Report

Created: 2026-08-31 07:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/keystone/llvm/lib/Target/X86/X86GenSubtargetInfo.inc
Line
Count
Source
1
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2
|*                                                                            *|
3
|* Subtarget Enumeration Source Fragment                                      *|
4
|*                                                                            *|
5
|* Automatically generated file, do not edit!                                 *|
6
|*                                                                            *|
7
\*===----------------------------------------------------------------------===*/
8
9
10
#ifdef GET_SUBTARGETINFO_ENUM
11
#undef GET_SUBTARGETINFO_ENUM
12
namespace llvm_ks {
13
namespace X86 {
14
enum : uint64_t {
15
  Feature3DNow = 0,
16
  Feature3DNowA = 1,
17
  Feature64Bit = 2,
18
  FeatureADX = 3,
19
  FeatureAES = 4,
20
  FeatureAVX = 5,
21
  FeatureAVX2 = 6,
22
  FeatureAVX512 = 7,
23
  FeatureBMI = 8,
24
  FeatureBMI2 = 9,
25
  FeatureBWI = 10,
26
  FeatureCDI = 11,
27
  FeatureCLFLUSHOPT = 12,
28
  FeatureCLWB = 13,
29
  FeatureCMOV = 14,
30
  FeatureCMPXCHG16B = 15,
31
  FeatureCallRegIndirect = 16,
32
  FeatureDQI = 17,
33
  FeatureERI = 18,
34
  FeatureF16C = 19,
35
  FeatureFMA = 20,
36
  FeatureFMA4 = 21,
37
  FeatureFSGSBase = 22,
38
  FeatureFXSR = 23,
39
  FeatureHLE = 24,
40
  FeatureIFMA = 25,
41
  FeatureINVPCID = 26,
42
  FeatureLAHFSAHF = 27,
43
  FeatureLEAForSP = 28,
44
  FeatureLEAUsesAG = 29,
45
  FeatureLZCNT = 30,
46
  FeatureMMX = 31,
47
  FeatureMOVBE = 32,
48
  FeatureMPX = 33,
49
  FeaturePCLMUL = 34,
50
  FeaturePCOMMIT = 35,
51
  FeaturePFI = 36,
52
  FeaturePKU = 37,
53
  FeaturePOPCNT = 38,
54
  FeaturePREFETCHWT1 = 39,
55
  FeaturePRFCHW = 40,
56
  FeaturePadShortFunctions = 41,
57
  FeatureRDRAND = 42,
58
  FeatureRDSEED = 43,
59
  FeatureRTM = 44,
60
  FeatureSGX = 45,
61
  FeatureSHA = 46,
62
  FeatureSMAP = 47,
63
  FeatureSSE1 = 48,
64
  FeatureSSE2 = 49,
65
  FeatureSSE3 = 50,
66
  FeatureSSE4A = 51,
67
  FeatureSSE41 = 52,
68
  FeatureSSE42 = 53,
69
  FeatureSSEUnalignedMem = 54,
70
  FeatureSSSE3 = 55,
71
  FeatureSlowBTMem = 56,
72
  FeatureSlowDivide32 = 57,
73
  FeatureSlowDivide64 = 58,
74
  FeatureSlowIncDec = 59,
75
  FeatureSlowLEA = 60,
76
  FeatureSlowSHLD = 61,
77
  FeatureSlowUAMem16 = 62,
78
  FeatureSlowUAMem32 = 63,
79
  FeatureSoftFloat = 64,
80
  FeatureTBM = 65,
81
  FeatureVBMI = 66,
82
  FeatureVLX = 67,
83
  FeatureVMFUNC = 68,
84
  FeatureXOP = 69,
85
  FeatureXSAVE = 70,
86
  FeatureXSAVEC = 71,
87
  FeatureXSAVEOPT = 72,
88
  FeatureXSAVES = 73,
89
  Mode16Bit = 74,
90
  Mode32Bit = 75,
91
  Mode64Bit = 76,
92
  ProcIntelAtom = 77,
93
  ProcIntelBDW = 78,
94
  ProcIntelCNL = 79,
95
  ProcIntelHSW = 80,
96
  ProcIntelIVB = 81,
97
  ProcIntelSKL = 82,
98
  ProcIntelSKX = 83,
99
  ProcIntelSLM = 84,
100
  ProcIntelSNB = 85
101
};
102
}
103
} // end llvm namespace
104
#endif // GET_SUBTARGETINFO_ENUM
105
106
107
#ifdef GET_SUBTARGETINFO_MC_DESC
108
#undef GET_SUBTARGETINFO_MC_DESC
109
namespace llvm_ks {
110
// Sorted (by key) array of values for CPU features.
111
extern const llvm_ks::SubtargetFeatureKV X86FeatureKV[] = {
112
  { "16bit-mode", "16-bit mode (i8086)", { X86::Mode16Bit }, { } },
113
  { "32bit-mode", "32-bit mode (80386)", { X86::Mode32Bit }, { } },
114
  { "3dnow", "Enable 3DNow! instructions", { X86::Feature3DNow }, { X86::FeatureMMX } },
115
  { "3dnowa", "Enable 3DNow! Athlon instructions", { X86::Feature3DNowA }, { X86::Feature3DNow } },
116
  { "64bit", "Support 64-bit instructions", { X86::Feature64Bit }, { X86::FeatureCMOV } },
117
  { "64bit-mode", "64-bit mode (x86_64)", { X86::Mode64Bit }, { } },
118
  { "adx", "Support ADX instructions", { X86::FeatureADX }, { } },
119
  { "aes", "Enable AES instructions", { X86::FeatureAES }, { X86::FeatureSSE2 } },
120
  { "atom", "Intel Atom processors", { X86::ProcIntelAtom }, { } },
121
  { "avx", "Enable AVX instructions", { X86::FeatureAVX }, { X86::FeatureSSE42 } },
122
  { "avx2", "Enable AVX2 instructions", { X86::FeatureAVX2 }, { X86::FeatureAVX } },
123
  { "avx512bw", "Enable AVX-512 Byte and Word Instructions", { X86::FeatureBWI }, { X86::FeatureAVX512 } },
124
  { "avx512cd", "Enable AVX-512 Conflict Detection Instructions", { X86::FeatureCDI }, { X86::FeatureAVX512 } },
125
  { "avx512dq", "Enable AVX-512 Doubleword and Quadword Instructions", { X86::FeatureDQI }, { X86::FeatureAVX512 } },
126
  { "avx512er", "Enable AVX-512 Exponential and Reciprocal Instructions", { X86::FeatureERI }, { X86::FeatureAVX512 } },
127
  { "avx512f", "Enable AVX-512 instructions", { X86::FeatureAVX512 }, { X86::FeatureAVX2 } },
128
  { "avx512pf", "Enable AVX-512 PreFetch Instructions", { X86::FeaturePFI }, { X86::FeatureAVX512 } },
129
  { "avx512vbmi", "Enable AVX-512 Vector Bit Manipulation Instructions", { X86::FeatureVBMI }, { X86::FeatureAVX512 } },
130
  { "avx512vl", "Enable AVX-512 Vector Length eXtensions", { X86::FeatureVLX }, { X86::FeatureAVX512 } },
131
  { "bdw", " Intel Broadwell Processor", { X86::ProcIntelBDW }, { X86::ProcIntelHSW, X86::FeatureADX, X86::FeatureRDSEED, X86::FeatureSMAP } },
132
  { "bmi", "Support BMI instructions", { X86::FeatureBMI }, { } },
133
  { "bmi2", "Support BMI2 instructions", { X86::FeatureBMI2 }, { } },
134
  { "call-reg-indirect", "Call register indirect", { X86::FeatureCallRegIndirect }, { } },
135
  { "clflushopt", "Flush A Cache Line Optimized", { X86::FeatureCLFLUSHOPT }, { } },
136
  { "clwb", "Cache Line Write Back", { X86::FeatureCLWB }, { } },
137
  { "cmov", "Enable conditional move instructions", { X86::FeatureCMOV }, { } },
138
  { "cnl", " Intel Cannonlake Processor", { X86::ProcIntelCNL }, { X86::ProcIntelSKX, X86::FeatureVBMI, X86::FeatureIFMA, X86::FeatureSHA } },
139
  { "cx16", "64-bit with cmpxchg16b", { X86::FeatureCMPXCHG16B }, { X86::Feature64Bit } },
140
  { "f16c", "Support 16-bit floating point conversion instructions", { X86::FeatureF16C }, { X86::FeatureAVX } },
141
  { "fma", "Enable three-operand fused multiple-add", { X86::FeatureFMA }, { X86::FeatureAVX } },
142
  { "fma4", "Enable four-operand fused multiple-add", { X86::FeatureFMA4 }, { X86::FeatureAVX, X86::FeatureSSE4A } },
143
  { "fsgsbase", "Support FS/GS Base instructions", { X86::FeatureFSGSBase }, { } },
144
  { "fxsr", "Support fxsave/fxrestore instructions", { X86::FeatureFXSR }, { } },
145
  { "hle", "Support HLE", { X86::FeatureHLE }, { } },
146
  { "hsw", " Intel Haswell Processor", { X86::ProcIntelHSW }, { X86::ProcIntelIVB, X86::FeatureAVX2, X86::FeatureBMI, X86::FeatureBMI2, X86::FeatureFMA, X86::FeatureLZCNT, X86::FeatureMOVBE, X86::FeatureINVPCID, X86::FeatureVMFUNC, X86::FeatureRTM, X86::FeatureHLE, X86::FeatureSlowIncDec } },
147
  { "idivl-to-divb", "Use 8-bit divide for positive values less than 256", { X86::FeatureSlowDivide32 }, { } },
148
  { "idivq-to-divw", "Use 16-bit divide for positive values less than 65536", { X86::FeatureSlowDivide64 }, { } },
149
  { "ifma", "Enable AVX-512 Integer Fused Multiple-Add", { X86::FeatureIFMA }, { X86::FeatureAVX512 } },
150
  { "invpcid", "Invalidate Process-Context Identifier", { X86::FeatureINVPCID }, { } },
151
  { "ivb", " Intel IvyBridge Processor", { X86::ProcIntelIVB }, { X86::ProcIntelSNB, X86::FeatureRDRAND, X86::FeatureF16C, X86::FeatureFSGSBase } },
152
  { "lea-sp", "Use LEA for adjusting the stack pointer", { X86::FeatureLEAForSP }, { } },
153
  { "lea-uses-ag", "LEA instruction needs inputs at AG stage", { X86::FeatureLEAUsesAG }, { } },
154
  { "lzcnt", "Support LZCNT instruction", { X86::FeatureLZCNT }, { } },
155
  { "mmx", "Enable MMX instructions", { X86::FeatureMMX }, { } },
156
  { "movbe", "Support MOVBE instruction", { X86::FeatureMOVBE }, { } },
157
  { "mpx", "Support MPX instructions", { X86::FeatureMPX }, { } },
158
  { "pad-short-functions", "Pad short functions", { X86::FeaturePadShortFunctions }, { } },
159
  { "pclmul", "Enable packed carry-less multiplication instructions", { X86::FeaturePCLMUL }, { X86::FeatureSSE2 } },
160
  { "pcommit", "Enable Persistent Commit", { X86::FeaturePCOMMIT }, { } },
161
  { "pku", "Enable protection keys", { X86::FeaturePKU }, { } },
162
  { "popcnt", "Support POPCNT instruction", { X86::FeaturePOPCNT }, { } },
163
  { "prefetchwt1", "Prefetch with Intent to Write and T1 Hint", { X86::FeaturePREFETCHWT1 }, { } },
164
  { "prfchw", "Support PRFCHW instructions", { X86::FeaturePRFCHW }, { } },
165
  { "rdrnd", "Support RDRAND instruction", { X86::FeatureRDRAND }, { } },
166
  { "rdseed", "Support RDSEED instruction", { X86::FeatureRDSEED }, { } },
167
  { "rtm", "Support RTM instructions", { X86::FeatureRTM }, { } },
168
  { "sahf", "Support LAHF and SAHF instructions", { X86::FeatureLAHFSAHF }, { } },
169
  { "sgx", "Enable Software Guard Extensions", { X86::FeatureSGX }, { } },
170
  { "sha", "Enable SHA instructions", { X86::FeatureSHA }, { X86::FeatureSSE2 } },
171
  { "skl", " Intel Skylake Client Processor", { X86::ProcIntelSKL }, { X86::ProcIntelBDW, X86::FeatureMPX, X86::FeatureXSAVEC, X86::FeatureXSAVES, X86::FeatureSGX, X86::FeatureCLFLUSHOPT } },
172
  { "skx", " Intel Skylake Server Processor", { X86::ProcIntelSKX }, { X86::ProcIntelSKL, X86::FeatureAVX512, X86::FeatureCDI, X86::FeatureDQI, X86::FeatureBWI, X86::FeatureVLX, X86::FeaturePKU, X86::FeaturePCOMMIT, X86::FeatureCLWB } },
173
  { "slm", "Intel Silvermont processors", { X86::ProcIntelSLM }, { } },
174
  { "slow-bt-mem", "Bit testing of memory is slow", { X86::FeatureSlowBTMem }, { } },
175
  { "slow-incdec", "INC and DEC instructions are slower than ADD and SUB", { X86::FeatureSlowIncDec }, { } },
176
  { "slow-lea", "LEA instruction with certain arguments is slow", { X86::FeatureSlowLEA }, { } },
177
  { "slow-shld", "SHLD instruction is slow", { X86::FeatureSlowSHLD }, { } },
178
  { "slow-unaligned-mem-16", "Slow unaligned 16-byte memory access", { X86::FeatureSlowUAMem16 }, { } },
179
  { "slow-unaligned-mem-32", "Slow unaligned 32-byte memory access", { X86::FeatureSlowUAMem32 }, { } },
180
  { "smap", "Supervisor Mode Access Protection", { X86::FeatureSMAP }, { } },
181
  { "snb", " Intel SandyBridge Processor", { X86::ProcIntelSNB }, { X86::FeatureMMX, X86::FeatureAVX, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeaturePOPCNT, X86::FeatureAES, X86::FeaturePCLMUL, X86::FeatureXSAVE, X86::FeatureXSAVEOPT, X86::FeatureLAHFSAHF } },
182
  { "soft-float", "Use software floating point features.", { X86::FeatureSoftFloat }, { } },
183
  { "sse", "Enable SSE instructions", { X86::FeatureSSE1 }, { X86::FeatureCMOV } },
184
  { "sse-unaligned-mem", "Allow unaligned memory operands with SSE instructions", { X86::FeatureSSEUnalignedMem }, { } },
185
  { "sse2", "Enable SSE2 instructions", { X86::FeatureSSE2 }, { X86::FeatureSSE1 } },
186
  { "sse3", "Enable SSE3 instructions", { X86::FeatureSSE3 }, { X86::FeatureSSE2 } },
187
  { "sse4.1", "Enable SSE 4.1 instructions", { X86::FeatureSSE41 }, { X86::FeatureSSSE3 } },
188
  { "sse4.2", "Enable SSE 4.2 instructions", { X86::FeatureSSE42 }, { X86::FeatureSSE41 } },
189
  { "sse4a", "Support SSE 4a instructions", { X86::FeatureSSE4A }, { X86::FeatureSSE3 } },
190
  { "ssse3", "Enable SSSE3 instructions", { X86::FeatureSSSE3 }, { X86::FeatureSSE3 } },
191
  { "tbm", "Enable TBM instructions", { X86::FeatureTBM }, { } },
192
  { "vmfunc", "VM Functions", { X86::FeatureVMFUNC }, { } },
193
  { "xop", "Enable XOP instructions", { X86::FeatureXOP }, { X86::FeatureFMA4 } },
194
  { "xsave", "Support xsave instructions", { X86::FeatureXSAVE }, { } },
195
  { "xsavec", "Support xsavec instructions", { X86::FeatureXSAVEC }, { } },
196
  { "xsaveopt", "Support xsaveopt instructions", { X86::FeatureXSAVEOPT }, { } },
197
  { "xsaves", "Support xsaves instructions", { X86::FeatureXSAVES }, { } }
198
};
199
200
// Sorted (by key) array of values for CPU subtype.
201
extern const llvm_ks::SubtargetFeatureKV X86SubTypeKV[] = {
202
  { "amdfam10", "Select the amdfam10 processor", { X86::FeatureSSE4A, X86::Feature3DNowA, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureLZCNT, X86::FeaturePOPCNT, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD, X86::FeatureLAHFSAHF }, { } },
203
  { "athlon", "Select the athlon processor", { X86::FeatureSlowUAMem16, X86::Feature3DNowA, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
204
  { "athlon-4", "Select the athlon-4 processor", { X86::FeatureSlowUAMem16, X86::FeatureSSE1, X86::Feature3DNowA, X86::FeatureFXSR, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
205
  { "athlon-fx", "Select the athlon-fx processor", { X86::FeatureSlowUAMem16, X86::FeatureSSE2, X86::Feature3DNowA, X86::FeatureFXSR, X86::Feature64Bit, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
206
  { "athlon-mp", "Select the athlon-mp processor", { X86::FeatureSlowUAMem16, X86::FeatureSSE1, X86::Feature3DNowA, X86::FeatureFXSR, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
207
  { "athlon-tbird", "Select the athlon-tbird processor", { X86::FeatureSlowUAMem16, X86::Feature3DNowA, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
208
  { "athlon-xp", "Select the athlon-xp processor", { X86::FeatureSlowUAMem16, X86::FeatureSSE1, X86::Feature3DNowA, X86::FeatureFXSR, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
209
  { "athlon64", "Select the athlon64 processor", { X86::FeatureSlowUAMem16, X86::FeatureSSE2, X86::Feature3DNowA, X86::FeatureFXSR, X86::Feature64Bit, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
210
  { "athlon64-sse3", "Select the athlon64-sse3 processor", { X86::FeatureSlowUAMem16, X86::FeatureSSE3, X86::Feature3DNowA, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
211
  { "atom", "Select the atom processor", { X86::ProcIntelAtom, X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSSE3, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureMOVBE, X86::FeatureSlowBTMem, X86::FeatureLEAForSP, X86::FeatureSlowDivide32, X86::FeatureSlowDivide64, X86::FeatureCallRegIndirect, X86::FeatureLEAUsesAG, X86::FeaturePadShortFunctions, X86::FeatureLAHFSAHF }, { } },
212
  { "barcelona", "Select the barcelona processor", { X86::FeatureSSE4A, X86::Feature3DNowA, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureLZCNT, X86::FeaturePOPCNT, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD, X86::FeatureLAHFSAHF }, { } },
213
  { "bdver1", "Select the bdver1 processor", { X86::FeatureXOP, X86::FeatureFMA4, X86::FeatureCMPXCHG16B, X86::FeatureAES, X86::FeaturePRFCHW, X86::FeaturePCLMUL, X86::FeatureMMX, X86::FeatureAVX, X86::FeatureFXSR, X86::FeatureSSE4A, X86::FeatureLZCNT, X86::FeaturePOPCNT, X86::FeatureXSAVE, X86::FeatureSlowSHLD, X86::FeatureLAHFSAHF }, { } },
214
  { "bdver2", "Select the bdver2 processor", { X86::FeatureXOP, X86::FeatureFMA4, X86::FeatureCMPXCHG16B, X86::FeatureAES, X86::FeaturePRFCHW, X86::FeaturePCLMUL, X86::FeatureMMX, X86::FeatureAVX, X86::FeatureFXSR, X86::FeatureSSE4A, X86::FeatureF16C, X86::FeatureLZCNT, X86::FeaturePOPCNT, X86::FeatureXSAVE, X86::FeatureBMI, X86::FeatureTBM, X86::FeatureFMA, X86::FeatureSlowSHLD, X86::FeatureLAHFSAHF }, { } },
215
  { "bdver3", "Select the bdver3 processor", { X86::FeatureXOP, X86::FeatureFMA4, X86::FeatureCMPXCHG16B, X86::FeatureAES, X86::FeaturePRFCHW, X86::FeaturePCLMUL, X86::FeatureMMX, X86::FeatureAVX, X86::FeatureFXSR, X86::FeatureSSE4A, X86::FeatureF16C, X86::FeatureLZCNT, X86::FeaturePOPCNT, X86::FeatureXSAVE, X86::FeatureBMI, X86::FeatureTBM, X86::FeatureFMA, X86::FeatureXSAVEOPT, X86::FeatureSlowSHLD, X86::FeatureFSGSBase, X86::FeatureLAHFSAHF }, { } },
216
  { "bdver4", "Select the bdver4 processor", { X86::FeatureMMX, X86::FeatureAVX2, X86::FeatureFXSR, X86::FeatureXOP, X86::FeatureFMA4, X86::FeatureCMPXCHG16B, X86::FeatureAES, X86::FeaturePRFCHW, X86::FeaturePCLMUL, X86::FeatureF16C, X86::FeatureLZCNT, X86::FeaturePOPCNT, X86::FeatureXSAVE, X86::FeatureBMI, X86::FeatureBMI2, X86::FeatureTBM, X86::FeatureFMA, X86::FeatureXSAVEOPT, X86::FeatureFSGSBase, X86::FeatureLAHFSAHF }, { } },
217
  { "bonnell", "Select the bonnell processor", { X86::ProcIntelAtom, X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSSE3, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureMOVBE, X86::FeatureSlowBTMem, X86::FeatureLEAForSP, X86::FeatureSlowDivide32, X86::FeatureSlowDivide64, X86::FeatureCallRegIndirect, X86::FeatureLEAUsesAG, X86::FeaturePadShortFunctions, X86::FeatureLAHFSAHF }, { } },
218
  { "broadwell", "Select the broadwell processor", { X86::ProcIntelBDW }, { } },
219
  { "btver1", "Select the btver1 processor", { X86::FeatureMMX, X86::FeatureSSSE3, X86::FeatureSSE4A, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeaturePRFCHW, X86::FeatureLZCNT, X86::FeaturePOPCNT, X86::FeatureXSAVE, X86::FeatureSlowSHLD, X86::FeatureLAHFSAHF }, { } },
220
  { "btver2", "Select the btver2 processor", { X86::FeatureMMX, X86::FeatureAVX, X86::FeatureFXSR, X86::FeatureSSE4A, X86::FeatureCMPXCHG16B, X86::FeaturePRFCHW, X86::FeatureAES, X86::FeaturePCLMUL, X86::FeatureBMI, X86::FeatureF16C, X86::FeatureMOVBE, X86::FeatureLZCNT, X86::FeaturePOPCNT, X86::FeatureXSAVE, X86::FeatureXSAVEOPT, X86::FeatureSlowSHLD, X86::FeatureLAHFSAHF }, { } },
221
  { "c3", "Select the c3 processor", { X86::FeatureSlowUAMem16, X86::Feature3DNow }, { } },
222
  { "c3-2", "Select the c3-2 processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSE1, X86::FeatureFXSR }, { } },
223
  { "cannonlake", "Select the cannonlake processor", { X86::ProcIntelCNL }, { } },
224
  { "cnl", "Select the cnl processor", { X86::ProcIntelCNL }, { } },
225
  { "core-avx-i", "Select the core-avx-i processor", { X86::ProcIntelIVB, X86::FeatureSlowBTMem, X86::FeatureSlowUAMem32 }, { } },
226
  { "core-avx2", "Select the core-avx2 processor", { X86::ProcIntelHSW }, { } },
227
  { "core2", "Select the core2 processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSSE3, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureSlowBTMem, X86::FeatureLAHFSAHF }, { } },
228
  { "corei7", "Select the corei7 processor", { X86::FeatureMMX, X86::FeatureSSE42, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureSlowBTMem, X86::FeaturePOPCNT, X86::FeatureLAHFSAHF }, { } },
229
  { "corei7-avx", "Select the corei7-avx processor", { X86::ProcIntelSNB, X86::FeatureSlowBTMem, X86::FeatureSlowUAMem32 }, { } },
230
  { "generic", "Select the generic processor", { X86::FeatureSlowUAMem16 }, { } },
231
  { "geode", "Select the geode processor", { X86::FeatureSlowUAMem16, X86::Feature3DNowA }, { } },
232
  { "haswell", "Select the haswell processor", { X86::ProcIntelHSW }, { } },
233
  { "i386", "Select the i386 processor", { X86::FeatureSlowUAMem16 }, { } },
234
  { "i486", "Select the i486 processor", { X86::FeatureSlowUAMem16 }, { } },
235
  { "i586", "Select the i586 processor", { X86::FeatureSlowUAMem16 }, { } },
236
  { "i686", "Select the i686 processor", { X86::FeatureSlowUAMem16 }, { } },
237
  { "ivybridge", "Select the ivybridge processor", { X86::ProcIntelIVB, X86::FeatureSlowBTMem, X86::FeatureSlowUAMem32 }, { } },
238
  { "k6", "Select the k6 processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX }, { } },
239
  { "k6-2", "Select the k6-2 processor", { X86::FeatureSlowUAMem16, X86::Feature3DNow }, { } },
240
  { "k6-3", "Select the k6-3 processor", { X86::FeatureSlowUAMem16, X86::Feature3DNow }, { } },
241
  { "k8", "Select the k8 processor", { X86::FeatureSlowUAMem16, X86::FeatureSSE2, X86::Feature3DNowA, X86::FeatureFXSR, X86::Feature64Bit, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
242
  { "k8-sse3", "Select the k8-sse3 processor", { X86::FeatureSlowUAMem16, X86::FeatureSSE3, X86::Feature3DNowA, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
243
  { "knl", "Select the knl processor", { X86::ProcIntelIVB, X86::FeatureAVX512, X86::FeatureERI, X86::FeatureCDI, X86::FeaturePFI, X86::FeaturePREFETCHWT1, X86::FeatureADX, X86::FeatureRDSEED, X86::FeatureMOVBE, X86::FeatureLZCNT, X86::FeatureBMI, X86::FeatureBMI2, X86::FeatureFMA }, { } },
244
  { "nehalem", "Select the nehalem processor", { X86::FeatureMMX, X86::FeatureSSE42, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureSlowBTMem, X86::FeaturePOPCNT, X86::FeatureLAHFSAHF }, { } },
245
  { "nocona", "Select the nocona processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSE3, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureSlowBTMem }, { } },
246
  { "opteron", "Select the opteron processor", { X86::FeatureSlowUAMem16, X86::FeatureSSE2, X86::Feature3DNowA, X86::FeatureFXSR, X86::Feature64Bit, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
247
  { "opteron-sse3", "Select the opteron-sse3 processor", { X86::FeatureSlowUAMem16, X86::FeatureSSE3, X86::Feature3DNowA, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureSlowBTMem, X86::FeatureSlowSHLD }, { } },
248
  { "penryn", "Select the penryn processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSE41, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureSlowBTMem, X86::FeatureLAHFSAHF }, { } },
249
  { "pentium", "Select the pentium processor", { X86::FeatureSlowUAMem16 }, { } },
250
  { "pentium-m", "Select the pentium-m processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSE2, X86::FeatureFXSR, X86::FeatureSlowBTMem }, { } },
251
  { "pentium-mmx", "Select the pentium-mmx processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX }, { } },
252
  { "pentium2", "Select the pentium2 processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureCMOV, X86::FeatureFXSR }, { } },
253
  { "pentium3", "Select the pentium3 processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSE1, X86::FeatureFXSR }, { } },
254
  { "pentium3m", "Select the pentium3m processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSE1, X86::FeatureFXSR, X86::FeatureSlowBTMem }, { } },
255
  { "pentium4", "Select the pentium4 processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSE2, X86::FeatureFXSR }, { } },
256
  { "pentium4m", "Select the pentium4m processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSE2, X86::FeatureFXSR, X86::FeatureSlowBTMem }, { } },
257
  { "pentiumpro", "Select the pentiumpro processor", { X86::FeatureSlowUAMem16, X86::FeatureCMOV }, { } },
258
  { "prescott", "Select the prescott processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSE3, X86::FeatureFXSR, X86::FeatureSlowBTMem }, { } },
259
  { "sandybridge", "Select the sandybridge processor", { X86::ProcIntelSNB, X86::FeatureSlowBTMem, X86::FeatureSlowUAMem32 }, { } },
260
  { "silvermont", "Select the silvermont processor", { X86::ProcIntelSLM, X86::FeatureMMX, X86::FeatureSSE42, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureMOVBE, X86::FeaturePOPCNT, X86::FeaturePCLMUL, X86::FeatureAES, X86::FeatureSlowDivide64, X86::FeatureCallRegIndirect, X86::FeaturePRFCHW, X86::FeatureSlowLEA, X86::FeatureSlowIncDec, X86::FeatureSlowBTMem, X86::FeatureLAHFSAHF }, { } },
261
  { "skl", "Select the skl processor", { X86::ProcIntelSKL }, { } },
262
  { "skx", "Select the skx processor", { X86::ProcIntelSKX }, { } },
263
  { "skylake", "Select the skylake processor", { X86::ProcIntelSKX }, { } },
264
  { "slm", "Select the slm processor", { X86::ProcIntelSLM, X86::FeatureMMX, X86::FeatureSSE42, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureMOVBE, X86::FeaturePOPCNT, X86::FeaturePCLMUL, X86::FeatureAES, X86::FeatureSlowDivide64, X86::FeatureCallRegIndirect, X86::FeaturePRFCHW, X86::FeatureSlowLEA, X86::FeatureSlowIncDec, X86::FeatureSlowBTMem, X86::FeatureLAHFSAHF }, { } },
265
  { "westmere", "Select the westmere processor", { X86::FeatureMMX, X86::FeatureSSE42, X86::FeatureFXSR, X86::FeatureCMPXCHG16B, X86::FeatureSlowBTMem, X86::FeaturePOPCNT, X86::FeatureAES, X86::FeaturePCLMUL, X86::FeatureLAHFSAHF }, { } },
266
  { "winchip-c6", "Select the winchip-c6 processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX }, { } },
267
  { "winchip2", "Select the winchip2 processor", { X86::FeatureSlowUAMem16, X86::Feature3DNow }, { } },
268
  { "x86-64", "Select the x86-64 processor", { X86::FeatureMMX, X86::FeatureSSE2, X86::FeatureFXSR, X86::Feature64Bit, X86::FeatureSlowBTMem }, { } },
269
  { "yonah", "Select the yonah processor", { X86::FeatureSlowUAMem16, X86::FeatureMMX, X86::FeatureSSE3, X86::FeatureFXSR, X86::FeatureSlowBTMem }, { } }
270
};
271
272
#ifdef DBGFIELD
273
#error "<target>GenSubtargetInfo.inc requires a DBGFIELD macro"
274
#endif
275
#ifndef NDEBUG
276
#define DBGFIELD(x) x,
277
#else
278
#define DBGFIELD(x)
279
#endif
280
281
#undef DBGFIELD
282
22.6k
static inline MCSubtargetInfo *createX86MCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef FS) {
283
  return new MCSubtargetInfo(TT, CPU, FS, X86FeatureKV, X86SubTypeKV, NULL);
284
22.6k
}
285
286
} // end llvm namespace
287
#endif // GET_SUBTARGETINFO_MC_DESC
288
289
290
#ifdef GET_SUBTARGETINFO_TARGET_DESC
291
#undef GET_SUBTARGETINFO_TARGET_DESC
292
#include "llvm/Support/Debug.h"
293
#include "llvm/Support/raw_ostream.h"
294
// ParseSubtargetFeatures - Parses features string setting specified
295
// subtarget options.
296
void llvm_ks::X86Subtarget::ParseSubtargetFeatures(StringRef CPU, StringRef FS) {
297
  DEBUG(dbgs() << "\nFeatures:" << FS);
298
  DEBUG(dbgs() << "\nCPU:" << CPU << "\n\n");
299
  InitMCProcessorInfo(CPU, FS);
300
  const FeatureBitset& Bits = getFeatureBits();
301
  if (Bits[X86::Feature3DNow] && X863DNowLevel < ThreeDNow) X863DNowLevel = ThreeDNow;
302
  if (Bits[X86::Feature3DNowA] && X863DNowLevel < ThreeDNowA) X863DNowLevel = ThreeDNowA;
303
  if (Bits[X86::Feature64Bit]) HasX86_64 = true;
304
  if (Bits[X86::FeatureADX]) HasADX = true;
305
  if (Bits[X86::FeatureAES]) HasAES = true;
306
  if (Bits[X86::FeatureAVX] && X86SSELevel < AVX) X86SSELevel = AVX;
307
  if (Bits[X86::FeatureAVX2] && X86SSELevel < AVX2) X86SSELevel = AVX2;
308
  if (Bits[X86::FeatureAVX512] && X86SSELevel < AVX512F) X86SSELevel = AVX512F;
309
  if (Bits[X86::FeatureBMI]) HasBMI = true;
310
  if (Bits[X86::FeatureBMI2]) HasBMI2 = true;
311
  if (Bits[X86::FeatureBWI]) HasBWI = true;
312
  if (Bits[X86::FeatureCDI]) HasCDI = true;
313
  if (Bits[X86::FeatureCLFLUSHOPT]) HasCLFLUSHOPT = true;
314
  if (Bits[X86::FeatureCLWB]) HasCLWB = true;
315
  if (Bits[X86::FeatureCMOV]) HasCMov = true;
316
  if (Bits[X86::FeatureCMPXCHG16B]) HasCmpxchg16b = true;
317
  if (Bits[X86::FeatureCallRegIndirect]) CallRegIndirect = true;
318
  if (Bits[X86::FeatureDQI]) HasDQI = true;
319
  if (Bits[X86::FeatureERI]) HasERI = true;
320
  if (Bits[X86::FeatureF16C]) HasF16C = true;
321
  if (Bits[X86::FeatureFMA]) HasFMA = true;
322
  if (Bits[X86::FeatureFMA4]) HasFMA4 = true;
323
  if (Bits[X86::FeatureFSGSBase]) HasFSGSBase = true;
324
  if (Bits[X86::FeatureFXSR]) HasFXSR = true;
325
  if (Bits[X86::FeatureHLE]) HasHLE = true;
326
  if (Bits[X86::FeatureIFMA]) HasIFMA = true;
327
  if (Bits[X86::FeatureINVPCID]) HasInvPCId = true;
328
  if (Bits[X86::FeatureLAHFSAHF]) HasLAHFSAHF = true;
329
  if (Bits[X86::FeatureLEAForSP]) UseLeaForSP = true;
330
  if (Bits[X86::FeatureLEAUsesAG]) LEAUsesAG = true;
331
  if (Bits[X86::FeatureLZCNT]) HasLZCNT = true;
332
  if (Bits[X86::FeatureMMX] && X863DNowLevel < MMX) X863DNowLevel = MMX;
333
  if (Bits[X86::FeatureMOVBE]) HasMOVBE = true;
334
  if (Bits[X86::FeatureMPX]) HasMPX = true;
335
  if (Bits[X86::FeaturePCLMUL]) HasPCLMUL = true;
336
  if (Bits[X86::FeaturePCOMMIT]) HasPCOMMIT = true;
337
  if (Bits[X86::FeaturePFI]) HasPFI = true;
338
  if (Bits[X86::FeaturePKU]) HasPKU = true;
339
  if (Bits[X86::FeaturePOPCNT]) HasPOPCNT = true;
340
  if (Bits[X86::FeaturePREFETCHWT1]) HasPFPREFETCHWT1 = true;
341
  if (Bits[X86::FeaturePRFCHW]) HasPRFCHW = true;
342
  if (Bits[X86::FeaturePadShortFunctions]) PadShortFunctions = true;
343
  if (Bits[X86::FeatureRDRAND]) HasRDRAND = true;
344
  if (Bits[X86::FeatureRDSEED]) HasRDSEED = true;
345
  if (Bits[X86::FeatureRTM]) HasRTM = true;
346
  if (Bits[X86::FeatureSGX]) HasSGX = true;
347
  if (Bits[X86::FeatureSHA]) HasSHA = true;
348
  if (Bits[X86::FeatureSMAP]) HasSMAP = true;
349
  if (Bits[X86::FeatureSSE1] && X86SSELevel < SSE1) X86SSELevel = SSE1;
350
  if (Bits[X86::FeatureSSE2] && X86SSELevel < SSE2) X86SSELevel = SSE2;
351
  if (Bits[X86::FeatureSSE3] && X86SSELevel < SSE3) X86SSELevel = SSE3;
352
  if (Bits[X86::FeatureSSE4A]) HasSSE4A = true;
353
  if (Bits[X86::FeatureSSE41] && X86SSELevel < SSE41) X86SSELevel = SSE41;
354
  if (Bits[X86::FeatureSSE42] && X86SSELevel < SSE42) X86SSELevel = SSE42;
355
  if (Bits[X86::FeatureSSEUnalignedMem]) HasSSEUnalignedMem = true;
356
  if (Bits[X86::FeatureSSSE3] && X86SSELevel < SSSE3) X86SSELevel = SSSE3;
357
  if (Bits[X86::FeatureSlowBTMem]) IsBTMemSlow = true;
358
  if (Bits[X86::FeatureSlowDivide32]) HasSlowDivide32 = true;
359
  if (Bits[X86::FeatureSlowDivide64]) HasSlowDivide64 = true;
360
  if (Bits[X86::FeatureSlowIncDec]) SlowIncDec = true;
361
  if (Bits[X86::FeatureSlowLEA]) SlowLEA = true;
362
  if (Bits[X86::FeatureSlowSHLD]) IsSHLDSlow = true;
363
  if (Bits[X86::FeatureSlowUAMem16]) IsUAMem16Slow = true;
364
  if (Bits[X86::FeatureSlowUAMem32]) IsUAMem32Slow = true;
365
  if (Bits[X86::FeatureSoftFloat]) UseSoftFloat = true;
366
  if (Bits[X86::FeatureTBM]) HasTBM = true;
367
  if (Bits[X86::FeatureVBMI]) HasVBMI = true;
368
  if (Bits[X86::FeatureVLX]) HasVLX = true;
369
  if (Bits[X86::FeatureVMFUNC]) HasVMFUNC = true;
370
  if (Bits[X86::FeatureXOP]) HasXOP = true;
371
  if (Bits[X86::FeatureXSAVE]) HasXSAVE = true;
372
  if (Bits[X86::FeatureXSAVEC]) HasXSAVEC = true;
373
  if (Bits[X86::FeatureXSAVEOPT]) HasXSAVEOPT = true;
374
  if (Bits[X86::FeatureXSAVES]) HasXSAVES = true;
375
  if (Bits[X86::Mode16Bit]) In16BitMode = true;
376
  if (Bits[X86::Mode32Bit]) In32BitMode = true;
377
  if (Bits[X86::Mode64Bit]) In64BitMode = true;
378
  if (Bits[X86::ProcIntelAtom] && X86ProcFamily < IntelAtom) X86ProcFamily = IntelAtom;
379
  if (Bits[X86::ProcIntelBDW] && X86ProcFamily < IntelBDW) X86ProcFamily = IntelBDW;
380
  if (Bits[X86::ProcIntelCNL] && X86ProcFamily < IntelCNL) X86ProcFamily = IntelCNL;
381
  if (Bits[X86::ProcIntelHSW] && X86ProcFamily < IntelHSW) X86ProcFamily = IntelHSW;
382
  if (Bits[X86::ProcIntelIVB] && X86ProcFamily < IntelIVB) X86ProcFamily = IntelIVB;
383
  if (Bits[X86::ProcIntelSKL] && X86ProcFamily < IntelSKL) X86ProcFamily = IntelSKL;
384
  if (Bits[X86::ProcIntelSKX] && X86ProcFamily < IntelSKX) X86ProcFamily = IntelSKX;
385
  if (Bits[X86::ProcIntelSLM] && X86ProcFamily < IntelSLM) X86ProcFamily = IntelSLM;
386
  if (Bits[X86::ProcIntelSNB] && X86ProcFamily < IntelSNB) X86ProcFamily = IntelSNB;
387
}
388
#endif // GET_SUBTARGETINFO_TARGET_DESC