]>
iEval git - authen-passphrase-scrypt.git/blob - scrypt-1.2.1/libcperciva/cpusupport/cpusupport_x86_aesni.c
1 #include "cpusupport.h"
3 #ifdef CPUSUPPORT_X86_CPUID
6 #define CPUID_AESNI_BIT (1 << 25)
9 CPUSUPPORT_FEATURE_DECL(x86
, aesni
)
11 #ifdef CPUSUPPORT_X86_CPUID
12 unsigned int eax
, ebx
, ecx
, edx
;
14 /* Check if CPUID supports the level we need. */
15 if (!__get_cpuid(0, &eax
, &ebx
, &ecx
, &edx
))
20 /* Ask about CPU features. */
21 if (!__get_cpuid(1, &eax
, &ebx
, &ecx
, &edx
))
24 /* Return the relevant feature bit. */
25 return ((ecx
& CPUID_AESNI_BIT
) ? 1 : 0);
This page took 0.03892 seconds and 4 git commands to generate.