x86cpuid.pl: fix processor capability detection on pre-586 [from HEAD].
authorAndy Polyakov <appro@openssl.org>
Tue, 28 Feb 2012 14:20:34 +0000 (14:20 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 28 Feb 2012 14:20:34 +0000 (14:20 +0000)
crypto/x86cpuid.pl

index 97adde383bb4e8d6ef0569892a02b3585469c416..39fd8f22931d0b0f191b10cf52e1dc2f5d61bbfd 100644 (file)
@@ -19,9 +19,9 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
        &pushf  ();
        &pop    ("eax");
        &xor    ("ecx","eax");
-       &bt     ("ecx",21);
-       &jnc    (&label("generic"));
        &xor    ("eax","eax");
+       &bt     ("ecx",21);
+       &jnc    (&label("nocpuid"));
        &cpuid  ();
        &mov    ("edi","eax");          # max value for standard query level
 
@@ -136,6 +136,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
 &set_label("done");
        &mov    ("eax","esi");
        &mov    ("edx","ebp");
+&set_label("nocpuid");
 &function_end("OPENSSL_ia32_cpuid");
 
 &external_label("OPENSSL_ia32cap_P");