mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 23:44:08 +00:00
Fix BE architectures
This commit is contained in:
parent
f15d8b7b2f
commit
62be260ec3
@ -104,7 +104,7 @@ static void recff_stitch(jit_State *J)
|
||||
TValue *base = L->base;
|
||||
const BCIns *pc = frame_pc(base-1);
|
||||
TValue *pframe = frame_prevl(base-1);
|
||||
TRef trcont;
|
||||
TRef trcont, selfrefptr;
|
||||
|
||||
lua_assert(!LJ_FR2); /* TODO_FR2: handle frame shift. */
|
||||
/* Move func + args up in Lua stack and insert continuation. */
|
||||
@ -118,14 +118,16 @@ static void recff_stitch(jit_State *J)
|
||||
|
||||
/* Ditto for the IR. */
|
||||
memmove(&J->base[1], &J->base[-1], sizeof(TRef)*(J->maxslot+1));
|
||||
J->selfref = lj_ir_k64_reserve(J);
|
||||
#if LJ_64
|
||||
trcont = lj_ir_kptr(J, (void *)((int64_t)cont-(int64_t)lj_vm_asm_begin));
|
||||
selfrefptr = lj_ir_kptr(J, J->selfref);
|
||||
#else
|
||||
trcont = lj_ir_kptr(J, (void *)cont);
|
||||
selfrefptr = lj_ir_kptr(J, &J->selfref->gcr);
|
||||
#endif
|
||||
J->selfref = lj_ir_k64_reserve(J);
|
||||
J->base[0] = trcont | TREF_CONT;
|
||||
J->base[-1] = emitir(IRT(IR_XLOAD, IRT_P64), lj_ir_kptr(J, J->selfref), 0);
|
||||
J->base[-1] = emitir(IRT(IR_XLOAD, IRT_P64), selfrefptr, 0);
|
||||
J->base += 2;
|
||||
J->baseslot += 2;
|
||||
J->framedepth++;
|
||||
|
Loading…
Reference in New Issue
Block a user