aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_def.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_def.h b/src/lj_def.h
index 83eb67bc..250729f7 100644
--- a/src/lj_def.h
+++ b/src/lj_def.h
@@ -101,8 +101,8 @@ typedef unsigned int uintptr_t;
101#define checkptr32(x) ((uintptr_t)(x) == (uint32_t)(uintptr_t)(x)) 101#define checkptr32(x) ((uintptr_t)(x) == (uint32_t)(uintptr_t)(x))
102 102
103/* Every half-decent C compiler transforms this into a rotate instruction. */ 103/* Every half-decent C compiler transforms this into a rotate instruction. */
104#define lj_rol(x, n) (((x)<<(n)) | ((x)>>(8*sizeof(x)-(n)))) 104#define lj_rol(x, n) (((x)<<(n)) | ((x)>>(-(int)(n)&(8*sizeof(x)-1))))
105#define lj_ror(x, n) (((x)<<(8*sizeof(x)-(n))) | ((x)>>(n))) 105#define lj_ror(x, n) (((x)<<(-(int)(n)&(8*sizeof(x)-1))) | ((x)>>(n)))
106 106
107/* A really naive Bloom filter. But sufficient for our needs. */ 107/* A really naive Bloom filter. But sufficient for our needs. */
108typedef uintptr_t BloomFilter; 108typedef uintptr_t BloomFilter;