forked from open-quantum-safe/liboqs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetect_gcc_clang_intrinsics.c
67 lines (65 loc) · 1.12 KB
/
detect_gcc_clang_intrinsics.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// SPDX-License-Identifier: MIT
#include <stdio.h>
int main(void) {
#if defined(__ADX__)
printf("ADX;");
#endif
#if defined(__AES__)
printf("AES;");
#endif
#if defined(__AVX__)
printf("AVX;");
#endif
#if defined(__AVX2__)
printf("AVX2;");
#endif
#if defined(__AVX512BW__)
printf("AVX512BW;");
#endif
#if defined(__AVX512DQ__)
printf("AVX512DQ;");
#endif
#if defined(__AVX512F__)
printf("AVX512F;");
#endif
#if defined(__VPCLMULQDQ__)
printf("VPCLMULQDQ;");
#endif
#if defined(__BMI__)
printf("BMI1;");
#endif
#if defined(__BMI2__)
printf("BMI2;");
#endif
#if defined(__FMA__)
printf("FMA;");
#endif
#if defined(__PCLMUL__)
printf("PCLMULQDQ;");
#endif
#if defined(__POPCNT__)
printf("POPCNT;");
#endif
#if defined(__SSE__)
printf("SSE;");
#endif
#if defined(__SSE2__)
printf("SSE2;");
#endif
#if defined(__SSE3__)
printf("SSE3;");
#endif
#if defined(__ARM_FEATURE_AES)
printf("ARM_AES;");
#endif
#if (defined(__APPLE__) && defined(__aarch64__)) || defined(__ARM_FEATURE_SHA2)
printf("ARM_SHA2;");
#endif
#if defined(__ARM_FEATURE_SHA3)
printf("ARM_SHA3;");
#endif
#if defined(__ARM_NEON)
printf("ARM_NEON;");
#endif
return 0;
}