x86cpuid fixes.
authorAndy Polyakov <appro@openssl.org>
Sat, 19 May 2007 17:52:51 +0000 (17:52 +0000)
committerAndy Polyakov <appro@openssl.org>
Sat, 19 May 2007 17:52:51 +0000 (17:52 +0000)
PR: 1526

crypto/perlasm/x86unix.pl
crypto/x86cpuid.pl

index e3f24f8..2b9e96c 100644 (file)
@@ -51,6 +51,7 @@ sub ::generic
     if ($#_==0)                                { &::emit($opcode);             }
     elsif ($opcode =~ m/^j/o && $#_==1)        { &::emit($opcode,@arg);        }
     elsif ($opcode eq "call" && $#_==1)        { &::emit($opcode,@arg);        }
+    elsif ($opcode =~ m/^set/&& $#_==1)        { &::emit($opcode,@arg);        }
     else                               { &::emit($opcode.$suffix,@arg);}
 
   1;
index 13828d5..ce9b8ea 100644 (file)
@@ -43,7 +43,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
        &shr    ("ebx",16);
        &cmp    (&LB("ebx"),1);         # see if cache is shared(*)
        &ja     (&label("nocpuid"));
-       &and    ("edx",~(1<<28));       # clear hyper-threading bit if not
+       &and    ("edx",0xefffffff);     # clear hyper-threading bit if not
 &set_label("nocpuid");
        &mov    ("eax","edx");
        &mov    ("edx","ecx");