summaryrefslogtreecommitdiff
path: root/TestPrograms
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-10-25 09:35:27 -0400
committerJeffrey Walton <noloader@gmail.com>2019-10-25 09:35:27 -0400
commitbff3ed5e27884ec50a6ff2640382ebec18757116 (patch)
tree5b42e9e095e49959c589f1ef0fe100888c13aa69 /TestPrograms
parent1e5beb32d447cd7c2091f95162d64d4993bb7c09 (diff)
downloadcryptopp-git-bff3ed5e27884ec50a6ff2640382ebec18757116.tar.gz
Improve PPC64 feature tests for XLC on AIX
Diffstat (limited to 'TestPrograms')
-rw-r--r--TestPrograms/test_ppc_power7.cxx8
-rw-r--r--TestPrograms/test_ppc_power8.cxx8
2 files changed, 16 insertions, 0 deletions
diff --git a/TestPrograms/test_ppc_power7.cxx b/TestPrograms/test_ppc_power7.cxx
index 71568cb9..565add60 100644
--- a/TestPrograms/test_ppc_power7.cxx
+++ b/TestPrograms/test_ppc_power7.cxx
@@ -3,6 +3,14 @@
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
+// XL C++ on AIX does not define VSX and does not
+// provide an option to set it. We have to set it
+// for the code below. This define must stay in
+// sync with the define in ppc_simd.h
+#if defined(_AIX) && defined(_ARCH_PWR7) && defined(__xlC__)
+# define __VSX__ 1
+#endif
+
#include <altivec.h>
int main(int argc, char* argv[])
{
diff --git a/TestPrograms/test_ppc_power8.cxx b/TestPrograms/test_ppc_power8.cxx
index 2786a422..451bf657 100644
--- a/TestPrograms/test_ppc_power8.cxx
+++ b/TestPrograms/test_ppc_power8.cxx
@@ -3,6 +3,14 @@
# pragma GCC diagnostic ignored "-Wdeprecated"
#endif
+// XL C++ on AIX does not define CRYPTO and does not
+// provide an option to set it. We have to set it
+// for the code below. This define must stay in
+// sync with the define in test_ppc_power8.cxx
+#if defined(_AIX) && defined(_ARCH_PWR8) && defined(__xlC__)
+# define __CRYPTO__ 1
+#endif
+
#include <altivec.h>
int main(int argc, char* argv[])
{