3 # ====================================================================
4 # Written by Nikos Mavrogiannopoulos
5 # Placed under the LGPL
6 # ====================================================================
9 $0 =~ m/(.*[\/\\])[^\
/\\]+$/; $dir=$1;
10 push(@INC,"${dir}","${dir}../../crypto/perlasm");
13 &asm_init
($ARGV[0],$0);
15 &function_begin_B
("gnutls_cpuid");
19 &mov
(&DWP
(0,"esp"), "ebx");
20 &mov
("eax",&DWP
(8,"ebp"));
21 &mov
(&DWP
(4,"esp"), "esi");
22 &mov
(&DWP
(8,"esp"), "edi");
28 &mov
("edx",&DWP
(12,"ebp"));
29 &mov
(&DWP
(0,"edx"), "eax");
30 &mov
("eax",&DWP
(16,"ebp"));
31 &mov
(&DWP
(0,"eax"), "edi");
32 &mov
("eax",&DWP
(20,"ebp"));
33 &mov
(&DWP
(0,"eax"), "ecx");
34 &mov
("eax",&DWP
(24,"ebp"));
35 &mov
(&DWP
(0,"eax"), "esi");
36 &mov
("ebx",&DWP
(0,"esp"));
37 &mov
("esi",&DWP
(4,"esp"));
38 &mov
("edi",&DWP
(8,"esp"));
42 &function_end_B
("gnutls_cpuid");
44 &function_begin_B
("gnutls_have_cpuid");
52 &and ("eax",0x200000);
54 &function_end_B
("gnutls_have_cpuid");
56 &asciz
("CPUID for x86");