From: Andy Polyakov <appro@openssl.org>
Date: Mon, 10 Jun 2013 20:20:46 +0000 (+0200)
Subject: x86cpuid.pl: fix extended feature flags detection.
X-Git-Tag: master-post-reformat~1304
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1bc0b68d7b8c7620487310ed84fa273ba0d9f428;p=oweals%2Fopenssl.git

x86cpuid.pl: fix extended feature flags detection.
---

diff --git a/crypto/x86cpuid.pl b/crypto/x86cpuid.pl
index e8a75181af..ef1216a8b2 100644
--- a/crypto/x86cpuid.pl
+++ b/crypto/x86cpuid.pl
@@ -81,6 +81,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"));
@@ -92,15 +102,6 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
 	&shr	("edi",14);
 	&and	("edi",0xfff);		# number of cores -1 per L1D
 
-	&cmp	("edi",7);
-	&jb	(&label("nocacheinfo"));
-
-	&mov	("esi",&wparam(0));
-	&mov	("eax",7);
-	&xor	("ecx","ecx");
-	&cpuid	();
-	&mov	(&DWP(8,"esi"),"ebx");
-
 &set_label("nocacheinfo");
 	&mov	("eax",1);
 	&xor	("ecx","ecx");