mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
MIPS: Fix trace linking.
This commit is contained in:
parent
8ff09d9f5a
commit
f2d333c1ac
@ -2550,7 +2550,9 @@ void lj_asm_trace(jit_State *J, GCtrace *T)
|
||||
/* Set trace entry point before fixing up tail to allow link to self. */
|
||||
T->mcode = as->mcp;
|
||||
T->mcloop = as->mcloop ? (MSize)((char *)as->mcloop - (char *)as->mcp) : 0;
|
||||
if (!as->loopref)
|
||||
if (as->loopref)
|
||||
asm_loop_tail_fixup(as);
|
||||
else
|
||||
asm_tail_fixup(as, T->link); /* Note: this may change as->mctop! */
|
||||
T->szmcode = (MSize)((char *)as->mctop - (char *)as->mcp);
|
||||
asm_snap_fixup_mcofs(as);
|
||||
|
@ -2129,6 +2129,12 @@ static void asm_loop_fixup(ASMState *as)
|
||||
}
|
||||
}
|
||||
|
||||
/* Fixup the tail of the loop. */
|
||||
static void asm_loop_tail_fixup(ASMState *as)
|
||||
{
|
||||
UNUSED(as); /* Nothing to do. */
|
||||
}
|
||||
|
||||
/* -- Head of trace ------------------------------------------------------- */
|
||||
|
||||
/* Reload L register from g->cur_L. */
|
||||
|
@ -1858,6 +1858,12 @@ static void asm_loop_fixup(ASMState *as)
|
||||
}
|
||||
}
|
||||
|
||||
/* Fixup the tail of the loop. */
|
||||
static void asm_loop_tail_fixup(ASMState *as)
|
||||
{
|
||||
UNUSED(as); /* Nothing to do. */
|
||||
}
|
||||
|
||||
/* -- Head of trace ------------------------------------------------------- */
|
||||
|
||||
/* Reload L register from g->cur_L. */
|
||||
|
@ -2640,6 +2640,12 @@ static void asm_loop_fixup(ASMState *as)
|
||||
}
|
||||
}
|
||||
|
||||
/* Fixup the tail of the loop. */
|
||||
static void asm_loop_tail_fixup(ASMState *as)
|
||||
{
|
||||
if (as->loopinv) as->mctop--;
|
||||
}
|
||||
|
||||
/* -- Head of trace ------------------------------------------------------- */
|
||||
|
||||
/* Coalesce BASE register for a root trace. */
|
||||
@ -2647,7 +2653,6 @@ static void asm_head_root_base(ASMState *as)
|
||||
{
|
||||
IRIns *ir = IR(REF_BASE);
|
||||
Reg r = ir->r;
|
||||
if (as->loopinv) as->mctop--;
|
||||
if (ra_hasreg(r)) {
|
||||
ra_free(as, r);
|
||||
if (rset_test(as->modset, r) || irt_ismarked(ir->t))
|
||||
@ -2662,7 +2667,6 @@ static RegSet asm_head_side_base(ASMState *as, IRIns *irp, RegSet allow)
|
||||
{
|
||||
IRIns *ir = IR(REF_BASE);
|
||||
Reg r = ir->r;
|
||||
if (as->loopinv) as->mctop--;
|
||||
if (ra_hasreg(r)) {
|
||||
ra_free(as, r);
|
||||
if (rset_test(as->modset, r) || irt_ismarked(ir->t))
|
||||
|
@ -2157,6 +2157,12 @@ static void asm_loop_fixup(ASMState *as)
|
||||
}
|
||||
}
|
||||
|
||||
/* Fixup the tail of the loop. */
|
||||
static void asm_loop_tail_fixup(ASMState *as)
|
||||
{
|
||||
UNUSED(as); /* Nothing to do. */
|
||||
}
|
||||
|
||||
/* -- Head of trace ------------------------------------------------------- */
|
||||
|
||||
/* Coalesce BASE register for a root trace. */
|
||||
|
@ -2863,6 +2863,12 @@ static void asm_loop_fixup(ASMState *as)
|
||||
}
|
||||
}
|
||||
|
||||
/* Fixup the tail of the loop. */
|
||||
static void asm_loop_tail_fixup(ASMState *as)
|
||||
{
|
||||
UNUSED(as); /* Nothing to do. */
|
||||
}
|
||||
|
||||
/* -- Head of trace ------------------------------------------------------- */
|
||||
|
||||
/* Coalesce BASE register for a root trace. */
|
||||
|
Loading…
Reference in New Issue
Block a user