summaryrefslogtreecommitdiff
path: root/validat1.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-01-20 19:34:09 -0500
committerJeffrey Walton <noloader@gmail.com>2019-01-20 19:34:09 -0500
commit92808945c19b0301b0594ad612174d3f41915c1b (patch)
treee2811ff377227da26c1a3c9b42b54f24ceab0587 /validat1.cpp
parent0b348fe4bed92ec98c6926d6f9951730fc2db14c (diff)
downloadcryptopp-git-92808945c19b0301b0594ad612174d3f41915c1b.tar.gz
Fix TestAltivecOps on AIX
Diffstat (limited to 'validat1.cpp')
-rw-r--r--validat1.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/validat1.cpp b/validat1.cpp
index 39392b94..db523880 100644
--- a/validat1.cpp
+++ b/validat1.cpp
@@ -1085,9 +1085,9 @@ bool TestAltivecOps()
CRYPTOPP_ALIGN_DATA(16)
byte dest[20], src[20] = {23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4};
- const byte st1[16] ={22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7};
- const byte st2[16] ={21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6};
- const byte st3[16] ={20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5};
+ const byte st1[16] = {22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7};
+ const byte st2[16] = {21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6};
+ const byte st3[16] = {20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5};
VecStore(VecLoad(src), dest);
pass1 = (0 == std::memcmp(src, dest, 16)) && pass1;
@@ -1187,12 +1187,16 @@ bool TestAltivecOps()
//********** Extraction **********//
bool pass3=true;
- uint8x16_p ex1 = {0x1f,0x1e,0x1d,0x1c, 0x1b,0x1a,0x19,0x18,
- 0x17,0x16,0x15,0x14, 0x13,0x12,0x11,0x10};
- uint8x16_p ex2 = {0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
- 0x17,0x16,0x15,0x14, 0x13,0x12,0x11,0x10};
- uint8x16_p ex3 = {0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
- 0x1f,0x1e,0x1d,0x1c, 0x1b,0x1a,0x19,0x18};
+ const byte bex1[] = {0x1f,0x1e,0x1d,0x1c, 0x1b,0x1a,0x19,0x18,
+ 0x17,0x16,0x15,0x14, 0x13,0x12,0x11,0x10};
+ const byte bex2[] = {0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
+ 0x17,0x16,0x15,0x14, 0x13,0x12,0x11,0x10};
+ const byte bex3[] = {0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,
+ 0x1f,0x1e,0x1d,0x1c, 0x1b,0x1a,0x19,0x18};
+
+ const uint8x16_p ex1 = (uint8x16_p)VecLoad(bex1);
+ const uint8x16_p ex2 = (uint8x16_p)VecLoad(bex2);
+ const uint8x16_p ex3 = (uint8x16_p)VecLoad(bex3);
pass3 = VecEqual(ex2, VecGetLow(ex1)) && pass3;
CRYPTOPP_ASSERT(pass3);