mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 19:57:48 +02:00
test with gh workflows
This commit is contained in:
parent
8e5392784d
commit
de5569eeaf
3 changed files with 9 additions and 7 deletions
|
@ -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"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue