From 0e3f4c40e3b1c5d8958148b079d4e9c6ae60ae69 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 18 Jun 2020 16:41:24 +0200 Subject: Windows: remove duplicated function to detect AES-NI support in CPU --- src/Crypto/cpu.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/Crypto/cpu.c') diff --git a/src/Crypto/cpu.c b/src/Crypto/cpu.c index 4aeb8d39..99b81700 100644 --- a/src/Crypto/cpu.c +++ b/src/Crypto/cpu.c @@ -422,28 +422,6 @@ void DetectX86Features() *((volatile int*)&g_x86DetectionDone) = 1; } -int is_aes_hw_cpu_supported () -{ - int bHasAESNI = 0; - uint32 cpuid[4]; - - if (CpuId(1, cpuid)) - { - if (cpuid[2] & (1<<25)) - bHasAESNI = 1; -#if !defined (_UEFI) && ((defined(__AES__) && defined(__PCLMUL__)) || defined(__INTEL_COMPILER) || CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE) - // Hypervisor = bit 31 of ECX of CPUID leaf 0x1 - // reference: http://artemonsecurity.com/vmde.pdf - if (!bHasAESNI && (cpuid[2] & (1<<31))) - { - bHasAESNI = Detect_MS_HyperV_AES (); - } -#endif - } - - return bHasAESNI; -} - void DisableCPUExtendedFeatures () { g_hasSSE2 = 0; -- cgit v1.2.3