summaryrefslogtreecommitdiff
path: root/TestScripts
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-08-30 19:31:11 -0400
committerJeffrey Walton <noloader@gmail.com>2017-08-30 19:31:11 -0400
commitde8478af2ab5d27dcbff6a491dab1d090874f7ab (patch)
treea70579ece0fb69692d5684f6fb845e3585ee3c58 /TestScripts
parentffbedcefc5d2b436f5e85345ccd57e4615761b42 (diff)
downloadcryptopp-git-de8478af2ab5d27dcbff6a491dab1d090874f7ab.tar.gz
Add ARMv7-a NEON tests (GH #481)
The tests were already present; they just needed some tuning
Diffstat (limited to 'TestScripts')
-rwxr-xr-xTestScripts/cryptest.sh38
1 files changed, 28 insertions, 10 deletions
diff --git a/TestScripts/cryptest.sh b/TestScripts/cryptest.sh
index 7534879e..0f5ea756 100755
--- a/TestScripts/cryptest.sh
+++ b/TestScripts/cryptest.sh
@@ -1305,18 +1305,36 @@ if [[ ("$HAVE_DISASS" -ne "0" && ("$IS_ARM32" -ne "0" || "$IS_ARM64" -ne "0")) ]
FAILED=0
DISASS_TEXT=$("$DISASS" "${DISASSARGS[@]}" "$OBJFILE" 2>/dev/null)
- # ARIA::UncheckedKeySet: 8 vld1q.32
- COUNT=$(echo -n "$DISASS_TEXT" | "$GREP" -i -c 'vld')
- if [[ ("$COUNT" -lt "8") ]]; then
- FAILED=1
- echo "ERROR: failed to generate expected vector load instructions" | tee -a "$TEST_RESULTS"
+ if [[ ("$HAVE_ARMV8A") ]]; then
+ # ARIA::UncheckedKeySet: 8 vld1q.32
+ COUNT=$(echo -n "$DISASS_TEXT" | "$GREP" -i -c 'vld')
+ if [[ ("$COUNT" -lt "8") ]]; then
+ FAILED=1
+ echo "ERROR: failed to generate expected NEON load instructions" | tee -a "$TEST_RESULTS"
+ fi
+ else # ARMv7
+ # ARIA::UncheckedKeySet: 8 vld1.32 {d1,d2}
+ COUNT=$(echo -n "$DISASS_TEXT" | "$GREP" -i -c -E 'vld1.32[[:space:]]*{')
+ if [[ ("$COUNT" -lt "6") ]]; then
+ FAILED=1
+ echo "ERROR: failed to generate expected vector load instructions" | tee -a "$TEST_RESULTS"
+ fi
fi
- # ARIA::UncheckedKeySet: 24 vstr1q.32
- COUNT=$(echo -n "$DISASS_TEXT" | "$GREP" -i -c 'vst')
- if [[ ("$COUNT" -lt "24") ]]; then
- FAILED=1
- echo "ERROR: failed to generate expected vector store instructions" | tee -a "$TEST_RESULTS"
+ if [[ ("$HAVE_ARMV8A") ]]; then
+ # ARIA::UncheckedKeySet: 24 vstr1q.32
+ COUNT=$(echo -n "$DISASS_TEXT" | "$GREP" -i -c 'vst')
+ if [[ ("$COUNT" -lt "20") ]]; then
+ FAILED=1
+ echo "ERROR: failed to generate expected vector store instructions" | tee -a "$TEST_RESULTS"
+ fi
+ else
+ # ARIA::UncheckedKeySet: 24 vstr1.32 {d1,d2}
+ COUNT=$(echo -n "$DISASS_TEXT" | "$GREP" -i -c -E 'vst1.32[[:space:]]*{')
+ if [[ ("$COUNT" -lt "16") ]]; then
+ FAILED=1
+ echo "ERROR: failed to generate expected vector store instructions" | tee -a "$TEST_RESULTS"
+ fi
fi
# ARIA::UncheckedKeySet: 17 vshl.32