diff options
| author | John Schoenick <[email protected]> | 2015-09-09 18:35:41 -0700 |
|---|---|---|
| committer | John Schoenick <[email protected]> | 2015-09-09 18:35:41 -0700 |
| commit | 0d8dceea4310fde5706b3ce1c70609d72a38efdf (patch) | |
| tree | c831ef32c2c801a5c5a80401736b52c7b5a528ec /mp/src/utils/lzma/C/RotateDefs.h | |
| parent | Updated the SDK with the latest code from the TF and HL2 branches. (diff) | |
| download | source-sdk-2013-master.tar.xz source-sdk-2013-master.zip | |
Diffstat (limited to 'mp/src/utils/lzma/C/RotateDefs.h')
| -rw-r--r-- | mp/src/utils/lzma/C/RotateDefs.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mp/src/utils/lzma/C/RotateDefs.h b/mp/src/utils/lzma/C/RotateDefs.h new file mode 100644 index 00000000..1b83e5ea --- /dev/null +++ b/mp/src/utils/lzma/C/RotateDefs.h @@ -0,0 +1,26 @@ +/* RotateDefs.h -- Rotate functions +2013-11-12 : Igor Pavlov : Public domain */ + +#ifndef __ROTATE_DEFS_H +#define __ROTATE_DEFS_H + +#ifdef _MSC_VER + +#include <stdlib.h> + +// #if (_MSC_VER >= 1200) +#pragma intrinsic(_rotl) +#pragma intrinsic(_rotr) +// #endif + +#define rotlFixed(x, n) _rotl((x), (n)) +#define rotrFixed(x, n) _rotr((x), (n)) + +#else + +#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) +#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) + +#endif + +#endif |