diff options
author | Andy Polyakov <appro@openssl.org> | 2013-06-10 22:20:46 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2013-06-10 22:49:35 +0200 |
commit | 514f1a783515e9beb73b759a483c078813cf8ba0 (patch) | |
tree | 0d529adda2bf78ea9d5bb66fc5cc78ff7f1d3aea /crypto/x86cpuid.pl | |
parent | af908bc48b64ef80dec48263f791d6a4e2874232 (diff) |
x86cpuid.pl: fix extended feature flags detection.
(cherry picked from commit 1bc0b68d7b8c7620487310ed84fa273ba0d9f428)
Diffstat (limited to 'crypto/x86cpuid.pl')
-rw-r--r-- | crypto/x86cpuid.pl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/x86cpuid.pl b/crypto/x86cpuid.pl index 0212a5b63a..54dc1b55d0 100644 --- a/crypto/x86cpuid.pl +++ b/crypto/x86cpuid.pl @@ -79,6 +79,16 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } &jmp (&label("generic")); &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); &mov ("edi",-1); &jb (&label("nocacheinfo")); |