summaryrefslogtreecommitdiff
path: root/TestScripts/cryptest.sh
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-03-08 21:13:43 -0500
committerJeffrey Walton <noloader@gmail.com>2021-03-08 21:13:43 -0500
commitd936f49ee77efc72c7109aa164926d1d89e81c4e (patch)
tree49248b33f35a32b7c9ad7d28f4af1aaa093f6036 /TestScripts/cryptest.sh
parent40cb3a87462d9dbf5f82c5486b91e9e0a54d84ee (diff)
downloadcryptopp-git-d936f49ee77efc72c7109aa164926d1d89e81c4e.tar.gz
Update cryptest.sh
Diffstat (limited to 'TestScripts/cryptest.sh')
-rwxr-xr-xTestScripts/cryptest.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/TestScripts/cryptest.sh b/TestScripts/cryptest.sh
index a8592b4b..abf667eb 100755
--- a/TestScripts/cryptest.sh
+++ b/TestScripts/cryptest.sh
@@ -137,6 +137,13 @@ IS_SPARC=$("$GREP" -i -c "sparc" <<< "$THIS_MACHINE")
IS_X32=0
# Fixup
+if [[ "$IS_AIX" -ne 0 ]]; then
+ THIS_MACHINE="$(prtconf | "$GREP" -i "Processor Type" | head -n 1 | cut -f 2 -d ':')"
+ IS_PPC32=$("$GREP" -i -c -E "(Power|PPC)" <<< "$THIS_MACHINE")
+ IS_PPC64=$("$GREP" -i -c -E "(Power64|PPC64)" <<< "$THIS_MACHINE")
+fi
+
+# Fixup
if [[ "$IS_PPC64" -ne 0 ]]; then
IS_PPC32=0
fi
@@ -196,6 +203,17 @@ elif [[ ("$IS_PPC32" -ne 0 || "$IS_PPC64" -ne 0) ]]; then
if [[ $(sysctl hw.optional.altivec 2>&1 | "$GREP" -i 'hw.optional.altivec: 1') ]]; then
PPC_CPU_FLAGS+=" altivec"
fi
+ elif [[ ("$IS_AIX" -ne 0) ]]; then
+ CPUINFO="$(prtconf | "$GREP" -i "Processor Type" | head -n 1 | cut -f 2 -d ':')"
+ if echo -n "$CPUINFO" | "$GREP" -q -i -c "power9"; then
+ PPC_CPU_FLAGS="power9 power8 power7 altivec"
+ elif echo -n "$CPUINFO" | "$GREP" -q -i -c "power8"; then
+ PPC_CPU_FLAGS="power8 power7 altivec"
+ elif echo -n "$CPUINFO" | "$GREP" -q -i -c "power7"; then
+ PPC_CPU_FLAGS="power7 altivec"
+ elif echo -n "$CPUINFO" | "$GREP" -q -i -c "altivec"; then
+ PPC_CPU_FLAGS="altivec"
+ fi
else
CPUINFO="$(cat /proc/cpuinfo | grep "cpu" | head -n 1 | cut -f 2 -d ':')"
if echo -n "$CPUINFO" | "$GREP" -q -i -c "power9"; then