test with gh workflows

This commit is contained in:
R4SAS 2020-11-11 15:43:42 +03:00
parent 8e5392784d
commit de5569eeaf
3 changed files with 9 additions and 7 deletions

View file

@ -35,14 +35,16 @@ namespace cpu
__cpuid(0, info[0], info[1], info[2], info[3]);
if (info[0] >= 0x00000001) {
__cpuid(0x00000001, info[0], info[1], info[2], info[3]);
if (__builtin_cpu_supports("aes") && AesSwitch) {
aesni = info[2] & bit_AES; // AESNI
#ifdef __AES__
if ((info[2] & bit_AES || __builtin_cpu_supports("aes")) && AesSwitch) {
aesni = true; // AESNI
}
if (__builtin_cpu_supports("avx") && AvxSwitch) {
avx = info[2] & bit_AVX; // AVX
#endif // __AES__
if ((info[2] & bit_AVX || __builtin_cpu_supports("avx")) && AvxSwitch) {
avx = true; // AVX
}
}
#endif // defined(__x86_64__) || defined(__i386__)
#endif // defined(__x86_64__) || defined(__i386__)
LogPrint(eLogInfo, "AESNI ", (aesni ? "enabled" : "disabled"));
LogPrint(eLogInfo, "AVX ", (avx ? "enabled" : "disabled"));