1 /* RotateDefs.h -- Rotate functions
2 2013-11-12 : Igor Pavlov : Public domain */
3 
4 #ifndef __ROTATE_DEFS_H
5 #define __ROTATE_DEFS_H
6 
7 #ifdef _MSC_VER
8 
9 #include <stdlib.h>
10 
11 // #if (_MSC_VER >= 1200)
12 #pragma intrinsic(_rotl)
13 #pragma intrinsic(_rotr)
14 // #endif
15 
16 #define rotlFixed(x, n) _rotl((x), (n))
17 #define rotrFixed(x, n) _rotr((x), (n))
18 
19 #else
20 
21 #define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
22 #define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
23 
24 #endif
25 
26 #endif
27