]> granicus.if.org Git - openssl/commitdiff
x86cpuid.pl: fix extended feature flags detection.
authorAndy Polyakov <appro@openssl.org>
Mon, 10 Jun 2013 20:20:46 +0000 (22:20 +0200)
committerAndy Polyakov <appro@openssl.org>
Mon, 10 Jun 2013 20:49:35 +0000 (22:49 +0200)
(cherry picked from commit 1bc0b68d7b8c7620487310ed84fa273ba0d9f428)

crypto/x86cpuid.pl

index 0212a5b63a09d5ca9b95c1d4e3d073b22198cd64..54dc1b55d0ef093c9355729f2f3bee1de6cc9dbd 100644 (file)
@@ -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"));