[cpu] use __builtin_* only on x86 systems

Signed-off-by: r4sas <r4sas@i2pmail.org>
This commit is contained in:
r4sas 2023-08-10 03:25:01 +03:00
parent 1389b85028
commit 239a93485c
No known key found for this signature in database
GPG key ID: 66F6C87B98EBCFE2

View file

@ -17,6 +17,7 @@ namespace cpu
void Detect(bool AesSwitch, bool force) void Detect(bool AesSwitch, bool force)
{ {
#if defined(__x86_64__) || defined(__i386__)
__builtin_cpu_init (); __builtin_cpu_init ();
#if defined (_WIN32) && (WINVER == 0x0501) // WinXP #if defined (_WIN32) && (WINVER == 0x0501) // WinXP
if (AesSwitch && force) { // only if forced if (AesSwitch && force) { // only if forced
@ -25,7 +26,7 @@ namespace cpu
#endif #endif
aesni = true; aesni = true;
} }
#endif
LogPrint(eLogInfo, "AESNI ", (aesni ? "enabled" : "disabled")); LogPrint(eLogInfo, "AESNI ", (aesni ? "enabled" : "disabled"));
} }
} }