|
@@ -2502,7 +2502,7 @@ static void asm_head_root_base(ASMState *as)
|
|
}
|
|
}
|
|
|
|
|
|
/* Coalesce or reload BASE register for a side trace. */
|
|
/* Coalesce or reload BASE register for a side trace. */
|
|
-static RegSet asm_head_side_base(ASMState *as, IRIns *irp, RegSet allow)
|
|
|
|
|
|
+static Reg asm_head_side_base(ASMState *as, IRIns *irp)
|
|
{
|
|
{
|
|
IRIns *ir = IR(REF_BASE);
|
|
IRIns *ir = IR(REF_BASE);
|
|
Reg r = ir->r;
|
|
Reg r = ir->r;
|
|
@@ -2511,15 +2511,15 @@ static RegSet asm_head_side_base(ASMState *as, IRIns *irp, RegSet allow)
|
|
if (rset_test(as->modset, r) || irt_ismarked(ir->t))
|
|
if (rset_test(as->modset, r) || irt_ismarked(ir->t))
|
|
ir->r = RID_INIT; /* No inheritance for modified BASE register. */
|
|
ir->r = RID_INIT; /* No inheritance for modified BASE register. */
|
|
if (irp->r == r) {
|
|
if (irp->r == r) {
|
|
- rset_clear(allow, r); /* Mark same BASE register as coalesced. */
|
|
|
|
|
|
+ return r; /* Same BASE register already coalesced. */
|
|
} else if (ra_hasreg(irp->r) && rset_test(as->freeset, irp->r)) {
|
|
} else if (ra_hasreg(irp->r) && rset_test(as->freeset, irp->r)) {
|
|
- rset_clear(allow, irp->r);
|
|
|
|
emit_rr(as, XO_MOV, r, irp->r); /* Move from coalesced parent reg. */
|
|
emit_rr(as, XO_MOV, r, irp->r); /* Move from coalesced parent reg. */
|
|
|
|
+ return irp->r;
|
|
} else {
|
|
} else {
|
|
emit_getgl(as, r, jit_base); /* Otherwise reload BASE. */
|
|
emit_getgl(as, r, jit_base); /* Otherwise reload BASE. */
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return allow;
|
|
|
|
|
|
+ return RID_NONE;
|
|
}
|
|
}
|
|
|
|
|
|
/* -- Tail of trace ------------------------------------------------------- */
|
|
/* -- Tail of trace ------------------------------------------------------- */
|