From aa7f6c47d15337a0e41a3b97778db8f217462008 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 13 Jan 2018 07:14:21 -0500 Subject: [PATCH] Update documentation --- misc.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/misc.h b/misc.h index 7401d92d..4e34cdcf 100644 --- a/misc.h +++ b/misc.h @@ -1350,8 +1350,8 @@ CRYPTOPP_DLL void CRYPTOPP_API UnalignedDeallocate(void *ptr); /// \tparam T the word type /// \param x the value to rotate /// \details This is a portable C/C++ implementation. The value x to be rotated can be 8 to 64-bits wide. -/// \details y must be in the range [0, sizeof(T)*8 - 1] to avoid undefined behavior. -/// Use rotlMod if the rotate amount y is outside the range. +/// \details R must be in the range [0, sizeof(T)*8 - 1] to avoid undefined behavior. +/// Use rotlMod if the rotate amount R is outside the range. /// \details Use rotlConstant when the rotate amount is constant. The template function was added /// because Clang did not propagate the constant when passed as a function parameter. Clang's /// need for a constexpr meant rotlFixed failed to compile on occassion. @@ -1377,8 +1377,8 @@ template inline T rotlConstant(T x) /// \tparam T the word type /// \param x the value to rotate /// \details This is a portable C/C++ implementation. The value x to be rotated can be 8 to 64-bits wide. -/// \details y must be in the range [0, sizeof(T)*8 - 1] to avoid undefined behavior. -/// Use rotrMod if the rotate amount y is outside the range. +/// \details R must be in the range [0, sizeof(T)*8 - 1] to avoid undefined behavior. +/// Use rotrMod if the rotate amount R is outside the range. /// \details Use rotrConstant when the rotate amount is constant. The template function was added /// because Clang did not propagate the constant when passed as a function parameter. Clang's /// need for a constexpr meant rotrFixed failed to compile on occassion. @@ -1407,7 +1407,8 @@ template inline T rotrConstant(T x) /// Use rotlMod if the rotate amount y is outside the range. /// \note rotlFixed attempts to enlist a rotate IMM instruction because its often faster /// than a rotate REG. Immediate rotates can be up to three times faster than their register -/// counterparts. +/// counterparts. New code should use rotlConstant, which accepts the rotate amount as a +/// template parameter. /// \sa rotlConstant, rotrConstant, rotlFixed, rotrFixed, rotlVariable, rotrVariable /// \since Crypto++ 6.0 template inline T rotlFixed(T x, unsigned int y) @@ -1431,7 +1432,8 @@ template inline T rotlFixed(T x, unsigned int y) /// Use rotrMod if the rotate amount y is outside the range. /// \note rotrFixed attempts to enlist a rotate IMM instruction because its often faster /// than a rotate REG. Immediate rotates can be up to three times faster than their register -/// counterparts. +/// counterparts. New code should use rotrConstant, which accepts the rotate amount as a +/// template parameter. /// \sa rotlConstant, rotrConstant, rotlFixed, rotrFixed, rotlVariable, rotrVariable /// \since Crypto++ 3.0 template inline T rotrFixed(T x, unsigned int y)