From 4478e4cf39c1db269ee2ed22488ef8f2b3e4e721 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 22 Apr 2017 21:22:32 -0400 Subject: [PATCH] Removed Unified ASM and Modern Compiler tests Unified adds no value, and modern compilers are already tested --- TestScripts/cryptest.sh | 273 +--------------------------------------- cryptest.sh | 273 +--------------------------------------- 2 files changed, 4 insertions(+), 542 deletions(-) diff --git a/TestScripts/cryptest.sh b/TestScripts/cryptest.sh index 6a039ce4..6c46f45a 100755 --- a/TestScripts/cryptest.sh +++ b/TestScripts/cryptest.sh @@ -397,7 +397,7 @@ if [[ (-z "$HAVE_O3") ]]; then fi # Hit or miss, mostly hit -if [[ (-z "$HAVE_O5") ]]; then +if [[ ( (-z "$HAVE_O5") && ("$CLANG_COMPILER" -eq "0") ) ]]; then HAVE_O5=0 OPT_O5= rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 @@ -581,37 +581,6 @@ if [[ (-z "$HAVE_X32") ]]; then fi fi -# "Modern compiler, old hardware" combinations -HAVE_X86_AES=0 -HAVE_X86_RDRAND=0 -HAVE_X86_RDSEED=0 -HAVE_X86_PCLMUL=0 -if [[ ("$IS_X86" -ne "0" || "$IS_X64" -ne "0") && ("$SUN_COMPILER" -eq "0") ]]; then - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -maes adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ "$?" -eq "0" ]]; then - HAVE_X86_AES=1 - fi - - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -mrdrnd adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ "$?" -eq "0" ]]; then - HAVE_X86_RDRAND=1 - fi - - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -mrdseed adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ "$?" -eq "0" ]]; then - HAVE_X86_RDSEED=1 - fi - - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -mpclmul adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ "$?" -eq "0" ]]; then - HAVE_X86_PCLMUL=1 - fi -fi - # ld-gold linker testing if [[ (-z "$HAVE_LDGOLD") ]]; then HAVE_LDGOLD=0 @@ -628,16 +597,6 @@ if [[ (-z "$HAVE_LDGOLD") ]]; then fi fi -# GCC unified syntax for ASM. Divided syntax is being deprecated -if [[ (-z "$HAVE_UNIFIED_ASM") ]]; then - HAVE_UNIFIED_ASM=0 - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -masm-syntax-unified adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ "$?" -eq "0" ]]; then - HAVE_UNIFIED_ASM=1 - fi -fi - # ARMv7 and ARMv8, including NEON, CRC32 and Crypto extensions if [[ ("$IS_ARM32" -ne "0" || "$IS_ARM64" -ne "0") ]]; then @@ -1869,133 +1828,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" fi ############################################ -# Minimum arch with AESNI, RDRAND and RDSEED -if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" -ne "0") ]]; then - - X86_OPTS=() - if [[ "$HAVE_X86_AES" -ne "0" ]]; then - X86_OPTS+=("-maes") - fi - if [[ "$HAVE_X86_RDRAND" -ne "0" ]]; then - X86_OPTS+=("-mrdrnd") - fi - if [[ "$HAVE_X86_RDSEED" -ne "0" ]]; then - X86_OPTS+=("-mrdseed") - fi - - # i586 (lacks MMX, SSE and SSE2; enables X86 hardware) - if [[ "$IS_X86" -ne "0" ]]; then - ############################################ - # Debug build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Debug, i586, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$DEBUG_CXXFLAGS -march=i586 ${X86_OPTS[@]} $OPT_PIC" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi - - ############################################ - # Release build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Release, i586, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$RELEASE_CXXFLAGS -march=i586 ${X86_OPTS[@]} $OPT_PIC" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi - fi - - # x86-64 - if [[ "$IS_X64" -ne "0" ]]; then - ############################################ - # Debug build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Debug, SSE2, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$DEBUG_CXXFLAGS -march=x86-64 ${X86_OPTS[@]} $OPT_PIC" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi - - ############################################ - # Release build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Release, SSE2, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$RELEASE_CXXFLAGS -march=x86-64 ${X86_OPTS[@]} $OPT_PIC" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi - fi -fi - -############################################ -# mismatched arch capabilities +# Mismatched arch capabilities if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" -ne "0") ]]; then # i586 (lacks MMX, SSE and SSE2) @@ -2862,63 +2695,6 @@ if [[ "$HAVE_LDGOLD" -ne "0" ]]; then fi fi -############################################ -# Build with Unified ASM -if [[ "$HAVE_UNIFIED_ASM" -ne "0" ]]; then - - ############################################ - # Debug build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Debug, unified asm syntax" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$DEBUG_CXXFLAGS ${PLATFORM_CXXFLAGS[@]} -masm-syntax-unified $USER_CXXFLAGS" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi - - ############################################ - # Release build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Release, unified asm syntax" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$RELEASE_CXXFLAGS ${PLATFORM_CXXFLAGS[@]} -masm-syntax-unified $USER_CXXFLAGS" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi -fi - ############################################ # Build at -O3 if [[ "$HAVE_O3" -ne "0" ]]; then @@ -4763,51 +4539,6 @@ if [[ ("$IS_DARWIN" -ne "0" && "$HAVE_CXX17" -ne "0") ]]; then fi fi -############################################ -# Modern compiler and old hardware, like PII, PIII or Core2 -if [[ ("$HAVE_X86_AES" -ne "0" || "$HAVE_X86_RDRAND" -ne "0" || "$HAVE_X86_RDSEED" -ne "0") ]]; then - - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: AES, RDRAND and RDSEED" | tee -a "$TEST_RESULTS" - echo - - OPTS=() - if [[ ("$GCC_COMPILER" -ne "0") ]]; then - OPTS=("-march=native") - fi - if [[ "$HAVE_X86_AES" -ne "0" ]]; then - OPTS+=("-maes") - fi - if [[ "$HAVE_X86_RDRAND" -ne "0" ]]; then - OPTS+=("-mrdrnd") - fi - if [[ "$HAVE_X86_RDSEED" -ne "0" ]]; then - OPTS+=("-mrdseed") - fi - if [[ "$HAVE_X86_PCLMUL" -ne "0" ]]; then - OPTS+=("-mpclmul") - fi - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$RELEASE_CXXFLAGS ${OPTS[@]} ${PLATFORM_CXXFLAGS[@]} $USER_CXXFLAGS" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi -fi - ############################################ # Benchmarks if [[ "$WANT_BENCHMARKS" -ne "0" ]]; then diff --git a/cryptest.sh b/cryptest.sh index 6a039ce4..6c46f45a 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -397,7 +397,7 @@ if [[ (-z "$HAVE_O3") ]]; then fi # Hit or miss, mostly hit -if [[ (-z "$HAVE_O5") ]]; then +if [[ ( (-z "$HAVE_O5") && ("$CLANG_COMPILER" -eq "0") ) ]]; then HAVE_O5=0 OPT_O5= rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 @@ -581,37 +581,6 @@ if [[ (-z "$HAVE_X32") ]]; then fi fi -# "Modern compiler, old hardware" combinations -HAVE_X86_AES=0 -HAVE_X86_RDRAND=0 -HAVE_X86_RDSEED=0 -HAVE_X86_PCLMUL=0 -if [[ ("$IS_X86" -ne "0" || "$IS_X64" -ne "0") && ("$SUN_COMPILER" -eq "0") ]]; then - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -maes adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ "$?" -eq "0" ]]; then - HAVE_X86_AES=1 - fi - - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -mrdrnd adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ "$?" -eq "0" ]]; then - HAVE_X86_RDRAND=1 - fi - - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -mrdseed adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ "$?" -eq "0" ]]; then - HAVE_X86_RDSEED=1 - fi - - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -mpclmul adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ "$?" -eq "0" ]]; then - HAVE_X86_PCLMUL=1 - fi -fi - # ld-gold linker testing if [[ (-z "$HAVE_LDGOLD") ]]; then HAVE_LDGOLD=0 @@ -628,16 +597,6 @@ if [[ (-z "$HAVE_LDGOLD") ]]; then fi fi -# GCC unified syntax for ASM. Divided syntax is being deprecated -if [[ (-z "$HAVE_UNIFIED_ASM") ]]; then - HAVE_UNIFIED_ASM=0 - rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 - "$CXX" -DCRYPTOPP_ADHOC_MAIN -masm-syntax-unified adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1 - if [[ "$?" -eq "0" ]]; then - HAVE_UNIFIED_ASM=1 - fi -fi - # ARMv7 and ARMv8, including NEON, CRC32 and Crypto extensions if [[ ("$IS_ARM32" -ne "0" || "$IS_ARM64" -ne "0") ]]; then @@ -1869,133 +1828,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" fi ############################################ -# Minimum arch with AESNI, RDRAND and RDSEED -if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" -ne "0") ]]; then - - X86_OPTS=() - if [[ "$HAVE_X86_AES" -ne "0" ]]; then - X86_OPTS+=("-maes") - fi - if [[ "$HAVE_X86_RDRAND" -ne "0" ]]; then - X86_OPTS+=("-mrdrnd") - fi - if [[ "$HAVE_X86_RDSEED" -ne "0" ]]; then - X86_OPTS+=("-mrdseed") - fi - - # i586 (lacks MMX, SSE and SSE2; enables X86 hardware) - if [[ "$IS_X86" -ne "0" ]]; then - ############################################ - # Debug build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Debug, i586, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$DEBUG_CXXFLAGS -march=i586 ${X86_OPTS[@]} $OPT_PIC" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi - - ############################################ - # Release build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Release, i586, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$RELEASE_CXXFLAGS -march=i586 ${X86_OPTS[@]} $OPT_PIC" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi - fi - - # x86-64 - if [[ "$IS_X64" -ne "0" ]]; then - ############################################ - # Debug build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Debug, SSE2, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$DEBUG_CXXFLAGS -march=x86-64 ${X86_OPTS[@]} $OPT_PIC" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi - - ############################################ - # Release build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Release, SSE2, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$RELEASE_CXXFLAGS -march=x86-64 ${X86_OPTS[@]} $OPT_PIC" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi - fi -fi - -############################################ -# mismatched arch capabilities +# Mismatched arch capabilities if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" -ne "0") ]]; then # i586 (lacks MMX, SSE and SSE2) @@ -2862,63 +2695,6 @@ if [[ "$HAVE_LDGOLD" -ne "0" ]]; then fi fi -############################################ -# Build with Unified ASM -if [[ "$HAVE_UNIFIED_ASM" -ne "0" ]]; then - - ############################################ - # Debug build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Debug, unified asm syntax" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$DEBUG_CXXFLAGS ${PLATFORM_CXXFLAGS[@]} -masm-syntax-unified $USER_CXXFLAGS" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi - - ############################################ - # Release build - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: Release, unified asm syntax" | tee -a "$TEST_RESULTS" - echo - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$RELEASE_CXXFLAGS ${PLATFORM_CXXFLAGS[@]} -masm-syntax-unified $USER_CXXFLAGS" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static dynamic cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi -fi - ############################################ # Build at -O3 if [[ "$HAVE_O3" -ne "0" ]]; then @@ -4763,51 +4539,6 @@ if [[ ("$IS_DARWIN" -ne "0" && "$HAVE_CXX17" -ne "0") ]]; then fi fi -############################################ -# Modern compiler and old hardware, like PII, PIII or Core2 -if [[ ("$HAVE_X86_AES" -ne "0" || "$HAVE_X86_RDRAND" -ne "0" || "$HAVE_X86_RDSEED" -ne "0") ]]; then - - echo - echo "************************************" | tee -a "$TEST_RESULTS" - echo "Testing: AES, RDRAND and RDSEED" | tee -a "$TEST_RESULTS" - echo - - OPTS=() - if [[ ("$GCC_COMPILER" -ne "0") ]]; then - OPTS=("-march=native") - fi - if [[ "$HAVE_X86_AES" -ne "0" ]]; then - OPTS+=("-maes") - fi - if [[ "$HAVE_X86_RDRAND" -ne "0" ]]; then - OPTS+=("-mrdrnd") - fi - if [[ "$HAVE_X86_RDSEED" -ne "0" ]]; then - OPTS+=("-mrdseed") - fi - if [[ "$HAVE_X86_PCLMUL" -ne "0" ]]; then - OPTS+=("-mpclmul") - fi - - "$MAKE" clean > /dev/null 2>&1 - rm -f adhoc.cpp > /dev/null 2>&1 - - CXXFLAGS="$RELEASE_CXXFLAGS ${OPTS[@]} ${PLATFORM_CXXFLAGS[@]} $USER_CXXFLAGS" - CXX="$CXX" CXXFLAGS="$CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" - else - ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" - fi - ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" - if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then - echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" - fi - fi -fi - ############################################ # Benchmarks if [[ "$WANT_BENCHMARKS" -ne "0" ]]; then