diff --git a/src/crypto/astrobwt/AstroBWT.cpp b/src/crypto/astrobwt/AstroBWT.cpp index 29e34ecff..47949e4c6 100644 --- a/src/crypto/astrobwt/AstroBWT.cpp +++ b/src/crypto/astrobwt/AstroBWT.cpp @@ -48,7 +48,7 @@ static bool astrobwtInitialized = false; static bool hasAVX2 = false; extern "C" -#ifdef __GNUC__ +#ifndef _MSC_VER __attribute__((ms_abi)) #endif void SHA3_256_AVX2_ASM(const void* in, size_t inBytes, void* out); diff --git a/src/crypto/astrobwt/sha3_256_avx2.S b/src/crypto/astrobwt/sha3_256_avx2.S index 511294d3a..16dba72f1 100644 --- a/src/crypto/astrobwt/sha3_256_avx2.S +++ b/src/crypto/astrobwt/sha3_256_avx2.S @@ -40,6 +40,9 @@ .global DECL(SHA3_256_AVX2_ASM) +ALIGN 64 +DECL(SHA3_256_AVX2_ASM): + #include "sha3_256_avx2.inc" KeccakF1600_AVX2_ASM: diff --git a/src/crypto/astrobwt/sha3_256_avx2.asm b/src/crypto/astrobwt/sha3_256_avx2.asm index c4d5e409f..f38e09f13 100644 --- a/src/crypto/astrobwt/sha3_256_avx2.asm +++ b/src/crypto/astrobwt/sha3_256_avx2.asm @@ -29,6 +29,9 @@ _SHA3_256_AVX2_ASM SEGMENT PAGE READ EXECUTE PUBLIC SHA3_256_AVX2_ASM +ALIGN 64 +SHA3_256_AVX2_ASM: + include sha3_256_avx2.inc KeccakF1600_AVX2_ASM: diff --git a/src/crypto/astrobwt/sha3_256_avx2.inc b/src/crypto/astrobwt/sha3_256_avx2.inc index 3c27a31a8..81753dba9 100644 --- a/src/crypto/astrobwt/sha3_256_avx2.inc +++ b/src/crypto/astrobwt/sha3_256_avx2.inc @@ -26,8 +26,6 @@ ;# along with this program. If not, see . ;# -ALIGN 64 -SHA3_256_AVX2_ASM: vzeroupper mov qword ptr [rsp+8],rbx