Enable SM3 AVX+BMI2

This commit is contained in:
Zhi Guan
2022-12-29 15:06:29 +08:00
parent 6ed075868d
commit 2aa4f5b747
2 changed files with 2 additions and 1 deletions

View File

@@ -80,6 +80,7 @@ endif()
option(ENABLE_SM3_AVX_BMI2 "Enable SM3 AVX+BMI2 assembly implementation" OFF)
if (ENABLE_SM3_AVX_BMI2)
add_definitions(-DSM3_AVX_BMI2)
enable_language(ASM)
list(APPEND src src/sm3_avx_bmi2.s)
endif()

View File

@@ -152,7 +152,7 @@ static uint32_t K[64] = {
*/
};
#ifndef ENABLE_SM3_AVX_BMI2
#ifndef SM3_AVX_BMI2
void sm3_compress_blocks(uint32_t digest[8], const uint8_t *data, size_t blocks)
{
uint32_t A;