summaryrefslogtreecommitdiff
path: root/blake2s_simd.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-06-29 05:22:27 -0400
committerJeffrey Walton <noloader@gmail.com>2020-06-29 05:22:27 -0400
commit3bdcb5b8e07ccd9a1cd1cd5853091f25c1724718 (patch)
treeacec7b8a7c46d95778ebdcfdd68288b78a3590b3 /blake2s_simd.cpp
parent827f2ebcadd02b3474bdbda23a4d0c733ace8f3b (diff)
downloadcryptopp-git-3bdcb5b8e07ccd9a1cd1cd5853091f25c1724718.tar.gz
Update comments
Diffstat (limited to 'blake2s_simd.cpp')
-rw-r--r--blake2s_simd.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/blake2s_simd.cpp b/blake2s_simd.cpp
index 2f67f5c8..e7c80912 100644
--- a/blake2s_simd.cpp
+++ b/blake2s_simd.cpp
@@ -992,13 +992,13 @@ void BLAKE2_Compress32_ALTIVEC(const byte* input, BLAKE2s_State& state)
BLAKE2S_G2(row1,row2,row3,row4,buf4); \
BLAKE2S_UNDIAGONALIZE(row1,row2,row3,row4);
- /* Possibly unaligned user messages */
+ // Possibly unaligned user messages
uint32x4_p m0, m4, m8, m12;
- /* Endian conversion mask */
+ // Endian conversion mask
const uint8x16_p le_mask = {3,2,1,0, 7,6,5,4, 11,10,9,8, 15,14,13,12};
#if defined(_ARCH_PWR9)
- /* POWER9 provides loads for char's and short's */
+ // POWER9 provides loads for char's and short's
m0 = (uint32x4_p) vec_xl( 0, CONST_V8_CAST( input ));
m4 = (uint32x4_p) vec_xl( 16, CONST_V8_CAST( input ));
m8 = (uint32x4_p) vec_xl( 32, CONST_V8_CAST( input ));
@@ -1011,18 +1011,18 @@ void BLAKE2_Compress32_ALTIVEC(const byte* input, BLAKE2s_State& state)
m12 = vec_perm(m12, m12, le_mask);
# endif
#else
- /* Altivec only provides 16-byte aligned loads */
- /* http://www.nxp.com/docs/en/reference-manual/ALTIVECPEM.pdf, Section 3.16 */
+ // Altivec only provides 16-byte aligned loads
+ // http://www.nxp.com/docs/en/reference-manual/ALTIVECPEM.pdf
m0 = (uint32x4_p) vec_ld( 0, CONST_V8_CAST( input ));
m4 = (uint32x4_p) vec_ld( 16, CONST_V8_CAST( input ));
m8 = (uint32x4_p) vec_ld( 32, CONST_V8_CAST( input ));
m12 = (uint32x4_p) vec_ld( 48, CONST_V8_CAST( input ));
- /* Alignment check for load of the message buffer */
+ // Alignment check for load of the message buffer
const uintptr_t addr = (uintptr_t)input;
if (addr%16 == 0)
{
- /* Already aligned. Perform a little-endian swap as required */
+ // Already aligned. Perform a little-endian swap as required
# if defined(CRYPTOPP_BIG_ENDIAN)
m0 = vec_perm(m0, m0, le_mask);
m4 = vec_perm(m4, m4, le_mask);
@@ -1032,7 +1032,7 @@ void BLAKE2_Compress32_ALTIVEC(const byte* input, BLAKE2s_State& state)
}
else
{
- /* Not aligned. Fix vectors and perform a little-endian swap as required */
+ // Not aligned. Fix vectors and perform a little-endian swap as required
// http://mirror.informatimago.com/next/developer.apple.com/
// hardwaredrivers/ve/code_optimization.html
uint32x4_p ex; uint8x16_p perm;
@@ -1040,7 +1040,7 @@ void BLAKE2_Compress32_ALTIVEC(const byte* input, BLAKE2s_State& state)
perm = vec_lvsl(0, CONST_V8_CAST( addr ));
# if defined(CRYPTOPP_BIG_ENDIAN)
- /* Combine the vector permute with the little-endian swap */
+ // Combine the vector permute with the little-endian swap
perm = vec_perm(perm, perm, le_mask);
# endif