diff options
| author | miod <> | 2014-04-23 21:53:18 +0000 |
|---|---|---|
| committer | miod <> | 2014-04-23 21:53:18 +0000 |
| commit | 7a3a1e9247e74c98200f95b9d7bd23ba592cb6d6 (patch) | |
| tree | 9898394f7bc5f5ac9b1fd3b1811ea60244b5f3c2 /src | |
| parent | b1e89905b67ea7896e21eefb23d16fb2f6a2e876 (diff) | |
| download | openbsd-7a3a1e9247e74c98200f95b9d7bd23ba592cb6d6.tar.gz openbsd-7a3a1e9247e74c98200f95b9d7bd23ba592cb6d6.tar.bz2 openbsd-7a3a1e9247e74c98200f95b9d7bd23ba592cb6d6.zip | |
Don't bother generating win64 assembly prologue.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/x86_64cpuid.pl | 28 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/x86_64cpuid.pl | 28 |
2 files changed, 4 insertions, 52 deletions
diff --git a/src/lib/libcrypto/x86_64cpuid.pl b/src/lib/libcrypto/x86_64cpuid.pl index 3fe9a2d566..5586449c7a 100644 --- a/src/lib/libcrypto/x86_64cpuid.pl +++ b/src/lib/libcrypto/x86_64cpuid.pl | |||
| @@ -4,8 +4,6 @@ $flavour = shift; | |||
| 4 | $output = shift; | 4 | $output = shift; |
| 5 | if ($flavour =~ /\./) { $output = $flavour; undef $flavour; } | 5 | if ($flavour =~ /\./) { $output = $flavour; undef $flavour; } |
| 6 | 6 | ||
| 7 | $win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/); | ||
| 8 | |||
| 9 | $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; | 7 | $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; |
| 10 | ( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or | 8 | ( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or |
| 11 | ( $xlate="${dir}perlasm/x86_64-xlate.pl" and -f $xlate) or | 9 | ( $xlate="${dir}perlasm/x86_64-xlate.pl" and -f $xlate) or |
| @@ -14,8 +12,7 @@ die "can't locate x86_64-xlate.pl"; | |||
| 14 | open OUT,"| \"$^X\" $xlate $flavour $output"; | 12 | open OUT,"| \"$^X\" $xlate $flavour $output"; |
| 15 | *STDOUT=*OUT; | 13 | *STDOUT=*OUT; |
| 16 | 14 | ||
| 17 | ($arg1,$arg2,$arg3,$arg4)=$win64?("%rcx","%rdx","%r8", "%r9") : # Win64 order | 15 | ($arg1,$arg2,$arg3,$arg4)=("%rdi","%rsi","%rdx","%rcx"); # Unix order |
| 18 | ("%rdi","%rsi","%rdx","%rcx"); # Unix order | ||
| 19 | 16 | ||
| 20 | print<<___; | 17 | print<<___; |
| 21 | .extern OPENSSL_cpuid_setup | 18 | .extern OPENSSL_cpuid_setup |
| @@ -164,7 +161,7 @@ OPENSSL_ia32_cpuid: | |||
| 164 | .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid | 161 | .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid |
| 165 | ___ | 162 | ___ |
| 166 | 163 | ||
| 167 | print<<___ if (!$win64); | 164 | print<<___ |
| 168 | .globl OPENSSL_wipe_cpu | 165 | .globl OPENSSL_wipe_cpu |
| 169 | .type OPENSSL_wipe_cpu,\@abi-omnipotent | 166 | .type OPENSSL_wipe_cpu,\@abi-omnipotent |
| 170 | .align 16 | 167 | .align 16 |
| @@ -197,27 +194,6 @@ OPENSSL_wipe_cpu: | |||
| 197 | ret | 194 | ret |
| 198 | .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu | 195 | .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu |
| 199 | ___ | 196 | ___ |
| 200 | print<<___ if ($win64); | ||
| 201 | .globl OPENSSL_wipe_cpu | ||
| 202 | .type OPENSSL_wipe_cpu,\@abi-omnipotent | ||
| 203 | .align 16 | ||
| 204 | OPENSSL_wipe_cpu: | ||
| 205 | pxor %xmm0,%xmm0 | ||
| 206 | pxor %xmm1,%xmm1 | ||
| 207 | pxor %xmm2,%xmm2 | ||
| 208 | pxor %xmm3,%xmm3 | ||
| 209 | pxor %xmm4,%xmm4 | ||
| 210 | pxor %xmm5,%xmm5 | ||
| 211 | xorq %rcx,%rcx | ||
| 212 | xorq %rdx,%rdx | ||
| 213 | xorq %r8,%r8 | ||
| 214 | xorq %r9,%r9 | ||
| 215 | xorq %r10,%r10 | ||
| 216 | xorq %r11,%r11 | ||
| 217 | leaq 8(%rsp),%rax | ||
| 218 | ret | ||
| 219 | .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu | ||
| 220 | ___ | ||
| 221 | 197 | ||
| 222 | print<<___; | 198 | print<<___; |
| 223 | .globl OPENSSL_ia32_rdrand | 199 | .globl OPENSSL_ia32_rdrand |
diff --git a/src/lib/libssl/src/crypto/x86_64cpuid.pl b/src/lib/libssl/src/crypto/x86_64cpuid.pl index 3fe9a2d566..5586449c7a 100644 --- a/src/lib/libssl/src/crypto/x86_64cpuid.pl +++ b/src/lib/libssl/src/crypto/x86_64cpuid.pl | |||
| @@ -4,8 +4,6 @@ $flavour = shift; | |||
| 4 | $output = shift; | 4 | $output = shift; |
| 5 | if ($flavour =~ /\./) { $output = $flavour; undef $flavour; } | 5 | if ($flavour =~ /\./) { $output = $flavour; undef $flavour; } |
| 6 | 6 | ||
| 7 | $win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/); | ||
| 8 | |||
| 9 | $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; | 7 | $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; |
| 10 | ( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or | 8 | ( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or |
| 11 | ( $xlate="${dir}perlasm/x86_64-xlate.pl" and -f $xlate) or | 9 | ( $xlate="${dir}perlasm/x86_64-xlate.pl" and -f $xlate) or |
| @@ -14,8 +12,7 @@ die "can't locate x86_64-xlate.pl"; | |||
| 14 | open OUT,"| \"$^X\" $xlate $flavour $output"; | 12 | open OUT,"| \"$^X\" $xlate $flavour $output"; |
| 15 | *STDOUT=*OUT; | 13 | *STDOUT=*OUT; |
| 16 | 14 | ||
| 17 | ($arg1,$arg2,$arg3,$arg4)=$win64?("%rcx","%rdx","%r8", "%r9") : # Win64 order | 15 | ($arg1,$arg2,$arg3,$arg4)=("%rdi","%rsi","%rdx","%rcx"); # Unix order |
| 18 | ("%rdi","%rsi","%rdx","%rcx"); # Unix order | ||
| 19 | 16 | ||
| 20 | print<<___; | 17 | print<<___; |
| 21 | .extern OPENSSL_cpuid_setup | 18 | .extern OPENSSL_cpuid_setup |
| @@ -164,7 +161,7 @@ OPENSSL_ia32_cpuid: | |||
| 164 | .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid | 161 | .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid |
| 165 | ___ | 162 | ___ |
| 166 | 163 | ||
| 167 | print<<___ if (!$win64); | 164 | print<<___ |
| 168 | .globl OPENSSL_wipe_cpu | 165 | .globl OPENSSL_wipe_cpu |
| 169 | .type OPENSSL_wipe_cpu,\@abi-omnipotent | 166 | .type OPENSSL_wipe_cpu,\@abi-omnipotent |
| 170 | .align 16 | 167 | .align 16 |
| @@ -197,27 +194,6 @@ OPENSSL_wipe_cpu: | |||
| 197 | ret | 194 | ret |
| 198 | .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu | 195 | .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu |
| 199 | ___ | 196 | ___ |
| 200 | print<<___ if ($win64); | ||
| 201 | .globl OPENSSL_wipe_cpu | ||
| 202 | .type OPENSSL_wipe_cpu,\@abi-omnipotent | ||
| 203 | .align 16 | ||
| 204 | OPENSSL_wipe_cpu: | ||
| 205 | pxor %xmm0,%xmm0 | ||
| 206 | pxor %xmm1,%xmm1 | ||
| 207 | pxor %xmm2,%xmm2 | ||
| 208 | pxor %xmm3,%xmm3 | ||
| 209 | pxor %xmm4,%xmm4 | ||
| 210 | pxor %xmm5,%xmm5 | ||
| 211 | xorq %rcx,%rcx | ||
| 212 | xorq %rdx,%rdx | ||
| 213 | xorq %r8,%r8 | ||
| 214 | xorq %r9,%r9 | ||
| 215 | xorq %r10,%r10 | ||
| 216 | xorq %r11,%r11 | ||
| 217 | leaq 8(%rsp),%rax | ||
| 218 | ret | ||
| 219 | .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu | ||
| 220 | ___ | ||
| 221 | 197 | ||
| 222 | print<<___; | 198 | print<<___; |
| 223 | .globl OPENSSL_ia32_rdrand | 199 | .globl OPENSSL_ia32_rdrand |
