From 11c930fbdb0ead4d48092d46e3a34c17f998bf91 Mon Sep 17 00:00:00 2001 From: Maya Rashish Date: Mon, 9 Jan 2017 00:33:47 +0200 Subject: [PATCH 7/8] Put OPENSSL_ia32cap_P+8 in r11d and use it to avoid needing to make an unaligned access to test for AVX512F. --- crypto/chacha/asm/chacha-x86_64.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/chacha/asm/chacha-x86_64.pl b/crypto/chacha/asm/chacha-x86_64.pl index ac169ee..807ee58 100755 --- a/crypto/chacha/asm/chacha-x86_64.pl +++ b/crypto/chacha/asm/chacha-x86_64.pl @@ -244,10 +244,11 @@ $code.=<<___; ChaCha20_ctr32: cmp \$0,$len je .Lno_data - mov OPENSSL_ia32cap_P+4(%rip),%r10 + mov OPENSSL_ia32cap_P+4(%rip),%r10d + mov OPENSSL_ia32cap_P+8(%rip),%r11d ___ $code.=<<___ if ($avx>2); - bt \$48,%r10 # check for AVX512F + bt \$16,%r11d # check for AVX512F jc .LChaCha20_avx512 ___ $code.=<<___; -- 2.11.0