mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix IR_RENAME snapshot number. Follow-up fix for a32aeadc
.
Reported by Victor Bombi, analyzed by XmiliaH. Thanks!
This commit is contained in:
parent
5374a0a3cf
commit
de77205490
@ -697,7 +697,14 @@ static void ra_rename(ASMState *as, Reg down, Reg up)
|
|||||||
RA_DBGX((as, "rename $f $r $r", regcost_ref(as->cost[up]), down, up));
|
RA_DBGX((as, "rename $f $r $r", regcost_ref(as->cost[up]), down, up));
|
||||||
emit_movrr(as, ir, down, up); /* Backwards codegen needs inverse move. */
|
emit_movrr(as, ir, down, up); /* Backwards codegen needs inverse move. */
|
||||||
if (!ra_hasspill(IR(ref)->s)) { /* Add the rename to the IR. */
|
if (!ra_hasspill(IR(ref)->s)) { /* Add the rename to the IR. */
|
||||||
ra_addrename(as, down, ref, as->snapno);
|
/*
|
||||||
|
** The rename is effective at the subsequent (already emitted) exit
|
||||||
|
** branch. This is for the current snapshot (as->snapno). Except if we
|
||||||
|
** haven't yet allocated any refs for the snapshot (as->snapalloc == 1),
|
||||||
|
** then it belongs to the next snapshot.
|
||||||
|
** See also the discussion at asm_snap_checkrename().
|
||||||
|
*/
|
||||||
|
ra_addrename(as, down, ref, as->snapno + as->snapalloc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user