Ad-hockery for Platform SDK ml64.
[openssl.git] / crypto / x86_64cpuid.pl
index f90bbc9ab0089777cb95bdafc5073b7a215c6ead..18a2867036a0b61f89515803e5a954a90f3c6173 100644 (file)
@@ -99,7 +99,9 @@ OPENSSL_wipe_cpu:
 
 ___
 
-open STDOUT,"| $^X perlasm/x86_64-xlate.pl $output";
+$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
+open STDOUT,"| $^X $dir/perlasm/x86_64-xlate.pl $output";
+
 print<<___;
 .text
 
@@ -134,16 +136,16 @@ OPENSSL_ia32_cpuid:
 
        mov     \$1,%eax
        cpuid
-       bt      \$28,%edx               # test hyper-threading bit
-       jnc     .Ldone
        cmp     \$0,%r9d
        jne     .Lnotintel
-       or      \$1<<20,%edx            # use reserved bit to engage RC4_CHAR
+       or      \$0x00100000,%edx       # use reserved 20th bit to engage RC4_CHAR
        and     \$15,%ah
        cmp     \$15,%ah                # examine Family ID
        je      .Lnotintel
-       or      \$1<<30,%edx            # use reserved bit to skip unrolled loop
+       or      \$0x40000000,%edx       # use reserved bit to skip unrolled loop
 .Lnotintel:
+       bt      \$28,%edx               # test hyper-threading bit
+       jnc     .Ldone
        shr     \$16,%ebx
        cmp     \$1,%bl                 # see if cache is shared
        ja      .Ldone