Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed May 26, 2021
1 parent 28fc786 commit 175e7f7
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions arm_simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#endif

#if (CRYPTOPP_ARM_CRC32_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
/// \name CRC32 checksum
//@{

/// \brief CRC32 checksum
/// \param crc the starting crc value
/// \param val the value to checksum
Expand Down Expand Up @@ -72,6 +75,9 @@ inline uint32_t CRC32Wx4 (uint32_t crc, const uint32_t vals[4])
#endif
}

//@}
/// \name CRC32-C checksum

/// \brief CRC32-C checksum
/// \param crc the starting crc value
/// \param val the value to checksum
Expand Down Expand Up @@ -124,9 +130,12 @@ inline uint32_t CRC32CWx4 (uint32_t crc, const uint32_t vals[4])
return crc;
#endif
}
//@}
#endif // CRYPTOPP_ARM_CRC32_AVAILABLE

#if (CRYPTOPP_ARM_PMULL_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
/// \name Polynomial multiplication
//@{

/// \brief Polynomial multiplication
/// \param a the first value
Expand Down Expand Up @@ -342,11 +351,14 @@ inline uint64x2_t VEXT_U8(uint64x2_t a, uint64x2_t b)
:"=w" (r) : "w" (a), "w" (b), "I" (C) );
return r;
#endif
//@}
}

#endif // CRYPTOPP_ARM_PMULL_AVAILABLE

#if CRYPTOPP_ARM_SHA3_AVAILABLE
#if CRYPTOPP_ARM_SHA3_AVAILABLE || defined(CRYPTOPP_DOXYGEN_PROCESSING)
/// \name ARMv8.2 operations
//@{

/// \brief Three-way XOR
/// \param a the first value
Expand All @@ -355,7 +367,7 @@ inline uint64x2_t VEXT_U8(uint64x2_t a, uint64x2_t b)
/// \return three-way exclusive OR of the values
/// \details VEOR3() performs veor3q_u64(). VEOR3 is provided as GCC inline assembly due
/// to Clang and lack of support for the intrinsic.
/// \details VEOR3 requires ARMv8.4.
/// \details VEOR3 requires ARMv8.2.
/// \since Crypto++ 8.6
inline uint64x2_t VEOR3(uint64x2_t a, uint64x2_t b, uint64x2_t c)
{
Expand All @@ -376,7 +388,7 @@ inline uint64x2_t VEOR3(uint64x2_t a, uint64x2_t b, uint64x2_t c)
/// \return two-way exclusive OR of the values, then rotated by imm6
/// \details VXARQ() performs vxarq_u64(). VXARQ is provided as GCC inline assembly due
/// to Clang and lack of support for the intrinsic.
/// \details VXARQ requires ARMv8.4.
/// \details VXARQ requires ARMv8.2.
/// \since Crypto++ 8.6
inline uint64x2_t VXAR(uint64x2_t a, uint64x2_t b, const int imm6)
{
Expand All @@ -397,7 +409,7 @@ inline uint64x2_t VXAR(uint64x2_t a, uint64x2_t b, const int imm6)
/// \return two-way exclusive OR of the values, then rotated by C
/// \details VXARQ() performs vxarq_u64(). VXARQ is provided as GCC inline assembly due
/// to Clang and lack of support for the intrinsic.
/// \details VXARQ requires ARMv8.4.
/// \details VXARQ requires ARMv8.2.
/// \since Crypto++ 8.6
template <unsigned int C>
inline uint64x2_t VXAR(uint64x2_t a, uint64x2_t b)
Expand All @@ -418,7 +430,7 @@ inline uint64x2_t VXAR(uint64x2_t a, uint64x2_t b)
/// \return two-way exclusive OR of the values, then rotated 1-bit
/// \details VRAX1() performs vrax1q_u64(). VRAX1 is provided as GCC inline assembly due
/// to Clang and lack of support for the intrinsic.
/// \details VRAX1 requires ARMv8.4.
/// \details VRAX1 requires ARMv8.2.
/// \since Crypto++ 8.6
inline uint64x2_t VRAX1(uint64x2_t a, uint64x2_t b)
{
Expand All @@ -431,7 +443,7 @@ inline uint64x2_t VRAX1(uint64x2_t a, uint64x2_t b)
return r;
#endif
}

//@}
#endif // CRYPTOPP_ARM_SHA3_AVAILABLE

#endif // CRYPTOPP_ARM_SIMD_H

0 comments on commit 175e7f7

Please sign in to comment.