summaryrefslogtreecommitdiff
path: root/src/lj_def.h
diff options
context:
space:
mode:
authorMike Pall <mike>2010-01-18 01:32:33 +0100
committerMike Pall <mike>2010-01-18 01:32:33 +0100
commit4e39597ba63bb0ad2065c92b7508ac17ae53f297 (patch)
treefa4448ecf27cd78892ad38b2f5a23986c93d6271 /src/lj_def.h
parent32969abe404b99c05c745695c1e6d6bab3565cd5 (diff)
downloadluajit-4e39597ba63bb0ad2065c92b7508ac17ae53f297.tar.gz
luajit-4e39597ba63bb0ad2065c92b7508ac17ae53f297.tar.bz2
luajit-4e39597ba63bb0ad2065c92b7508ac17ae53f297.zip
Add some sanity checks for allocator in 64 bit mode.
Diffstat (limited to 'src/lj_def.h')
-rw-r--r--src/lj_def.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lj_def.h b/src/lj_def.h
index 8128aa21..872a7830 100644
--- a/src/lj_def.h
+++ b/src/lj_def.h
@@ -89,6 +89,7 @@ typedef unsigned __int32 uintptr_t;
89#define checku8(x) ((x) == (int32_t)(uint8_t)(x)) 89#define checku8(x) ((x) == (int32_t)(uint8_t)(x))
90#define checki16(x) ((x) == (int32_t)(int16_t)(x)) 90#define checki16(x) ((x) == (int32_t)(int16_t)(x))
91#define checku16(x) ((x) == (int32_t)(uint16_t)(x)) 91#define checku16(x) ((x) == (int32_t)(uint16_t)(x))
92#define checkptr32(x) ((uintptr_t)(x) == (uint32_t)(uintptr_t)(x))
92 93
93/* Every half-decent C compiler transforms this into a rotate instruction. */ 94/* Every half-decent C compiler transforms this into a rotate instruction. */
94#define lj_rol(x, n) (((x)<<(n)) | ((x)>>(32-(n)))) 95#define lj_rol(x, n) (((x)<<(n)) | ((x)>>(32-(n))))