Add test_ppc_aes.cxx test program

pull/748/head
Jeffrey Walton 2018-11-18 22:26:34 -05:00
parent 1ac7207545
commit 2bb9f49544
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 27 additions and 13 deletions

View File

@ -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;
}

View File

@ -2,18 +2,6 @@
int main(int argc, char* argv[])
{
__vector unsigned long long z;
#if defined(__xlc__) || defined(__xlC__) || defined(__clang__)
__vector unsigned char x;
x=__vcipher(x,x);
x=__vcipherlast(x,x);
x=__vncipher(x,x);
x=__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);
#endif
z=vec_add(z,z);
return 0;
}