add CHD support.
[pcsx_rearmed.git] / deps / lzma-16.04 / C / RotateDefs.h
CommitLineData
ce188d4d 1/* RotateDefs.h -- Rotate functions\r
22015-03-25 : Igor Pavlov : Public domain */\r
3\r
4#ifndef __ROTATE_DEFS_H\r
5#define __ROTATE_DEFS_H\r
6\r
7#ifdef _MSC_VER\r
8\r
9#include <stdlib.h>\r
10\r
11/* don't use _rotl with MINGW. It can insert slow call to function. */\r
12 \r
13/* #if (_MSC_VER >= 1200) */\r
14#pragma intrinsic(_rotl)\r
15#pragma intrinsic(_rotr)\r
16/* #endif */\r
17\r
18#define rotlFixed(x, n) _rotl((x), (n))\r
19#define rotrFixed(x, n) _rotr((x), (n))\r
20\r
21#else\r
22\r
23/* new compilers can translate these macros to fast commands. */\r
24\r
25#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))\r
26#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))\r
27\r
28#endif\r
29\r
30#endif\r