This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static inline U32 ppcmask(U32 mb, U32 me) | |
{ | |
U32 maskmb = ~0u >> mb; | |
U32 maskme = ~0u << (31 - me); | |
return (mb <= me) ? maskmb & maskme : maskmb | maskme; | |
} | |
static inline U32 rotl32(U32 x, U32 amount) | |
{ | |
return (x << amount) | (x >> ((32 - amount) & 31)); |