diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-11-18 22:26:34 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-11-18 22:26:34 -0500 |
commit | 2bb9f49544d90740a0c5db3472a32e6581a85f92 (patch) | |
tree | e6eb05f170e66da61c4f3f53e00603dd862b83a4 /TestPrograms/test_ppc_aes.cxx | |
parent | 1ac7207545f3a81ca8cc33dcaf4bda6d90a0c4a5 (diff) | |
download | cryptopp-git-2bb9f49544d90740a0c5db3472a32e6581a85f92.tar.gz |
Add test_ppc_aes.cxx test program
Diffstat (limited to 'TestPrograms/test_ppc_aes.cxx')
-rw-r--r-- | TestPrograms/test_ppc_aes.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/TestPrograms/test_ppc_aes.cxx b/TestPrograms/test_ppc_aes.cxx new file mode 100644 index 00000000..9e8690bb --- /dev/null +++ b/TestPrograms/test_ppc_aes.cxx @@ -0,0 +1,26 @@ +#include <altivec.h>
+int main(int argc, char* argv[])
+{
+#if defined(__ibmxl__)
+ __vector unsigned char x;
+ x=__vcipher(x,x);
+ x=__vcipherlast(x,x);
+ x=__vncipher(x,x);
+ x=__vncipherlast(x,x);
+#elif defined(__clang__)
+ __vector unsigned long long x;
+ x=__builtin_altivec_crypto_vcipher(x,x);
+ x=__builtin_altivec_crypto_vcipherlast(x,x);
+ x=__builtin_altivec_crypto_vncipher(x,x);
+ x=__builtin_altivec_crypto_vncipherlast(x,x);
+#elif defined(__GNUC__)
+ __vector unsigned long long x;
+ x=__builtin_crypto_vcipher(x,x);
+ x=__builtin_crypto_vcipherlast(x,x);
+ x=__builtin_crypto_vncipher(x,x);
+ x=__builtin_crypto_vncipherlast(x,x);
+#else
+ int XXX[-1];
+#endif
+ return 0;
+}
|