Make all x86_64 modules independent on current working directory.
[openssl.git] / crypto / x86_64cpuid.pl
index e29792a1573d7d131aca055d1ff04d855c07c63a..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
 
@@ -136,11 +138,11 @@ OPENSSL_ia32_cpuid:
        cpuid
        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