add cpuid asm for Windows, aes-ni .s still needs work

pull/1/head
toddouska 2012-04-25 15:17:25 -07:00
parent b13a9e1b4e
commit 8fe36b417f
1 changed files with 16 additions and 1 deletions

View File

@ -724,10 +724,25 @@ static const word32 Td[5][256] = {
#ifdef CYASSL_AESNI
#define cpuid(func,ax,bx,cx,dx)\
#ifndef _MSC_VER
#define cpuid(func,ax,bx,cx,dx)\
__asm__ __volatile__ ("cpuid":\
"=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (func));
#else
#define cpuid(func,ax,bx,cx,dx)\
__asm mov eax, func \
__asm cpuid \
__asm mov ax, eax \
__asm mov bx, ebx \
__asm mov cx, ecx \
__asm mov dx, edx
#endif /* _MSC_VER */
static int Check_CPU_support_AES()
{
unsigned int a,b,c,d;