1/* Test case for <sys/platform/x86.h> interface
2 Copyright (C) 2015-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#include <stdlib.h>
20#include <stdio.h>
21#include <sys/platform/x86.h>
22#include <support/check.h>
23
24#define CHECK_CPU_FEATURE_PRESENT(name) \
25 { \
26 if (CPU_FEATURE_PRESENT (name)) \
27 printf (" " #name "\n"); \
28 }
29
30#define CHECK_CPU_FEATURE_ACTIVE(name) \
31 { \
32 if (CPU_FEATURE_ACTIVE(name)) \
33 printf (" " #name "\n"); \
34 }
35
36static int
37do_test (void)
38{
39#ifdef __SSE2__
40 TEST_VERIFY_EXIT (CPU_FEATURE_PRESENT (SSE2));
41#endif
42
43 printf ("CPU features:\n");
44 CHECK_CPU_FEATURE_PRESENT (SSE3);
45 CHECK_CPU_FEATURE_PRESENT (PCLMULQDQ);
46 CHECK_CPU_FEATURE_PRESENT (DTES64);
47 CHECK_CPU_FEATURE_PRESENT (MONITOR);
48 CHECK_CPU_FEATURE_PRESENT (DS_CPL);
49 CHECK_CPU_FEATURE_PRESENT (VMX);
50 CHECK_CPU_FEATURE_PRESENT (SMX);
51 CHECK_CPU_FEATURE_PRESENT (EIST);
52 CHECK_CPU_FEATURE_PRESENT (TM2);
53 CHECK_CPU_FEATURE_PRESENT (SSSE3);
54 CHECK_CPU_FEATURE_PRESENT (CNXT_ID);
55 CHECK_CPU_FEATURE_PRESENT (SDBG);
56 CHECK_CPU_FEATURE_PRESENT (FMA);
57 CHECK_CPU_FEATURE_PRESENT (CMPXCHG16B);
58 CHECK_CPU_FEATURE_PRESENT (XTPRUPDCTRL);
59 CHECK_CPU_FEATURE_PRESENT (PDCM);
60 CHECK_CPU_FEATURE_PRESENT (PCID);
61 CHECK_CPU_FEATURE_PRESENT (DCA);
62 CHECK_CPU_FEATURE_PRESENT (SSE4_1);
63 CHECK_CPU_FEATURE_PRESENT (SSE4_2);
64 CHECK_CPU_FEATURE_PRESENT (X2APIC);
65 CHECK_CPU_FEATURE_PRESENT (MOVBE);
66 CHECK_CPU_FEATURE_PRESENT (POPCNT);
67 CHECK_CPU_FEATURE_PRESENT (TSC_DEADLINE);
68 CHECK_CPU_FEATURE_PRESENT (AES);
69 CHECK_CPU_FEATURE_PRESENT (XSAVE);
70 CHECK_CPU_FEATURE_PRESENT (OSXSAVE);
71 CHECK_CPU_FEATURE_PRESENT (AVX);
72 CHECK_CPU_FEATURE_PRESENT (F16C);
73 CHECK_CPU_FEATURE_PRESENT (RDRAND);
74 CHECK_CPU_FEATURE_PRESENT (FPU);
75 CHECK_CPU_FEATURE_PRESENT (VME);
76 CHECK_CPU_FEATURE_PRESENT (DE);
77 CHECK_CPU_FEATURE_PRESENT (PSE);
78 CHECK_CPU_FEATURE_PRESENT (TSC);
79 CHECK_CPU_FEATURE_PRESENT (MSR);
80 CHECK_CPU_FEATURE_PRESENT (PAE);
81 CHECK_CPU_FEATURE_PRESENT (MCE);
82 CHECK_CPU_FEATURE_PRESENT (CX8);
83 CHECK_CPU_FEATURE_PRESENT (APIC);
84 CHECK_CPU_FEATURE_PRESENT (SEP);
85 CHECK_CPU_FEATURE_PRESENT (MTRR);
86 CHECK_CPU_FEATURE_PRESENT (PGE);
87 CHECK_CPU_FEATURE_PRESENT (MCA);
88 CHECK_CPU_FEATURE_PRESENT (CMOV);
89 CHECK_CPU_FEATURE_PRESENT (PAT);
90 CHECK_CPU_FEATURE_PRESENT (PSE_36);
91 CHECK_CPU_FEATURE_PRESENT (PSN);
92 CHECK_CPU_FEATURE_PRESENT (CLFSH);
93 CHECK_CPU_FEATURE_PRESENT (DS);
94 CHECK_CPU_FEATURE_PRESENT (ACPI);
95 CHECK_CPU_FEATURE_PRESENT (MMX);
96 CHECK_CPU_FEATURE_PRESENT (FXSR);
97 CHECK_CPU_FEATURE_PRESENT (SSE);
98 CHECK_CPU_FEATURE_PRESENT (SSE2);
99 CHECK_CPU_FEATURE_PRESENT (SS);
100 CHECK_CPU_FEATURE_PRESENT (HTT);
101 CHECK_CPU_FEATURE_PRESENT (TM);
102 CHECK_CPU_FEATURE_PRESENT (PBE);
103 CHECK_CPU_FEATURE_PRESENT (FSGSBASE);
104 CHECK_CPU_FEATURE_PRESENT (TSC_ADJUST);
105 CHECK_CPU_FEATURE_PRESENT (SGX);
106 CHECK_CPU_FEATURE_PRESENT (BMI1);
107 CHECK_CPU_FEATURE_PRESENT (HLE);
108 CHECK_CPU_FEATURE_PRESENT (AVX2);
109 CHECK_CPU_FEATURE_PRESENT (SMEP);
110 CHECK_CPU_FEATURE_PRESENT (BMI2);
111 CHECK_CPU_FEATURE_PRESENT (ERMS);
112 CHECK_CPU_FEATURE_PRESENT (INVPCID);
113 CHECK_CPU_FEATURE_PRESENT (RTM);
114 CHECK_CPU_FEATURE_PRESENT (RDT_M);
115 CHECK_CPU_FEATURE_PRESENT (DEPR_FPU_CS_DS);
116 CHECK_CPU_FEATURE_PRESENT (MPX);
117 CHECK_CPU_FEATURE_PRESENT (RDT_A);
118 CHECK_CPU_FEATURE_PRESENT (AVX512F);
119 CHECK_CPU_FEATURE_PRESENT (AVX512DQ);
120 CHECK_CPU_FEATURE_PRESENT (RDSEED);
121 CHECK_CPU_FEATURE_PRESENT (ADX);
122 CHECK_CPU_FEATURE_PRESENT (SMAP);
123 CHECK_CPU_FEATURE_PRESENT (AVX512_IFMA);
124 CHECK_CPU_FEATURE_PRESENT (CLFLUSHOPT);
125 CHECK_CPU_FEATURE_PRESENT (CLWB);
126 CHECK_CPU_FEATURE_PRESENT (TRACE);
127 CHECK_CPU_FEATURE_PRESENT (AVX512PF);
128 CHECK_CPU_FEATURE_PRESENT (AVX512ER);
129 CHECK_CPU_FEATURE_PRESENT (AVX512CD);
130 CHECK_CPU_FEATURE_PRESENT (SHA);
131 CHECK_CPU_FEATURE_PRESENT (AVX512BW);
132 CHECK_CPU_FEATURE_PRESENT (AVX512VL);
133 CHECK_CPU_FEATURE_PRESENT (PREFETCHWT1);
134 CHECK_CPU_FEATURE_PRESENT (AVX512_VBMI);
135 CHECK_CPU_FEATURE_PRESENT (UMIP);
136 CHECK_CPU_FEATURE_PRESENT (PKU);
137 CHECK_CPU_FEATURE_PRESENT (OSPKE);
138 CHECK_CPU_FEATURE_PRESENT (WAITPKG);
139 CHECK_CPU_FEATURE_PRESENT (AVX512_VBMI2);
140 CHECK_CPU_FEATURE_PRESENT (SHSTK);
141 CHECK_CPU_FEATURE_PRESENT (GFNI);
142 CHECK_CPU_FEATURE_PRESENT (VAES);
143 CHECK_CPU_FEATURE_PRESENT (VPCLMULQDQ);
144 CHECK_CPU_FEATURE_PRESENT (AVX512_VNNI);
145 CHECK_CPU_FEATURE_PRESENT (AVX512_BITALG);
146 CHECK_CPU_FEATURE_PRESENT (AVX512_VPOPCNTDQ);
147 CHECK_CPU_FEATURE_PRESENT (RDPID);
148 CHECK_CPU_FEATURE_PRESENT (KL);
149 CHECK_CPU_FEATURE_PRESENT (CLDEMOTE);
150 CHECK_CPU_FEATURE_PRESENT (MOVDIRI);
151 CHECK_CPU_FEATURE_PRESENT (MOVDIR64B);
152 CHECK_CPU_FEATURE_PRESENT (ENQCMD);
153 CHECK_CPU_FEATURE_PRESENT (SGX_LC);
154 CHECK_CPU_FEATURE_PRESENT (PKS);
155 CHECK_CPU_FEATURE_PRESENT (AVX512_4VNNIW);
156 CHECK_CPU_FEATURE_PRESENT (AVX512_4FMAPS);
157 CHECK_CPU_FEATURE_PRESENT (FSRM);
158 CHECK_CPU_FEATURE_PRESENT (UINTR);
159 CHECK_CPU_FEATURE_PRESENT (AVX512_VP2INTERSECT);
160 CHECK_CPU_FEATURE_PRESENT (MD_CLEAR);
161 CHECK_CPU_FEATURE_PRESENT (RTM_ALWAYS_ABORT);
162 CHECK_CPU_FEATURE_PRESENT (SERIALIZE);
163 CHECK_CPU_FEATURE_PRESENT (HYBRID);
164 CHECK_CPU_FEATURE_PRESENT (TSXLDTRK);
165 CHECK_CPU_FEATURE_PRESENT (PCONFIG);
166 CHECK_CPU_FEATURE_PRESENT (IBT);
167 CHECK_CPU_FEATURE_PRESENT (AMX_BF16);
168 CHECK_CPU_FEATURE_PRESENT (AVX512_FP16);
169 CHECK_CPU_FEATURE_PRESENT (AMX_TILE);
170 CHECK_CPU_FEATURE_PRESENT (AMX_INT8);
171 CHECK_CPU_FEATURE_PRESENT (IBRS_IBPB);
172 CHECK_CPU_FEATURE_PRESENT (STIBP);
173 CHECK_CPU_FEATURE_PRESENT (L1D_FLUSH);
174 CHECK_CPU_FEATURE_PRESENT (ARCH_CAPABILITIES);
175 CHECK_CPU_FEATURE_PRESENT (CORE_CAPABILITIES);
176 CHECK_CPU_FEATURE_PRESENT (SSBD);
177 CHECK_CPU_FEATURE_PRESENT (LAHF64_SAHF64);
178 CHECK_CPU_FEATURE_PRESENT (SVM);
179 CHECK_CPU_FEATURE_PRESENT (LZCNT);
180 CHECK_CPU_FEATURE_PRESENT (SSE4A);
181 CHECK_CPU_FEATURE_PRESENT (PREFETCHW);
182 CHECK_CPU_FEATURE_PRESENT (XOP);
183 CHECK_CPU_FEATURE_PRESENT (LWP);
184 CHECK_CPU_FEATURE_PRESENT (FMA4);
185 CHECK_CPU_FEATURE_PRESENT (TBM);
186 CHECK_CPU_FEATURE_PRESENT (SYSCALL_SYSRET);
187 CHECK_CPU_FEATURE_PRESENT (NX);
188 CHECK_CPU_FEATURE_PRESENT (PAGE1GB);
189 CHECK_CPU_FEATURE_PRESENT (RDTSCP);
190 CHECK_CPU_FEATURE_PRESENT (LM);
191 CHECK_CPU_FEATURE_PRESENT (XSAVEOPT);
192 CHECK_CPU_FEATURE_PRESENT (XSAVEC);
193 CHECK_CPU_FEATURE_PRESENT (XGETBV_ECX_1);
194 CHECK_CPU_FEATURE_PRESENT (XSAVES);
195 CHECK_CPU_FEATURE_PRESENT (XFD);
196 CHECK_CPU_FEATURE_PRESENT (INVARIANT_TSC);
197 CHECK_CPU_FEATURE_PRESENT (WBNOINVD);
198 CHECK_CPU_FEATURE_PRESENT (AVX_VNNI);
199 CHECK_CPU_FEATURE_PRESENT (AVX512_BF16);
200 CHECK_CPU_FEATURE_PRESENT (FZLRM);
201 CHECK_CPU_FEATURE_PRESENT (FSRS);
202 CHECK_CPU_FEATURE_PRESENT (FSRCS);
203 CHECK_CPU_FEATURE_PRESENT (HRESET);
204 CHECK_CPU_FEATURE_PRESENT (LAM);
205 CHECK_CPU_FEATURE_PRESENT (AESKLE);
206 CHECK_CPU_FEATURE_PRESENT (WIDE_KL);
207 CHECK_CPU_FEATURE_PRESENT (PTWRITE);
208
209 printf ("Possible CPU features:\n");
210 CHECK_CPU_FEATURE_ACTIVE (SSE3);
211 CHECK_CPU_FEATURE_ACTIVE (PCLMULQDQ);
212 CHECK_CPU_FEATURE_ACTIVE (DTES64);
213 CHECK_CPU_FEATURE_ACTIVE (MONITOR);
214 CHECK_CPU_FEATURE_ACTIVE (DS_CPL);
215 CHECK_CPU_FEATURE_ACTIVE (VMX);
216 CHECK_CPU_FEATURE_ACTIVE (SMX);
217 CHECK_CPU_FEATURE_ACTIVE (EIST);
218 CHECK_CPU_FEATURE_ACTIVE (TM2);
219 CHECK_CPU_FEATURE_ACTIVE (SSSE3);
220 CHECK_CPU_FEATURE_ACTIVE (CNXT_ID);
221 CHECK_CPU_FEATURE_ACTIVE (SDBG);
222 CHECK_CPU_FEATURE_ACTIVE (FMA);
223 CHECK_CPU_FEATURE_ACTIVE (CMPXCHG16B);
224 CHECK_CPU_FEATURE_ACTIVE (XTPRUPDCTRL);
225 CHECK_CPU_FEATURE_ACTIVE (PDCM);
226 CHECK_CPU_FEATURE_ACTIVE (PCID);
227 CHECK_CPU_FEATURE_ACTIVE (DCA);
228 CHECK_CPU_FEATURE_ACTIVE (SSE4_1);
229 CHECK_CPU_FEATURE_ACTIVE (SSE4_2);
230 CHECK_CPU_FEATURE_ACTIVE (X2APIC);
231 CHECK_CPU_FEATURE_ACTIVE (MOVBE);
232 CHECK_CPU_FEATURE_ACTIVE (POPCNT);
233 CHECK_CPU_FEATURE_ACTIVE (TSC_DEADLINE);
234 CHECK_CPU_FEATURE_ACTIVE (AES);
235 CHECK_CPU_FEATURE_ACTIVE (XSAVE);
236 CHECK_CPU_FEATURE_ACTIVE (OSXSAVE);
237 CHECK_CPU_FEATURE_ACTIVE (AVX);
238 CHECK_CPU_FEATURE_ACTIVE (F16C);
239 CHECK_CPU_FEATURE_ACTIVE (RDRAND);
240 CHECK_CPU_FEATURE_ACTIVE (FPU);
241 CHECK_CPU_FEATURE_ACTIVE (VME);
242 CHECK_CPU_FEATURE_ACTIVE (DE);
243 CHECK_CPU_FEATURE_ACTIVE (PSE);
244 CHECK_CPU_FEATURE_ACTIVE (TSC);
245 CHECK_CPU_FEATURE_ACTIVE (MSR);
246 CHECK_CPU_FEATURE_ACTIVE (PAE);
247 CHECK_CPU_FEATURE_ACTIVE (MCE);
248 CHECK_CPU_FEATURE_ACTIVE (CX8);
249 CHECK_CPU_FEATURE_ACTIVE (APIC);
250 CHECK_CPU_FEATURE_ACTIVE (SEP);
251 CHECK_CPU_FEATURE_ACTIVE (MTRR);
252 CHECK_CPU_FEATURE_ACTIVE (PGE);
253 CHECK_CPU_FEATURE_ACTIVE (MCA);
254 CHECK_CPU_FEATURE_ACTIVE (CMOV);
255 CHECK_CPU_FEATURE_ACTIVE (PAT);
256 CHECK_CPU_FEATURE_ACTIVE (PSE_36);
257 CHECK_CPU_FEATURE_ACTIVE (PSN);
258 CHECK_CPU_FEATURE_ACTIVE (CLFSH);
259 CHECK_CPU_FEATURE_ACTIVE (DS);
260 CHECK_CPU_FEATURE_ACTIVE (ACPI);
261 CHECK_CPU_FEATURE_ACTIVE (MMX);
262 CHECK_CPU_FEATURE_ACTIVE (FXSR);
263 CHECK_CPU_FEATURE_ACTIVE (SSE);
264 CHECK_CPU_FEATURE_ACTIVE (SSE2);
265 CHECK_CPU_FEATURE_ACTIVE (SS);
266 CHECK_CPU_FEATURE_ACTIVE (HTT);
267 CHECK_CPU_FEATURE_ACTIVE (TM);
268 CHECK_CPU_FEATURE_ACTIVE (PBE);
269 CHECK_CPU_FEATURE_ACTIVE (FSGSBASE);
270 CHECK_CPU_FEATURE_ACTIVE (TSC_ADJUST);
271 CHECK_CPU_FEATURE_ACTIVE (SGX);
272 CHECK_CPU_FEATURE_ACTIVE (BMI1);
273 CHECK_CPU_FEATURE_ACTIVE (HLE);
274 CHECK_CPU_FEATURE_ACTIVE (AVX2);
275 CHECK_CPU_FEATURE_ACTIVE (SMEP);
276 CHECK_CPU_FEATURE_ACTIVE (BMI2);
277 CHECK_CPU_FEATURE_ACTIVE (ERMS);
278 CHECK_CPU_FEATURE_ACTIVE (INVPCID);
279 CHECK_CPU_FEATURE_ACTIVE (RTM);
280 CHECK_CPU_FEATURE_ACTIVE (RDT_M);
281 CHECK_CPU_FEATURE_ACTIVE (DEPR_FPU_CS_DS);
282 CHECK_CPU_FEATURE_ACTIVE (MPX);
283 CHECK_CPU_FEATURE_ACTIVE (RDT_A);
284 CHECK_CPU_FEATURE_ACTIVE (AVX512F);
285 CHECK_CPU_FEATURE_ACTIVE (AVX512DQ);
286 CHECK_CPU_FEATURE_ACTIVE (RDSEED);
287 CHECK_CPU_FEATURE_ACTIVE (ADX);
288 CHECK_CPU_FEATURE_ACTIVE (SMAP);
289 CHECK_CPU_FEATURE_ACTIVE (AVX512_IFMA);
290 CHECK_CPU_FEATURE_ACTIVE (CLFLUSHOPT);
291 CHECK_CPU_FEATURE_ACTIVE (CLWB);
292 CHECK_CPU_FEATURE_ACTIVE (TRACE);
293 CHECK_CPU_FEATURE_ACTIVE (AVX512PF);
294 CHECK_CPU_FEATURE_ACTIVE (AVX512ER);
295 CHECK_CPU_FEATURE_ACTIVE (AVX512CD);
296 CHECK_CPU_FEATURE_ACTIVE (SHA);
297 CHECK_CPU_FEATURE_ACTIVE (AVX512BW);
298 CHECK_CPU_FEATURE_ACTIVE (AVX512VL);
299 CHECK_CPU_FEATURE_ACTIVE (PREFETCHWT1);
300 CHECK_CPU_FEATURE_ACTIVE (AVX512_VBMI);
301 CHECK_CPU_FEATURE_ACTIVE (UMIP);
302 CHECK_CPU_FEATURE_ACTIVE (PKU);
303 CHECK_CPU_FEATURE_ACTIVE (OSPKE);
304 CHECK_CPU_FEATURE_ACTIVE (WAITPKG);
305 CHECK_CPU_FEATURE_ACTIVE (AVX512_VBMI2);
306 CHECK_CPU_FEATURE_ACTIVE (SHSTK);
307 CHECK_CPU_FEATURE_ACTIVE (GFNI);
308 CHECK_CPU_FEATURE_ACTIVE (VAES);
309 CHECK_CPU_FEATURE_ACTIVE (VPCLMULQDQ);
310 CHECK_CPU_FEATURE_ACTIVE (AVX512_VNNI);
311 CHECK_CPU_FEATURE_ACTIVE (AVX512_BITALG);
312 CHECK_CPU_FEATURE_ACTIVE (AVX512_VPOPCNTDQ);
313 CHECK_CPU_FEATURE_ACTIVE (RDPID);
314 CHECK_CPU_FEATURE_ACTIVE (KL);
315 CHECK_CPU_FEATURE_ACTIVE (CLDEMOTE);
316 CHECK_CPU_FEATURE_ACTIVE (MOVDIRI);
317 CHECK_CPU_FEATURE_ACTIVE (MOVDIR64B);
318 CHECK_CPU_FEATURE_ACTIVE (ENQCMD);
319 CHECK_CPU_FEATURE_ACTIVE (SGX_LC);
320 CHECK_CPU_FEATURE_ACTIVE (PKS);
321 CHECK_CPU_FEATURE_ACTIVE (AVX512_4VNNIW);
322 CHECK_CPU_FEATURE_ACTIVE (AVX512_4FMAPS);
323 CHECK_CPU_FEATURE_ACTIVE (FSRM);
324 CHECK_CPU_FEATURE_ACTIVE (AVX512_VP2INTERSECT);
325 CHECK_CPU_FEATURE_ACTIVE (MD_CLEAR);
326 CHECK_CPU_FEATURE_ACTIVE (RTM_ALWAYS_ABORT);
327 CHECK_CPU_FEATURE_ACTIVE (SERIALIZE);
328 CHECK_CPU_FEATURE_ACTIVE (HYBRID);
329 CHECK_CPU_FEATURE_ACTIVE (TSXLDTRK);
330 CHECK_CPU_FEATURE_ACTIVE (PCONFIG);
331 CHECK_CPU_FEATURE_ACTIVE (IBT);
332 CHECK_CPU_FEATURE_ACTIVE (AMX_BF16);
333 CHECK_CPU_FEATURE_ACTIVE (AVX512_FP16);
334 CHECK_CPU_FEATURE_ACTIVE (AMX_TILE);
335 CHECK_CPU_FEATURE_ACTIVE (AMX_INT8);
336 CHECK_CPU_FEATURE_ACTIVE (IBRS_IBPB);
337 CHECK_CPU_FEATURE_ACTIVE (STIBP);
338 CHECK_CPU_FEATURE_ACTIVE (L1D_FLUSH);
339 CHECK_CPU_FEATURE_ACTIVE (ARCH_CAPABILITIES);
340 CHECK_CPU_FEATURE_ACTIVE (CORE_CAPABILITIES);
341 CHECK_CPU_FEATURE_ACTIVE (SSBD);
342 CHECK_CPU_FEATURE_ACTIVE (LAHF64_SAHF64);
343 CHECK_CPU_FEATURE_ACTIVE (SVM);
344 CHECK_CPU_FEATURE_ACTIVE (LZCNT);
345 CHECK_CPU_FEATURE_ACTIVE (SSE4A);
346 CHECK_CPU_FEATURE_ACTIVE (PREFETCHW);
347 CHECK_CPU_FEATURE_ACTIVE (XOP);
348 CHECK_CPU_FEATURE_ACTIVE (LWP);
349 CHECK_CPU_FEATURE_ACTIVE (FMA4);
350 CHECK_CPU_FEATURE_ACTIVE (TBM);
351 CHECK_CPU_FEATURE_ACTIVE (SYSCALL_SYSRET);
352 CHECK_CPU_FEATURE_ACTIVE (NX);
353 CHECK_CPU_FEATURE_ACTIVE (PAGE1GB);
354 CHECK_CPU_FEATURE_ACTIVE (RDTSCP);
355 CHECK_CPU_FEATURE_ACTIVE (LM);
356 CHECK_CPU_FEATURE_ACTIVE (XSAVEOPT);
357 CHECK_CPU_FEATURE_ACTIVE (XSAVEC);
358 CHECK_CPU_FEATURE_ACTIVE (XGETBV_ECX_1);
359 CHECK_CPU_FEATURE_ACTIVE (XSAVES);
360 CHECK_CPU_FEATURE_ACTIVE (XFD);
361 CHECK_CPU_FEATURE_ACTIVE (INVARIANT_TSC);
362 CHECK_CPU_FEATURE_ACTIVE (WBNOINVD);
363 CHECK_CPU_FEATURE_ACTIVE (AVX_VNNI);
364 CHECK_CPU_FEATURE_ACTIVE (AVX512_BF16);
365 CHECK_CPU_FEATURE_ACTIVE (FZLRM);
366 CHECK_CPU_FEATURE_ACTIVE (FSRS);
367 CHECK_CPU_FEATURE_ACTIVE (FSRCS);
368 CHECK_CPU_FEATURE_ACTIVE (AESKLE);
369 CHECK_CPU_FEATURE_ACTIVE (WIDE_KL);
370 CHECK_CPU_FEATURE_ACTIVE (PTWRITE);
371
372 return 0;
373}
374
375#include <support/test-driver.c>
376

source code of glibc/sysdeps/x86/tst-get-cpu-features.c