inline T1 VectorPermute(const T1& vec1, const T1& vec2, const T2& mask)
{
- return (T1)vec_perm(vec1, vec2, (uint8x16_p8)mask);
+ return (T1)vec_perm(vec1, vec2, (uint8x16_p)mask);
}
/// \brief XOR two vectors
@@ -349,16 +347,16 @@ inline T1 VectorAdd(const T1& vec1, const T2& vec2)
/// \param vec2 the second vector
/// \details VectorShiftLeft() concatenates vec1 and vec2 and returns a
/// new vector after shifting the concatenation by the specified number
-/// of bytes. Both vec1 and vec2 are cast to uint8x16_p8. The return
+/// of bytes. Both vec1 and vec2 are cast to uint8x16_p. The return
/// vector is the same type as vec1.
/// \details On big endian machines VectorShiftLeft() is vec_sld(a, b,
/// c). On little endian machines VectorShiftLeft() is translated to
/// vec_sld(b, a, 16-c). You should always call the function as
/// if on a big endian machine as shown below.
///
-/// uint8x16_p8 r0 = {0};
-/// uint8x16_p8 r1 = VectorLoad(ptr);
-/// uint8x16_p8 r5 = VectorShiftLeft<12>(r0, r1);
+/// uint8x16_p r0 = {0};
+/// uint8x16_p r1 = VectorLoad(ptr);
+/// uint8x16_p r5 = VectorShiftLeft<12>(r0, r1);
///
/// \sa Is vec_sld
/// endian sensitive? on Stack Overflow
@@ -367,9 +365,9 @@ template
inline T1 VectorShiftLeft(const T1& vec1, const T2& vec2)
{
#if defined(CRYPTOPP_LITTLE_ENDIAN)
- return (T1)vec_sld((uint8x16_p8)vec2, (uint8x16_p8)vec1, 16-C);
+ return (T1)vec_sld((uint8x16_p)vec2, (uint8x16_p)vec1, 16-C);
#else
- return (T1)vec_sld((uint8x16_p8)vec1, (uint8x16_p8)vec2, C);
+ return (T1)vec_sld((uint8x16_p)vec1, (uint8x16_p)vec2, C);
#endif
}
@@ -469,9 +467,9 @@ template
inline T VectorSHA256(const T& vec)
{
#if defined(CRYPTOPP_XLC_VERSION)
- return (T)__vshasigmaw((uint32x4_p8)vec, func, subfunc);
+ return (T)__vshasigmaw((uint32x4_p)vec, func, subfunc);
#elif defined(CRYPTOPP_GCC_VERSION)
- return (T)__builtin_crypto_vshasigmaw((uint32x4_p8)vec, func, subfunc);
+ return (T)__builtin_crypto_vshasigmaw((uint32x4_p)vec, func, subfunc);
#else
CRYPTOPP_ASSERT(0);
#endif
@@ -489,9 +487,9 @@ template
inline T VectorSHA512(const T& vec)
{
#if defined(CRYPTOPP_XLC_VERSION)
- return (T)__vshasigmad((uint64x2_p8)vec, func, subfunc);
+ return (T)__vshasigmad((uint64x2_p)vec, func, subfunc);
#elif defined(CRYPTOPP_GCC_VERSION)
- return (T)__builtin_crypto_vshasigmad((uint64x2_p8)vec, func, subfunc);
+ return (T)__builtin_crypto_vshasigmad((uint64x2_p)vec, func, subfunc);
#else
CRYPTOPP_ASSERT(0);
#endif