From: Andy Polyakov Date: Mon, 4 Mar 2013 19:05:04 +0000 (+0100) Subject: x86cpuid.pl: make it work with older CPUs. X-Git-Tag: OpenSSL_1_0_1f~78 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=96b680f210211f822165794f23f05efef13c9935;p=oweals%2Fopenssl.git x86cpuid.pl: make it work with older CPUs. PR: 3005 (cherry picked from commit 5702e965d759dde8a098d8108660721ba2b93a7d) --- diff --git a/crypto/x86cpuid.pl b/crypto/x86cpuid.pl index c18b0e2486..b270b44337 100644 --- a/crypto/x86cpuid.pl +++ b/crypto/x86cpuid.pl @@ -67,6 +67,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } &inc ("esi"); # number of cores &mov ("eax",1); + &xor ("ecx","ecx"); &cpuid (); &bt ("edx",28); &jnc (&label("generic")); @@ -91,6 +92,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } &set_label("nocacheinfo"); &mov ("eax",1); + &xor ("ecx","ecx"); &cpuid (); &and ("edx",0xbfefffff); # force reserved bits #20, #30 to 0 &cmp ("ebp",0);