diff options
| author | Jeffrey Walton <noloader@gmail.com> | 2020-05-11 22:24:16 -0400 |
|---|---|---|
| committer | Jeffrey Walton <noloader@gmail.com> | 2020-05-11 22:24:16 -0400 |
| commit | eadca119b85de647ad2b62893a2010b424ced9a5 (patch) | |
| tree | cab9b72c4566d6aa9549896d28c5a9c8842cb1d7 /TestPrograms | |
| parent | cca1b2f31834e7086816295246f38d0f622bde34 (diff) | |
| download | cryptopp-git-eadca119b85de647ad2b62893a2010b424ced9a5.tar.gz | |
Go back to using __vector unsigned long long for POWER8 and above
Diffstat (limited to 'TestPrograms')
| -rw-r--r-- | TestPrograms/test_ppc_aes.cxx | 4 | ||||
| -rw-r--r-- | TestPrograms/test_ppc_power7.cxx | 4 | ||||
| -rw-r--r-- | TestPrograms/test_ppc_power8.cxx | 16 | ||||
| -rw-r--r-- | TestPrograms/test_ppc_sha.cxx | 6 | ||||
| -rw-r--r-- | TestPrograms/test_ppc_vmull.cxx | 10 |
5 files changed, 20 insertions, 20 deletions
diff --git a/TestPrograms/test_ppc_aes.cxx b/TestPrograms/test_ppc_aes.cxx index 494677e7..cb999fb8 100644 --- a/TestPrograms/test_ppc_aes.cxx +++ b/TestPrograms/test_ppc_aes.cxx @@ -8,13 +8,13 @@ int main(int argc, char* argv[]) x=__vncipher(x,x);
x=__vncipherlast(x,x);
#elif defined(__clang__)
- __vector unsigned long x = {1,2};
+ __vector unsigned long long x = {1,2};
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 x = {1,2};
+ __vector unsigned long long x = {1,2};
x=__builtin_crypto_vcipher(x,x);
x=__builtin_crypto_vcipherlast(x,x);
x=__builtin_crypto_vncipher(x,x);
diff --git a/TestPrograms/test_ppc_power7.cxx b/TestPrograms/test_ppc_power7.cxx index 53764921..d6c568d0 100644 --- a/TestPrograms/test_ppc_power7.cxx +++ b/TestPrograms/test_ppc_power7.cxx @@ -24,8 +24,8 @@ int main(int argc, char* argv[]) __vector unsigned int x = {5,6,7,8};
__vector unsigned int y = vec_xl(0, (unsigned int*)argv[0]);
__vector unsigned int z = vec_xor(x, y);
- __vector unsigned long xx = {1,2};
- __vector unsigned long yy = (__vector unsigned long)y;
+ __vector unsigned long long xx = {1,2};
+ __vector unsigned long long yy = (__vector unsigned long long)y;
#else
int x[-1];
#endif
diff --git a/TestPrograms/test_ppc_power8.cxx b/TestPrograms/test_ppc_power8.cxx index 37f266db..451bf657 100644 --- a/TestPrograms/test_ppc_power8.cxx +++ b/TestPrograms/test_ppc_power8.cxx @@ -15,18 +15,18 @@ int main(int argc, char* argv[])
{
#if defined(_ARCH_PWR8)
- __vector unsigned long r = {1, 2};
+ __vector unsigned long long r = {1, 2};
__vector unsigned int s = vec_xl(0, (unsigned int*)argv[0]); // Power7
- __vector unsigned long w = (__vector unsigned long)r;
- __vector unsigned long x = (__vector unsigned long)s;
- __vector unsigned long y = vec_xor(w, x);
- __vector unsigned long z = vec_add(y, vec_add(w, x));
+ __vector unsigned long long w = (__vector unsigned long long)r;
+ __vector unsigned long long x = (__vector unsigned long long)s;
+ __vector unsigned long long y = vec_xor(w, x);
+ __vector unsigned long long z = vec_add(y, vec_add(w, x));
# if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
- __vector unsigned long u = __vpmsumd (y, z);
+ __vector unsigned long long u = __vpmsumd (y, z);
# elif defined(__clang__)
- __vector unsigned long u = __builtin_altivec_crypto_vpmsumd (y, z);
+ __vector unsigned long long u = __builtin_altivec_crypto_vpmsumd (y, z);
# else
- __vector unsigned long u = __builtin_crypto_vpmsumd (y, z);
+ __vector unsigned long long u = __builtin_crypto_vpmsumd (y, z);
# endif
#else
int x[-1];
diff --git a/TestPrograms/test_ppc_sha.cxx b/TestPrograms/test_ppc_sha.cxx index f23d7c5d..8fb23336 100644 --- a/TestPrograms/test_ppc_sha.cxx +++ b/TestPrograms/test_ppc_sha.cxx @@ -4,17 +4,17 @@ 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 y = {1,2};
+ __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 y = {1,2};
+ __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 y = {1,2};
+ __vector unsigned long long y = {1,2};
y=__builtin_crypto_vshasigmad(y, 0, 0);
#else
int XXX[-1];
diff --git a/TestPrograms/test_ppc_vmull.cxx b/TestPrograms/test_ppc_vmull.cxx index 73aeaccf..e2ef6dae 100644 --- a/TestPrograms/test_ppc_vmull.cxx +++ b/TestPrograms/test_ppc_vmull.cxx @@ -1,15 +1,15 @@ #include <altivec.h>
int main(int argc, char* argv[])
{
- __vector unsigned long x = {1,2};
- __vector unsigned long y = {3,4};
+ __vector unsigned long long x = {1,2};
+ __vector unsigned long long y = {3,4};
#if defined(__ibmxl__) || (defined(_AIX) && defined(__xlC__))
- __vector unsigned long z=__vpmsumd(x,y);
+ __vector unsigned long long z=__vpmsumd(x,y);
#elif defined(__clang__)
- __vector unsigned long z=__builtin_altivec_crypto_vpmsumd(x,y);
+ __vector unsigned long long z=__builtin_altivec_crypto_vpmsumd(x,y);
#elif defined(__GNUC__)
- __vector unsigned long z=__builtin_crypto_vpmsumd(x,y);
+ __vector unsigned long long z=__builtin_crypto_vpmsumd(x,y);
#else
int XXX[-1];
#endif
|
