Add Intel SHA extension specialized tests
parent
cce56d3f79
commit
1491b48691
25
cryptest.sh
25
cryptest.sh
|
|
@ -588,6 +588,7 @@ fi
|
||||||
|
|
||||||
# "Modern compiler, old hardware" combinations
|
# "Modern compiler, old hardware" combinations
|
||||||
HAVE_X86_AES=0
|
HAVE_X86_AES=0
|
||||||
|
HAVE_X86_SHA=0
|
||||||
HAVE_X86_RDRAND=0
|
HAVE_X86_RDRAND=0
|
||||||
HAVE_X86_RDSEED=0
|
HAVE_X86_RDSEED=0
|
||||||
HAVE_X86_PCLMUL=0
|
HAVE_X86_PCLMUL=0
|
||||||
|
|
@ -598,6 +599,12 @@ if [[ ("$IS_X86" -ne "0" || "$IS_X64" -ne "0") && ("$SUN_COMPILER" -eq "0") ]];
|
||||||
HAVE_X86_AES=1
|
HAVE_X86_AES=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -f "$TMP/adhoc.exe" > /dev/null 2>&1
|
||||||
|
"$CXX" -DCRYPTOPP_ADHOC_MAIN -msha adhoc.cpp -o "$TMP/adhoc.exe" > /dev/null 2>&1
|
||||||
|
if [[ "$?" -eq "0" ]]; then
|
||||||
|
HAVE_X86_SHA=1
|
||||||
|
fi
|
||||||
|
|
||||||
rm -f "$TMP/adhoc.exe" > /dev/null 2>&1
|
rm -f "$TMP/adhoc.exe" > /dev/null 2>&1
|
||||||
"$CXX" -DCRYPTOPP_ADHOC_MAIN -mrdrnd adhoc.cpp -o "$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
|
if [[ "$?" -eq "0" ]]; then
|
||||||
|
|
@ -1853,7 +1860,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
# Minimum arch with AESNI, RDRAND and RDSEED
|
# Minimum arch with AESNI, RDRAND, RDSEED and SHA
|
||||||
if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" -ne "0") ]]; then
|
if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER" -ne "0") ]]; then
|
||||||
|
|
||||||
X86_OPTS=()
|
X86_OPTS=()
|
||||||
|
|
@ -1866,6 +1873,9 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER"
|
||||||
if [[ "$HAVE_X86_RDSEED" -ne "0" ]]; then
|
if [[ "$HAVE_X86_RDSEED" -ne "0" ]]; then
|
||||||
X86_OPTS+=("-mrdseed")
|
X86_OPTS+=("-mrdseed")
|
||||||
fi
|
fi
|
||||||
|
if [[ "$HAVE_X86_SHA" -ne "0" ]]; then
|
||||||
|
X86_OPTS+=("-msha")
|
||||||
|
fi
|
||||||
|
|
||||||
# i586 (lacks MMX, SSE and SSE2; enables X86 hardware)
|
# i586 (lacks MMX, SSE and SSE2; enables X86 hardware)
|
||||||
if [[ "$IS_X86" -ne "0" ]]; then
|
if [[ "$IS_X86" -ne "0" ]]; then
|
||||||
|
|
@ -1873,7 +1883,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER"
|
||||||
# Debug build
|
# Debug build
|
||||||
echo
|
echo
|
||||||
echo "************************************" | tee -a "$TEST_RESULTS"
|
echo "************************************" | tee -a "$TEST_RESULTS"
|
||||||
echo "Testing: Debug, i586, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS"
|
echo "Testing: Debug, i586, AESNI, RDRAND, RDSEED and SHA" | tee -a "$TEST_RESULTS"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
"$MAKE" clean > /dev/null 2>&1
|
"$MAKE" clean > /dev/null 2>&1
|
||||||
|
|
@ -1899,7 +1909,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER"
|
||||||
# Release build
|
# Release build
|
||||||
echo
|
echo
|
||||||
echo "************************************" | tee -a "$TEST_RESULTS"
|
echo "************************************" | tee -a "$TEST_RESULTS"
|
||||||
echo "Testing: Release, i586, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS"
|
echo "Testing: Release, i586, AESNI, RDRAND, RDSEED and SHA" | tee -a "$TEST_RESULTS"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
"$MAKE" clean > /dev/null 2>&1
|
"$MAKE" clean > /dev/null 2>&1
|
||||||
|
|
@ -1928,7 +1938,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER"
|
||||||
# Debug build
|
# Debug build
|
||||||
echo
|
echo
|
||||||
echo "************************************" | tee -a "$TEST_RESULTS"
|
echo "************************************" | tee -a "$TEST_RESULTS"
|
||||||
echo "Testing: Debug, SSE2, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS"
|
echo "Testing: Debug, SSE2, AESNI, RDRAND, RDSEED and SHA" | tee -a "$TEST_RESULTS"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
"$MAKE" clean > /dev/null 2>&1
|
"$MAKE" clean > /dev/null 2>&1
|
||||||
|
|
@ -1954,7 +1964,7 @@ if [[ ("$GCC_COMPILER" -ne "0" || "$CLANG_COMPILER" -ne "0" || "$INTEL_COMPILER"
|
||||||
# Release build
|
# Release build
|
||||||
echo
|
echo
|
||||||
echo "************************************" | tee -a "$TEST_RESULTS"
|
echo "************************************" | tee -a "$TEST_RESULTS"
|
||||||
echo "Testing: Release, SSE2, AESNI, RDRAND and RDSEED" | tee -a "$TEST_RESULTS"
|
echo "Testing: Release, SSE2, AESNI, RDRAND, RDSEED and SHA" | tee -a "$TEST_RESULTS"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
"$MAKE" clean > /dev/null 2>&1
|
"$MAKE" clean > /dev/null 2>&1
|
||||||
|
|
@ -4810,7 +4820,7 @@ if [[ ("$HAVE_X86_AES" -ne "0" || "$HAVE_X86_RDRAND" -ne "0" || "$HAVE_X86_RDSEE
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "************************************" | tee -a "$TEST_RESULTS"
|
echo "************************************" | tee -a "$TEST_RESULTS"
|
||||||
echo "Testing: AES, RDRAND and RDSEED" | tee -a "$TEST_RESULTS"
|
echo "Testing: AES, RDRAND, RDSEED and SHA" | tee -a "$TEST_RESULTS"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
OPTS=()
|
OPTS=()
|
||||||
|
|
@ -4829,6 +4839,9 @@ if [[ ("$HAVE_X86_AES" -ne "0" || "$HAVE_X86_RDRAND" -ne "0" || "$HAVE_X86_RDSEE
|
||||||
if [[ "$HAVE_X86_PCLMUL" -ne "0" ]]; then
|
if [[ "$HAVE_X86_PCLMUL" -ne "0" ]]; then
|
||||||
OPTS+=("-mpclmul")
|
OPTS+=("-mpclmul")
|
||||||
fi
|
fi
|
||||||
|
if [[ "$HAVE_X86_SHA" -ne "0" ]]; then
|
||||||
|
OPTS+=("-msha")
|
||||||
|
fi
|
||||||
|
|
||||||
"$MAKE" clean > /dev/null 2>&1
|
"$MAKE" clean > /dev/null 2>&1
|
||||||
rm -f adhoc.cpp > /dev/null 2>&1
|
rm -f adhoc.cpp > /dev/null 2>&1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue