summaryrefslogtreecommitdiff
path: root/TestPrograms
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-11-19 01:36:11 -0500
committerJeffrey Walton <noloader@gmail.com>2018-11-19 01:36:11 -0500
commitb1929f78d0f0e86ff84c044ca6b2c4d9378512a6 (patch)
tree12dcce1783bc32726b6d83f6762838814e7bfd4d /TestPrograms
parentf8b1a997c55bf390e7511495b03dd20c90ca1133 (diff)
downloadcryptopp-git-b1929f78d0f0e86ff84c044ca6b2c4d9378512a6.tar.gz
Update test programs for PowerPC (GH #741)
Diffstat (limited to 'TestPrograms')
-rw-r--r--TestPrograms/test_ppc_sha.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/TestPrograms/test_ppc_sha.cxx b/TestPrograms/test_ppc_sha.cxx
new file mode 100644
index 00000000..8fb23336
--- /dev/null
+++ b/TestPrograms/test_ppc_sha.cxx
@@ -0,0 +1,23 @@
+#include <altivec.h>
+int main(int argc, char* argv[])
+{
+#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
+ __vector unsigned int x = {1,2,3,4};
+ x=__vshasigmaw(x, 0, 0);
+ __vector unsigned long long y = {1,2};
+ y=__vshasigmad(y, 0, 0);
+#elif defined(__clang__)
+ __vector unsigned int x = {1,2,3,4};
+ x=__builtin_altivec_crypto_vshasigmaw(x, 0, 0);
+ __vector unsigned long long y = {1,2};
+ y=__builtin_altivec_crypto_vshasigmad(y, 0, 0);
+#elif defined(__GNUC__)
+ __vector unsigned int x = {1,2,3,4};
+ x=__builtin_crypto_vshasigmaw(x, 0, 0);
+ __vector unsigned long long y = {1,2};
+ y=__builtin_crypto_vshasigmad(y, 0, 0);
+#else
+ int XXX[-1];
+#endif
+ return 0;
+}