x86cpuid.pl: make it work with older CPUs.
PR: 3005
(cherry picked from commit 5702e965d7)
This commit is contained in:
@@ -67,6 +67,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
|
|||||||
&inc ("esi"); # number of cores
|
&inc ("esi"); # number of cores
|
||||||
|
|
||||||
&mov ("eax",1);
|
&mov ("eax",1);
|
||||||
|
&xor ("ecx","ecx");
|
||||||
&cpuid ();
|
&cpuid ();
|
||||||
&bt ("edx",28);
|
&bt ("edx",28);
|
||||||
&jnc (&label("generic"));
|
&jnc (&label("generic"));
|
||||||
@@ -91,6 +92,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
|
|||||||
|
|
||||||
&set_label("nocacheinfo");
|
&set_label("nocacheinfo");
|
||||||
&mov ("eax",1);
|
&mov ("eax",1);
|
||||||
|
&xor ("ecx","ecx");
|
||||||
&cpuid ();
|
&cpuid ();
|
||||||
&and ("edx",0xbfefffff); # force reserved bits #20, #30 to 0
|
&and ("edx",0xbfefffff); # force reserved bits #20, #30 to 0
|
||||||
&cmp ("ebp",0);
|
&cmp ("ebp",0);
|
||||||
|
|||||||
Reference in New Issue
Block a user