diff options
author | Andy Polyakov <appro@openssl.org> | 2013-03-04 20:05:04 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2013-03-18 19:50:09 +0100 |
commit | 2a1ab7b438e58be73ecf3a3369fa32bee63daba9 (patch) | |
tree | 4c4b5d14ecc615b667c69ec1f8f97898c47fa63d | |
parent | dd1e4fbcc05cf83062946e43ec5b814e48d09615 (diff) |
x86cpuid.pl: make it work with older CPUs.
PR: 3005
(cherry picked from commit 5702e965d759dde8a098d8108660721ba2b93a7d)
-rw-r--r-- | crypto/x86cpuid.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/x86cpuid.pl b/crypto/x86cpuid.pl index d9ac9a8035..0212a5b63a 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); |