From: Andy Polyakov Date: Mon, 10 Jun 2013 20:20:46 +0000 (+0200) Subject: x86cpuid.pl: fix extended feature flags detection. X-Git-Tag: OpenSSL_1_0_2-beta1~343 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=514f1a783515e9beb73b759a483c078813cf8ba0;p=openssl x86cpuid.pl: fix extended feature flags detection. (cherry picked from commit 1bc0b68d7b8c7620487310ed84fa273ba0d9f428) --- 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"));