Fix some portability issues with the JIT compiler.

This commit is contained in:
Mike Pall
2011-05-09 18:16:39 +02:00
parent 28e87d33e9
commit 67d3ac9b19
6 changed files with 38 additions and 17 deletions

View File

@@ -368,12 +368,16 @@ LJLIB_CF(jit_util_tracemc)
/* local addr = jit.util.traceexitstub(idx) */
LJLIB_CF(jit_util_traceexitstub)
{
#ifdef EXITSTUBS_PER_GROUP
ExitNo exitno = (ExitNo)lj_lib_checkint(L, 1);
jit_State *J = L2J(L);
if (exitno < EXITSTUBS_PER_GROUP*LJ_MAX_EXITSTUBGR) {
setintptrV(L->top-1, (intptr_t)(void *)exitstub_addr(J, exitno));
return 1;
}
#else
UNUSED(L);
#endif
return 0;
}