Removed branch from rotlVariable. The mask ensures it stays well defined

pull/35/head
Jeffrey Walton 2015-07-23 04:06:10 -04:00
parent 1303f4bdcc
commit ac0f94c23a
1 changed files with 2 additions and 2 deletions

4
misc.h
View File

@ -895,12 +895,12 @@ template<> inline byte rotrMod<byte>(byte x, unsigned int y)
template<> inline word32 rotlFixed<word32>(word32 x, unsigned int y)
{
return y ? __rlwinm(x,y,0,31) : x;
return (__rlwinm(x,y,0,31));
}
template<> inline word32 rotrFixed<word32>(word32 x, unsigned int y)
{
return y ? __rlwinm(x,32-y,0,31) : x;
return (__rlwinm(x,32-y,0,31));
}
template<> inline word32 rotlVariable<word32>(word32 x, unsigned int y)