]>
Commit | Line | Data |
---|---|---|
84745a0c AM |
1 | From: Andy Polyakov <appro@openssl.org> |
2 | Date: Mon, 4 Mar 2013 19:05:04 +0000 (+0100) | |
3 | Subject: x86cpuid.pl: make it work with older CPUs. | |
4 | Origin: upstream: http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=5702e965d759dde8a098d8108660721ba2b93a7d | |
5 | Bug-Debian: http://bugs.debian.org/699692 | |
6 | Bug: http://rt.openssl.org/Ticket/Display.html?id=3005&user=guest&pass=guest | |
7 | ||
8 | diff --git a/crypto/x86cpuid.pl b/crypto/x86cpuid.pl | |
9 | index 3b6c469..e8a7518 100644 | |
10 | --- a/crypto/x86cpuid.pl | |
11 | +++ b/crypto/x86cpuid.pl | |
12 | @@ -69,6 +69,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } | |
13 | &inc ("esi"); # number of cores | |
14 | ||
15 | &mov ("eax",1); | |
16 | + &xor ("ecx","ecx"); | |
17 | &cpuid (); | |
18 | &bt ("edx",28); | |
19 | &jnc (&label("generic")); | |
20 | @@ -102,6 +103,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } | |
21 | ||
22 | &set_label("nocacheinfo"); | |
23 | &mov ("eax",1); | |
24 | + &xor ("ecx","ecx"); | |
25 | &cpuid (); | |
26 | &and ("edx",0xbfefffff); # force reserved bits #20, #30 to 0 | |
27 | &cmp ("ebp",0); |