From 6f91e3988c9daeff138853df2d883ab0f7817285 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Tue, 10 Nov 2020 21:37:43 +0300 Subject: [PATCH] fix cpu check for arm Signed-off-by: R4SAS --- libi2pd/CPU.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/libi2pd/CPU.cpp b/libi2pd/CPU.cpp index 95ca49bb..d7d2007e 100644 --- a/libi2pd/CPU.cpp +++ b/libi2pd/CPU.cpp @@ -29,36 +29,29 @@ namespace cpu void Detect() { - __builtin_cpu_init(); -#if defined(__AES__) || defined(__AVX__) - #if defined(__x86_64__) || defined(__i386__) + __builtin_cpu_init(); int info[4]; __cpuid(0, info[0], info[1], info[2], info[3]); if (info[0] >= 0x00000001) { __cpuid(0x00000001, info[0], info[1], info[2], info[3]); -#ifdef __AES__ if (__builtin_cpu_supports("aes")) { aesni = info[2] & bit_AES; // AESNI } -#endif // __AES__ if (__builtin_cpu_supports("avx")) { avx = info[2] & bit_AVX; // AVX } } #endif // defined(__x86_64__) || defined(__i386__) -#ifdef __AES__ if(aesni) { LogPrint(eLogInfo, "AESNI enabled"); } -#endif // __AES__ if(avx) { LogPrint(eLogInfo, "AVX enabled"); } -#endif // defined(__AES__) || defined(__AVX__) } } }