mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
Enable SM3 AVX+BMI2
This commit is contained in:
@@ -80,6 +80,7 @@ endif()
|
|||||||
|
|
||||||
option(ENABLE_SM3_AVX_BMI2 "Enable SM3 AVX+BMI2 assembly implementation" OFF)
|
option(ENABLE_SM3_AVX_BMI2 "Enable SM3 AVX+BMI2 assembly implementation" OFF)
|
||||||
if (ENABLE_SM3_AVX_BMI2)
|
if (ENABLE_SM3_AVX_BMI2)
|
||||||
|
add_definitions(-DSM3_AVX_BMI2)
|
||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
list(APPEND src src/sm3_avx_bmi2.s)
|
list(APPEND src src/sm3_avx_bmi2.s)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -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)
|
void sm3_compress_blocks(uint32_t digest[8], const uint8_t *data, size_t blocks)
|
||||||
{
|
{
|
||||||
uint32_t A;
|
uint32_t A;
|
||||||
|
|||||||
Reference in New Issue
Block a user