Don't use clobbered 'i' for checking UTCTime and GeneralizedTime length.
[openssl.git] / crypto / x86_64cpuid.pl
index 2f657ca9d8d7de7b1e8303673b5013b9572820f5..e19ecdbbfc8fc6da68d47a9d5b1004b3ecb9c6cc 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
@@ -188,3 +190,4 @@ OPENSSL_cleanse:
        ret
 .size  OPENSSL_cleanse,.-OPENSSL_cleanse
 ___
+close STDOUT;  # flush