1 /* RotateDefs.h -- Rotate functions
2 2015-03-25 : Igor Pavlov : Public domain */
4 #ifndef __ROTATE_DEFS_H
5 #define __ROTATE_DEFS_H
11 /* don't use _rotl with MINGW. It can insert slow call to function. */
13 /* #if (_MSC_VER >= 1200) */
14 #pragma intrinsic(_rotl)
15 #pragma intrinsic(_rotr)
18 #define rotlFixed(x, n) _rotl((x), (n))
19 #define rotrFixed(x, n) _rotr((x), (n))
23 /* new compilers can translate these macros to fast commands. */
25 #define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
26 #define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))