diff --git a/wolfcrypt/src/aes_gcm_asm.S b/wolfcrypt/src/aes_gcm_asm.S index 0924cde64..1ebedf8b8 100644 --- a/wolfcrypt/src/aes_gcm_asm.S +++ b/wolfcrypt/src/aes_gcm_asm.S @@ -22,9 +22,9 @@ #ifndef HAVE_INTEL_AVX1 #define HAVE_INTEL_AVX1 #endif /* HAVE_INTEL_AVX1 */ -#ifndef HAVE_INTEL_AVX2 +#ifndef NO_AVX2_SUPPORT #define HAVE_INTEL_AVX2 -#endif /* HAVE_INTEL_AVX2 */ +#endif /* NO_AVX2_SUPPORT */ #ifndef __APPLE__ .data diff --git a/wolfcrypt/src/fe_x25519_asm.S b/wolfcrypt/src/fe_x25519_asm.S index a0f57c5a2..d56875b92 100644 --- a/wolfcrypt/src/fe_x25519_asm.S +++ b/wolfcrypt/src/fe_x25519_asm.S @@ -1,6 +1,6 @@ /* fe_x25519_asm * - * Copyright (C) 2006-2018 wolfSSL Inc. + * Copyright (C) 2006-2019 wolfSSL Inc. * * This file is part of wolfSSL. * diff --git a/wolfcrypt/src/poly1305_asm.S b/wolfcrypt/src/poly1305_asm.S index 7a932ba1f..2e19ae96b 100644 --- a/wolfcrypt/src/poly1305_asm.S +++ b/wolfcrypt/src/poly1305_asm.S @@ -22,9 +22,9 @@ #ifndef HAVE_INTEL_AVX1 #define HAVE_INTEL_AVX1 #endif /* HAVE_INTEL_AVX1 */ -#ifndef HAVE_INTEL_AVX2 +#ifndef NO_AVX2_SUPPORT #define HAVE_INTEL_AVX2 -#endif /* HAVE_INTEL_AVX2 */ +#endif /* NO_AVX2_SUPPORT */ #ifdef HAVE_INTEL_AVX1 #ifndef __APPLE__ @@ -418,6 +418,7 @@ _poly1305_calc_powers_avx2: movq %r12, %rax shrq $2, %rax leaq 0(%rax,%rax,4), %rax + andq $3, %r12 addq %rax, %r10 adcq $0x00, %r11 adcq $0x00, %r12 diff --git a/wolfcrypt/src/sha256_asm.S b/wolfcrypt/src/sha256_asm.S index ac34e36bb..5ea7e0ad0 100644 --- a/wolfcrypt/src/sha256_asm.S +++ b/wolfcrypt/src/sha256_asm.S @@ -22,9 +22,9 @@ #ifndef HAVE_INTEL_AVX1 #define HAVE_INTEL_AVX1 #endif /* HAVE_INTEL_AVX1 */ -#ifndef HAVE_INTEL_AVX2 +#ifndef NO_AVX2_SUPPORT #define HAVE_INTEL_AVX2 -#endif /* HAVE_INTEL_AVX2 */ +#endif /* NO_AVX2_SUPPORT */ #ifdef HAVE_INTEL_AVX1 #ifndef __APPLE__ diff --git a/wolfcrypt/src/sha512_asm.S b/wolfcrypt/src/sha512_asm.S index c5f714519..c0afb3dc5 100644 --- a/wolfcrypt/src/sha512_asm.S +++ b/wolfcrypt/src/sha512_asm.S @@ -22,9 +22,9 @@ #ifndef HAVE_INTEL_AVX1 #define HAVE_INTEL_AVX1 #endif /* HAVE_INTEL_AVX1 */ -#ifndef HAVE_INTEL_AVX2 +#ifndef NO_AVX2_SUPPORT #define HAVE_INTEL_AVX2 -#endif /* HAVE_INTEL_AVX2 */ +#endif /* NO_AVX2_SUPPORT */ #ifdef HAVE_INTEL_AVX1 #ifndef __APPLE__