From b1929f78d0f0e86ff84c044ca6b2c4d9378512a6 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 19 Nov 2018 01:36:11 -0500 Subject: [PATCH] Update test programs for PowerPC (GH #741) --- TestPrograms/test_ppc_sha.cxx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 TestPrograms/test_ppc_sha.cxx 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 +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; +}