1 #ifndef _WIMLIB_CPU_FEATURES_H
2 #define _WIMLIB_CPU_FEATURES_H
4 #include "wimlib/types.h"
6 #define X86_CPU_FEATURE_SSSE3 0x00000001
7 #define X86_CPU_FEATURE_SSE4_1 0x00000002
8 #define X86_CPU_FEATURE_SSE4_2 0x00000004
9 #define X86_CPU_FEATURE_AVX 0x00000008
10 #define X86_CPU_FEATURE_BMI2 0x00000010
11 #define X86_CPU_FEATURE_SHA 0x00000020
13 #define ARM_CPU_FEATURE_SHA1 0x00000001
15 #if (defined(__i386__) || defined(__x86_64__)) || \
16 (defined(__aarch64__) && defined(__linux__)) || \
17 (defined(__aarch64__) && defined(__APPLE__)) || \
18 (defined(__aarch64__) && defined(_WIN32))
20 #define CPU_FEATURES_ENABLED 1
21 extern u32 cpu_features;
23 void init_cpu_features(void);
27 #define CPU_FEATURES_ENABLED 0
28 #define cpu_features 0
31 init_cpu_features(void)
37 #endif /* _WIMLIB_CPU_FEATURES_H */