mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Merge branch 'master' into v2.1
This commit is contained in:
commit
48912a2dea
@ -206,6 +206,7 @@ static void *mcode_alloc(jit_State *J, size_t sz)
|
||||
{
|
||||
/* Target an address in the static assembler code (64K aligned).
|
||||
** Try addresses within a distance of target-range/2+1MB..target+range/2-1MB.
|
||||
** Use half the jump range so every address in the range can reach any other.
|
||||
*/
|
||||
#if LJ_TARGET_MIPS
|
||||
/* Use the middle of the 256MB-aligned region. */
|
||||
@ -214,7 +215,7 @@ static void *mcode_alloc(jit_State *J, size_t sz)
|
||||
#else
|
||||
uintptr_t target = (uintptr_t)(void *)lj_vm_exit_handler & ~(uintptr_t)0xffff;
|
||||
#endif
|
||||
const uintptr_t range = (1u << LJ_TARGET_JUMPRANGE) - (1u << 21);
|
||||
const uintptr_t range = (1u << (LJ_TARGET_JUMPRANGE-1)) - (1u << 21);
|
||||
/* First try a contiguous area below the last one. */
|
||||
uintptr_t hint = J->mcarea ? (uintptr_t)J->mcarea - sz : 0;
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user