summaryrefslogtreecommitdiff
path: root/utils/lzma/C/RotateDefs.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/lzma/C/RotateDefs.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/lzma/C/RotateDefs.h')
-rw-r--r--utils/lzma/C/RotateDefs.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/utils/lzma/C/RotateDefs.h b/utils/lzma/C/RotateDefs.h
new file mode 100644
index 0000000..1b83e5e
--- /dev/null
+++ b/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