From 77dc6d9e865b0e78ad61b058e2dddcd6efa370bb Mon Sep 17 00:00:00 2001 From: Maya Rashish Date: Mon, 9 Jan 2017 00:31:07 +0200 Subject: [PATCH 6/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/sha256-mb-x86_64.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/sha/asm/sha256-mb-x86_64.pl b/crypto/sha/asm/sha256-mb-x86_64.pl index 7d5fa2e..802364b 100644 --- a/crypto/sha/asm/sha256-mb-x86_64.pl +++ b/crypto/sha/asm/sha256-mb-x86_64.pl @@ -244,8 +244,9 @@ $code.=<<___; .type sha256_multi_block,\@function,3 .align 32 sha256_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