From ff9b9c23efdf3fb9e01538385b9977900b54cd3d Mon Sep 17 00:00:00 2001 From: Maya Rashish Date: Mon, 9 Jan 2017 00:28:41 +0200 Subject: [PATCH 4/8] Use %r11d for OPENSSL_ia32cap_P+8. Now we can avoid making an unaligned access when testing cpuid for SHA support. --- crypto/sha/asm/sha1-mb-x86_64.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/sha/asm/sha1-mb-x86_64.pl b/crypto/sha/asm/sha1-mb-x86_64.pl index fc62abd..f7679fd 100644 --- a/crypto/sha/asm/sha1-mb-x86_64.pl +++ b/crypto/sha/asm/sha1-mb-x86_64.pl @@ -363,8 +363,9 @@ $code.=<<___; .type sha1_multi_block,\@function,3 .align 32 sha1_multi_block: - mov OPENSSL_ia32cap_P+4(%rip),%r10 - bt \$61,%r10 # check SHA bit + mov OPENSSL_ia32cap_P+4(%rip),%r10d + mov OPENSSL_ia32cap_P+8(%rip),%r11d + bt \$29,%r11d # check SHA bit jc _shaext_shortcut ___ $code.=<<___ if ($avx); -- 2.11.0