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 e3f24f860bc4f9c36e57146bc0824dc182ae8d95..2b9e96c8db07264ae010888373e338a128f187e2 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 13828d5633160b34460311303b4fbfc60ff92707..ce9b8ea4dd3568952cc4b7bb0e29779fb91546d7 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");