diff options
Diffstat (limited to 'src/lib/libcrypto/sha/asm/sha1-x86_64.pl')
-rwxr-xr-x | src/lib/libcrypto/sha/asm/sha1-x86_64.pl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/libcrypto/sha/asm/sha1-x86_64.pl b/src/lib/libcrypto/sha/asm/sha1-x86_64.pl index f15c7ec39b..147d21570b 100755 --- a/src/lib/libcrypto/sha/asm/sha1-x86_64.pl +++ b/src/lib/libcrypto/sha/asm/sha1-x86_64.pl | |||
@@ -216,6 +216,7 @@ unshift(@xi,pop(@xi)); | |||
216 | $code.=<<___; | 216 | $code.=<<___; |
217 | .text | 217 | .text |
218 | .extern OPENSSL_ia32cap_P | 218 | .extern OPENSSL_ia32cap_P |
219 | .hidden OPENSSL_ia32cap_P | ||
219 | 220 | ||
220 | .globl sha1_block_data_order | 221 | .globl sha1_block_data_order |
221 | .type sha1_block_data_order,\@function,3 | 222 | .type sha1_block_data_order,\@function,3 |
@@ -223,14 +224,14 @@ $code.=<<___; | |||
223 | sha1_block_data_order: | 224 | sha1_block_data_order: |
224 | mov OPENSSL_ia32cap_P+0(%rip),%r9d | 225 | mov OPENSSL_ia32cap_P+0(%rip),%r9d |
225 | mov OPENSSL_ia32cap_P+4(%rip),%r8d | 226 | mov OPENSSL_ia32cap_P+4(%rip),%r8d |
226 | test \$`1<<9`,%r8d # check SSSE3 bit | 227 | test \$IA32CAP_MASK1_SSSE3,%r8d # check SSSE3 bit |
227 | jz .Lialu | 228 | jz .Lialu |
228 | ___ | 229 | ___ |
229 | $code.=<<___ if ($avx); | 230 | $code.=<<___ if ($avx); |
230 | and \$`1<<28`,%r8d # mask AVX bit | 231 | and \$IA32CAP_MASK1_AVX,%r8d # mask AVX bit |
231 | and \$`1<<30`,%r9d # mask "Intel CPU" bit | 232 | and \$IA32CAP_MASK0_INTEL,%r9d # mask "Intel CPU" bit |
232 | or %r9d,%r8d | 233 | or %r9d,%r8d |
233 | cmp \$`1<<28|1<<30`,%r8d | 234 | cmp \$(IA32CAP_MASK0_INTEL | IA32CAP_MASK1_AVX),%r8d |
234 | je _avx_shortcut | 235 | je _avx_shortcut |
235 | ___ | 236 | ___ |
236 | $code.=<<___; | 237 | $code.=<<___; |