1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4
5// This class wraps the CORJIT_FLAGS type in the JIT-EE interface (in corjit.h) such that the JIT can
6// build with either the old flags (COR_JIT_EE_VERSION <= 460) or the new flags (COR_JIT_EE_VERSION > 460).
7// It actually is exactly the same as the new definition, and must be kept up-to-date with the new definition.
8// When built against an old JIT-EE interface, the old flags are converted into this structure.
9class JitFlags
10{
11public:
12 // clang-format off
13 enum JitFlag
14 {
15 JIT_FLAG_SPEED_OPT = 0,
16 JIT_FLAG_SIZE_OPT = 1,
17 JIT_FLAG_DEBUG_CODE = 2, // generate "debuggable" code (no code-mangling optimizations)
18 JIT_FLAG_DEBUG_EnC = 3, // We are in Edit-n-Continue mode
19 JIT_FLAG_DEBUG_INFO = 4, // generate line and local-var info
20 JIT_FLAG_MIN_OPT = 5, // disable all jit optimizations (not necesarily debuggable code)
21 JIT_FLAG_GCPOLL_CALLS = 6, // Emit calls to JIT_POLLGC for thread suspension.
22 JIT_FLAG_MCJIT_BACKGROUND = 7, // Calling from multicore JIT background thread, do not call JitComplete
23
24 #if defined(_TARGET_X86_)
25
26 JIT_FLAG_PINVOKE_RESTORE_ESP = 8, // Restore ESP after returning from inlined PInvoke
27 JIT_FLAG_TARGET_P4 = 9,
28 JIT_FLAG_USE_FCOMI = 10, // Generated code may use fcomi(p) instruction
29 JIT_FLAG_USE_CMOV = 11, // Generated code may use cmov instruction
30 JIT_FLAG_USE_SSE2 = 12, // Generated code may use SSE-2 instructions
31
32 #else // !defined(_TARGET_X86_)
33
34 JIT_FLAG_UNUSED1 = 8,
35 JIT_FLAG_UNUSED2 = 9,
36 JIT_FLAG_UNUSED3 = 10,
37 JIT_FLAG_UNUSED4 = 11,
38 JIT_FLAG_UNUSED5 = 12,
39
40 #endif // !defined(_TARGET_X86_)
41
42 JIT_FLAG_UNUSED6 = 13,
43
44 #if defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
45
46 JIT_FLAG_USE_AVX = 14,
47 JIT_FLAG_USE_AVX2 = 15,
48 JIT_FLAG_USE_AVX_512 = 16,
49
50 #else // !defined(_TARGET_X86_) && !defined(_TARGET_AMD64_)
51
52 JIT_FLAG_UNUSED7 = 14,
53 JIT_FLAG_UNUSED8 = 15,
54 JIT_FLAG_UNUSED9 = 16,
55
56 #endif // !defined(_TARGET_X86_) && !defined(_TARGET_AMD64_)
57
58 #if defined(_TARGET_X86_) || defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)
59 JIT_FLAG_FEATURE_SIMD = 17,
60 #else
61 JIT_FLAG_UNUSED10 = 17,
62 #endif // !(defined(_TARGET_X86_) || defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_))
63
64 JIT_FLAG_MAKEFINALCODE = 18, // Use the final code generator, i.e., not the interpreter.
65 JIT_FLAG_READYTORUN = 19, // Use version-resilient code generation
66 JIT_FLAG_PROF_ENTERLEAVE = 20, // Instrument prologues/epilogues
67 JIT_FLAG_PROF_REJIT_NOPS = 21, // Insert NOPs to ensure code is re-jitable
68 JIT_FLAG_PROF_NO_PINVOKE_INLINE = 22, // Disables PInvoke inlining
69 JIT_FLAG_SKIP_VERIFICATION = 23, // (lazy) skip verification - determined without doing a full resolve. See comment below
70 JIT_FLAG_PREJIT = 24, // jit or prejit is the execution engine.
71 JIT_FLAG_RELOC = 25, // Generate relocatable code
72 JIT_FLAG_IMPORT_ONLY = 26, // Only import the function
73 JIT_FLAG_IL_STUB = 27, // method is an IL stub
74 JIT_FLAG_PROCSPLIT = 28, // JIT should separate code into hot and cold sections
75 JIT_FLAG_BBINSTR = 29, // Collect basic block profile information
76 JIT_FLAG_BBOPT = 30, // Optimize method based on profile information
77 JIT_FLAG_FRAMED = 31, // All methods have an EBP frame
78 JIT_FLAG_ALIGN_LOOPS = 32, // add NOPs before loops to align them at 16 byte boundaries
79 JIT_FLAG_PUBLISH_SECRET_PARAM = 33, // JIT must place stub secret param into local 0. (used by IL stubs)
80 JIT_FLAG_GCPOLL_INLINE = 34, // JIT must inline calls to GCPoll when possible
81 JIT_FLAG_SAMPLING_JIT_BACKGROUND = 35, // JIT is being invoked as a result of stack sampling for hot methods in the background
82 JIT_FLAG_USE_PINVOKE_HELPERS = 36, // The JIT should use the PINVOKE_{BEGIN,END} helpers instead of emitting inline transitions
83 JIT_FLAG_REVERSE_PINVOKE = 37, // The JIT should insert REVERSE_PINVOKE_{ENTER,EXIT} helpers into method prolog/epilog
84 JIT_FLAG_DESKTOP_QUIRKS = 38, // The JIT should generate desktop-quirk-compatible code
85 JIT_FLAG_TIER0 = 39, // This is the initial tier for tiered compilation which should generate code as quickly as possible
86 JIT_FLAG_TIER1 = 40, // This is the final tier (for now) for tiered compilation which should generate high quality code
87
88#if defined(_TARGET_ARM_)
89 JIT_FLAG_RELATIVE_CODE_RELOCS = 41, // JIT should generate PC-relative address computations instead of EE relocation records
90#else // !defined(_TARGET_ARM_)
91 JIT_FLAG_UNUSED11 = 41,
92#endif // !defined(_TARGET_ARM_)
93
94 JIT_FLAG_NO_INLINING = 42, // JIT should not inline any called method into this method
95
96#if defined(_TARGET_ARM64_)
97
98 JIT_FLAG_HAS_ARM64_AES = 43, // ID_AA64ISAR0_EL1.AES is 1 or better
99 JIT_FLAG_HAS_ARM64_ATOMICS = 44, // ID_AA64ISAR0_EL1.Atomic is 2 or better
100 JIT_FLAG_HAS_ARM64_CRC32 = 45, // ID_AA64ISAR0_EL1.CRC32 is 1 or better
101 JIT_FLAG_HAS_ARM64_DCPOP = 46, // ID_AA64ISAR1_EL1.DPB is 1 or better
102 JIT_FLAG_HAS_ARM64_DP = 47, // ID_AA64ISAR0_EL1.DP is 1 or better
103 JIT_FLAG_HAS_ARM64_FCMA = 48, // ID_AA64ISAR1_EL1.FCMA is 1 or better
104 JIT_FLAG_HAS_ARM64_FP = 49, // ID_AA64PFR0_EL1.FP is 0 or better
105 JIT_FLAG_HAS_ARM64_FP16 = 50, // ID_AA64PFR0_EL1.FP is 1 or better
106 JIT_FLAG_HAS_ARM64_JSCVT = 51, // ID_AA64ISAR1_EL1.JSCVT is 1 or better
107 JIT_FLAG_HAS_ARM64_LRCPC = 52, // ID_AA64ISAR1_EL1.LRCPC is 1 or better
108 JIT_FLAG_HAS_ARM64_PMULL = 53, // ID_AA64ISAR0_EL1.AES is 2 or better
109 JIT_FLAG_HAS_ARM64_SHA1 = 54, // ID_AA64ISAR0_EL1.SHA1 is 1 or better
110 JIT_FLAG_HAS_ARM64_SHA256 = 55, // ID_AA64ISAR0_EL1.SHA2 is 1 or better
111 JIT_FLAG_HAS_ARM64_SHA512 = 56, // ID_AA64ISAR0_EL1.SHA2 is 2 or better
112 JIT_FLAG_HAS_ARM64_SHA3 = 57, // ID_AA64ISAR0_EL1.SHA3 is 1 or better
113 JIT_FLAG_HAS_ARM64_SIMD = 58, // ID_AA64PFR0_EL1.AdvSIMD is 0 or better
114 JIT_FLAG_HAS_ARM64_SIMD_V81 = 59, // ID_AA64ISAR0_EL1.RDM is 1 or better
115 JIT_FLAG_HAS_ARM64_SIMD_FP16 = 60, // ID_AA64PFR0_EL1.AdvSIMD is 1 or better
116 JIT_FLAG_HAS_ARM64_SM3 = 61, // ID_AA64ISAR0_EL1.SM3 is 1 or better
117 JIT_FLAG_HAS_ARM64_SM4 = 62, // ID_AA64ISAR0_EL1.SM4 is 1 or better
118 JIT_FLAG_HAS_ARM64_SVE = 63 // ID_AA64PFR0_EL1.SVE is 1 or better
119
120#elif defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
121
122 JIT_FLAG_USE_SSE3 = 43,
123 JIT_FLAG_USE_SSSE3 = 44,
124 JIT_FLAG_USE_SSE41 = 45,
125 JIT_FLAG_USE_SSE42 = 46,
126 JIT_FLAG_USE_AES = 47,
127 JIT_FLAG_USE_BMI1 = 48,
128 JIT_FLAG_USE_BMI2 = 49,
129 JIT_FLAG_USE_FMA = 50,
130 JIT_FLAG_USE_LZCNT = 51,
131 JIT_FLAG_USE_PCLMULQDQ = 52,
132 JIT_FLAG_USE_POPCNT = 53,
133 JIT_FLAG_UNUSED23 = 54,
134 JIT_FLAG_UNUSED24 = 55,
135 JIT_FLAG_UNUSED25 = 56,
136 JIT_FLAG_UNUSED26 = 57,
137 JIT_FLAG_UNUSED27 = 58,
138 JIT_FLAG_UNUSED28 = 59,
139 JIT_FLAG_UNUSED29 = 60,
140 JIT_FLAG_UNUSED30 = 61,
141 JIT_FLAG_UNUSED31 = 62,
142 JIT_FLAG_UNUSED32 = 63
143
144
145#else // !defined(_TARGET_ARM64_) && !defined(_TARGET_X86_) && !defined(_TARGET_AMD64_)
146
147 JIT_FLAG_UNUSED12 = 43,
148 JIT_FLAG_UNUSED13 = 44,
149 JIT_FLAG_UNUSED14 = 45,
150 JIT_FLAG_UNUSED15 = 46,
151 JIT_FLAG_UNUSED16 = 47,
152 JIT_FLAG_UNUSED17 = 48,
153 JIT_FLAG_UNUSED18 = 49,
154 JIT_FLAG_UNUSED19 = 50,
155 JIT_FLAG_UNUSED20 = 51,
156 JIT_FLAG_UNUSED21 = 52,
157 JIT_FLAG_UNUSED22 = 53,
158 JIT_FLAG_UNUSED23 = 54,
159 JIT_FLAG_UNUSED24 = 55,
160 JIT_FLAG_UNUSED25 = 56,
161 JIT_FLAG_UNUSED26 = 57,
162 JIT_FLAG_UNUSED27 = 58,
163 JIT_FLAG_UNUSED28 = 59,
164 JIT_FLAG_UNUSED29 = 60,
165 JIT_FLAG_UNUSED30 = 61,
166 JIT_FLAG_UNUSED31 = 62,
167 JIT_FLAG_UNUSED32 = 63
168
169#endif // !defined(_TARGET_ARM64_) && !defined(_TARGET_X86_) && !defined(_TARGET_AMD64_)
170
171 };
172 // clang-format on
173
174 JitFlags() : m_jitFlags(0)
175 {
176 // empty
177 }
178
179 // Convenience constructor to set exactly one flags.
180 JitFlags(JitFlag flag) : m_jitFlags(0)
181 {
182 Set(flag);
183 }
184
185 void Reset()
186 {
187 m_jitFlags = 0;
188 }
189
190 void Set(JitFlag flag)
191 {
192 m_jitFlags |= 1ULL << (unsigned __int64)flag;
193 }
194
195 void Clear(JitFlag flag)
196 {
197 m_jitFlags &= ~(1ULL << (unsigned __int64)flag);
198 }
199
200 bool IsSet(JitFlag flag) const
201 {
202 return (m_jitFlags & (1ULL << (unsigned __int64)flag)) != 0;
203 }
204
205 void Add(const JitFlags& other)
206 {
207 m_jitFlags |= other.m_jitFlags;
208 }
209
210 void Remove(const JitFlags& other)
211 {
212 m_jitFlags &= ~other.m_jitFlags;
213 }
214
215 bool IsEmpty() const
216 {
217 return m_jitFlags == 0;
218 }
219
220 void SetFromFlags(CORJIT_FLAGS flags)
221 {
222 // We don't want to have to check every one, so we assume it is exactly the same values as the JitFlag
223 // values defined in this type.
224 m_jitFlags = flags.GetFlagsRaw();
225
226 C_ASSERT(sizeof(m_jitFlags) == sizeof(CORJIT_FLAGS));
227
228#define FLAGS_EQUAL(a, b) C_ASSERT((unsigned)(a) == (unsigned)(b))
229
230 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_SPEED_OPT, JIT_FLAG_SPEED_OPT);
231 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_SIZE_OPT, JIT_FLAG_SIZE_OPT);
232 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_CODE, JIT_FLAG_DEBUG_CODE);
233 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_EnC, JIT_FLAG_DEBUG_EnC);
234 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_INFO, JIT_FLAG_DEBUG_INFO);
235 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_MIN_OPT, JIT_FLAG_MIN_OPT);
236 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_GCPOLL_CALLS, JIT_FLAG_GCPOLL_CALLS);
237 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_MCJIT_BACKGROUND, JIT_FLAG_MCJIT_BACKGROUND);
238
239#if defined(_TARGET_X86_)
240
241 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_PINVOKE_RESTORE_ESP, JIT_FLAG_PINVOKE_RESTORE_ESP);
242 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_TARGET_P4, JIT_FLAG_TARGET_P4);
243 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_FCOMI, JIT_FLAG_USE_FCOMI);
244 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_CMOV, JIT_FLAG_USE_CMOV);
245 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_SSE2, JIT_FLAG_USE_SSE2);
246
247#endif
248
249#if defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
250
251 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_AVX, JIT_FLAG_USE_AVX);
252 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_AVX2, JIT_FLAG_USE_AVX2);
253 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_AVX_512, JIT_FLAG_USE_AVX_512);
254
255#endif
256
257#if defined(_TARGET_X86_) || defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)
258
259 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_FEATURE_SIMD, JIT_FLAG_FEATURE_SIMD);
260
261#endif
262
263 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_MAKEFINALCODE, JIT_FLAG_MAKEFINALCODE);
264 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_READYTORUN, JIT_FLAG_READYTORUN);
265 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_PROF_ENTERLEAVE, JIT_FLAG_PROF_ENTERLEAVE);
266 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_PROF_REJIT_NOPS, JIT_FLAG_PROF_REJIT_NOPS);
267 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_PROF_NO_PINVOKE_INLINE, JIT_FLAG_PROF_NO_PINVOKE_INLINE);
268 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_SKIP_VERIFICATION, JIT_FLAG_SKIP_VERIFICATION);
269 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_PREJIT, JIT_FLAG_PREJIT);
270 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_RELOC, JIT_FLAG_RELOC);
271 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_IMPORT_ONLY, JIT_FLAG_IMPORT_ONLY);
272 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_IL_STUB, JIT_FLAG_IL_STUB);
273 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_PROCSPLIT, JIT_FLAG_PROCSPLIT);
274 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_BBINSTR, JIT_FLAG_BBINSTR);
275 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_BBOPT, JIT_FLAG_BBOPT);
276 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_FRAMED, JIT_FLAG_FRAMED);
277 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_ALIGN_LOOPS, JIT_FLAG_ALIGN_LOOPS);
278 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_PUBLISH_SECRET_PARAM, JIT_FLAG_PUBLISH_SECRET_PARAM);
279 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_GCPOLL_INLINE, JIT_FLAG_GCPOLL_INLINE);
280 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_SAMPLING_JIT_BACKGROUND, JIT_FLAG_SAMPLING_JIT_BACKGROUND);
281 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_PINVOKE_HELPERS, JIT_FLAG_USE_PINVOKE_HELPERS);
282 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_REVERSE_PINVOKE, JIT_FLAG_REVERSE_PINVOKE);
283 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_DESKTOP_QUIRKS, JIT_FLAG_DESKTOP_QUIRKS);
284 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_TIER0, JIT_FLAG_TIER0);
285 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_TIER1, JIT_FLAG_TIER1);
286
287#if defined(_TARGET_ARM_)
288
289 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_RELATIVE_CODE_RELOCS, JIT_FLAG_RELATIVE_CODE_RELOCS);
290
291#endif // _TARGET_ARM_
292
293 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_NO_INLINING, JIT_FLAG_NO_INLINING);
294
295#if defined(_TARGET_ARM64_)
296
297 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_AES, JIT_FLAG_HAS_ARM64_AES);
298 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_ATOMICS, JIT_FLAG_HAS_ARM64_ATOMICS);
299 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_CRC32, JIT_FLAG_HAS_ARM64_CRC32);
300 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_DCPOP, JIT_FLAG_HAS_ARM64_DCPOP);
301 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_DP, JIT_FLAG_HAS_ARM64_DP);
302 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_FCMA, JIT_FLAG_HAS_ARM64_FCMA);
303 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_FP, JIT_FLAG_HAS_ARM64_FP);
304 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_FP16, JIT_FLAG_HAS_ARM64_FP16);
305 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_JSCVT, JIT_FLAG_HAS_ARM64_JSCVT);
306 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_LRCPC, JIT_FLAG_HAS_ARM64_LRCPC);
307 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_PMULL, JIT_FLAG_HAS_ARM64_PMULL);
308 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_SHA1, JIT_FLAG_HAS_ARM64_SHA1);
309 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_SHA256, JIT_FLAG_HAS_ARM64_SHA256);
310 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_SHA512, JIT_FLAG_HAS_ARM64_SHA512);
311 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_SHA3, JIT_FLAG_HAS_ARM64_SHA3);
312 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_SIMD, JIT_FLAG_HAS_ARM64_SIMD);
313 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_SIMD_V81, JIT_FLAG_HAS_ARM64_SIMD_V81);
314 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_SIMD_FP16, JIT_FLAG_HAS_ARM64_SIMD_FP16);
315 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_SM3, JIT_FLAG_HAS_ARM64_SM3);
316 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_SM4, JIT_FLAG_HAS_ARM64_SM4);
317 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_HAS_ARM64_SVE, JIT_FLAG_HAS_ARM64_SVE);
318
319#elif defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
320
321 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_SSE3, JIT_FLAG_USE_SSE3);
322 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_SSSE3, JIT_FLAG_USE_SSSE3);
323 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_SSE41, JIT_FLAG_USE_SSE41);
324 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_SSE42, JIT_FLAG_USE_SSE42);
325 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_AES, JIT_FLAG_USE_AES);
326 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_BMI1, JIT_FLAG_USE_BMI1);
327 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_BMI2, JIT_FLAG_USE_BMI2);
328 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_FMA, JIT_FLAG_USE_FMA);
329 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_LZCNT, JIT_FLAG_USE_LZCNT);
330 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_PCLMULQDQ, JIT_FLAG_USE_PCLMULQDQ);
331 FLAGS_EQUAL(CORJIT_FLAGS::CORJIT_FLAG_USE_POPCNT, JIT_FLAG_USE_POPCNT);
332
333#endif // _TARGET_X86_ || _TARGET_AMD64_
334
335#undef FLAGS_EQUAL
336 }
337
338private:
339 unsigned __int64 m_jitFlags;
340};
341