diff options
author | Mike Pall <mike> | 2010-03-07 14:33:52 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-03-07 14:33:52 +0100 |
commit | e40b001a792d7ecce8ff5b7a060ae2bc01bed8b2 (patch) | |
tree | bfbc31d6c2f161d7e8482c6f9368ccf6416ce6f3 /src | |
parent | e38fbb3d0a6125440a8100d7f660903e78bc1154 (diff) | |
download | luajit-e40b001a792d7ecce8ff5b7a060ae2bc01bed8b2.tar.gz luajit-e40b001a792d7ecce8ff5b7a060ae2bc01bed8b2.tar.bz2 luajit-e40b001a792d7ecce8ff5b7a060ae2bc01bed8b2.zip |
Improve placement of dynamically generated code on x64.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_mcode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_mcode.c b/src/lj_mcode.c index be3ea1c0..75e0c696 100644 --- a/src/lj_mcode.c +++ b/src/lj_mcode.c | |||
@@ -128,7 +128,7 @@ static void *mcode_alloc(jit_State *J, size_t sz, int prot) | |||
128 | uintptr_t hint; | 128 | uintptr_t hint; |
129 | void *p; | 129 | void *p; |
130 | do { | 130 | do { |
131 | hint = LJ_PRNG_BITS(J, 15) << 16; /* 64K aligned. */ | 131 | hint = (0x78fb ^ LJ_PRNG_BITS(J, 15)) << 16; /* 64K aligned. */ |
132 | } while (!(hint + sz < range && | 132 | } while (!(hint + sz < range && |
133 | target + hint - (range>>1) < (uintptr_t)1<<47)); | 133 | target + hint - (range>>1) < (uintptr_t)1<<47)); |
134 | p = mcode_alloc_at(J, target + hint - (range>>1), sz, prot); | 134 | p = mcode_alloc_at(J, target + hint - (range>>1), sz, prot); |