1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-25 08:51:26 +00:00

PQC_NO_ASM: disable assembly optimized implementations

This commit is contained in:
Henry Case 2021-09-20 17:25:51 +01:00
parent b542ed3079
commit 388eaa5b76
3 changed files with 7 additions and 1 deletions

View File

@ -102,6 +102,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX TRUE)
endif()
if (${PQC_NO_ASM})
set(NO_ASM TRUE)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
# Additional flags only useful when compiling with clang
string(APPEND PQC_CMAKE_C_CXX_FLAGS " -Wconditional-uninitialized -Wno-missing-variable-declarations -Wno-unused-command-line-argument")

View File

@ -148,5 +148,7 @@ uint32_t pqc_private_key_bsz(const pqc_ctx_t *p) {
void static_initialization(void) __attribute__((constructor));
void static_initialization(void) {
#ifdef PQC_ASM
CPU_CAPS = GetX86Info().features;
#endif
}

View File

@ -6,7 +6,7 @@ set(
p434/params.c
p434/sike.c)
if(${ARCH} STREQUAL "ARCH_x86_64")
if(${ARCH} STREQUAL "ARCH_x86_64" AND NOT ${NO_ASM})
add_definitions(-DPQC_ASM=1)
set(
SRC_CLEAN_SIKE_P434