x86cpuid.pl: fix extended feature flags detection.
This commit is contained in:
parent
2f58cda4ce
commit
1bc0b68d7b
@ -81,6 +81,16 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
|
|||||||
&jmp (&label("generic"));
|
&jmp (&label("generic"));
|
||||||
|
|
||||||
&set_label("intel");
|
&set_label("intel");
|
||||||
|
&cmp ("edi",7);
|
||||||
|
&jb (&label("cacheinfo"));
|
||||||
|
|
||||||
|
&mov ("esi",&wparam(0));
|
||||||
|
&mov ("eax",7);
|
||||||
|
&xor ("ecx","ecx");
|
||||||
|
&cpuid ();
|
||||||
|
&mov (&DWP(8,"esi"),"ebx");
|
||||||
|
|
||||||
|
&set_label("cacheinfo");
|
||||||
&cmp ("edi",4);
|
&cmp ("edi",4);
|
||||||
&mov ("edi",-1);
|
&mov ("edi",-1);
|
||||||
&jb (&label("nocacheinfo"));
|
&jb (&label("nocacheinfo"));
|
||||||
@ -92,15 +102,6 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
|
|||||||
&shr ("edi",14);
|
&shr ("edi",14);
|
||||||
&and ("edi",0xfff); # number of cores -1 per L1D
|
&and ("edi",0xfff); # number of cores -1 per L1D
|
||||||
|
|
||||||
&cmp ("edi",7);
|
|
||||||
&jb (&label("nocacheinfo"));
|
|
||||||
|
|
||||||
&mov ("esi",&wparam(0));
|
|
||||||
&mov ("eax",7);
|
|
||||||
&xor ("ecx","ecx");
|
|
||||||
&cpuid ();
|
|
||||||
&mov (&DWP(8,"esi"),"ebx");
|
|
||||||
|
|
||||||
&set_label("nocacheinfo");
|
&set_label("nocacheinfo");
|
||||||
&mov ("eax",1);
|
&mov ("eax",1);
|
||||||
&xor ("ecx","ecx");
|
&xor ("ecx","ecx");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user