mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
ARM, MIPS, PPC: Rematerialize FPR invariants first.
This commit is contained in:
parent
2ac083cb5a
commit
1481263aaa
13
src/lj_asm.c
13
src/lj_asm.c
@ -451,7 +451,7 @@ static void ra_evictset(ASMState *as, RegSet drop)
|
|||||||
checkmclim(as);
|
checkmclim(as);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
work = (drop & ~as->freeset) & RSET_GPR;
|
work = (drop & ~as->freeset);
|
||||||
while (work) {
|
while (work) {
|
||||||
Reg r = rset_pickbot(work);
|
Reg r = rset_pickbot(work);
|
||||||
ra_restore(as, regcost_ref(as->cost[r]));
|
ra_restore(as, regcost_ref(as->cost[r]));
|
||||||
@ -644,7 +644,7 @@ static void ra_destreg(ASMState *as, IRIns *ir, Reg r)
|
|||||||
{
|
{
|
||||||
Reg dest = ra_dest(as, ir, RID2RSET(r));
|
Reg dest = ra_dest(as, ir, RID2RSET(r));
|
||||||
if (dest != r) {
|
if (dest != r) {
|
||||||
ra_scratch(as, RID2RSET(r));
|
ra_modified(as, r);
|
||||||
emit_movrr(as, ir, dest, r);
|
emit_movrr(as, ir, dest, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1110,6 +1110,15 @@ static void asm_phi_shuffle(ASMState *as)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Restore/remat invariants whose registers are modified inside the loop. */
|
/* Restore/remat invariants whose registers are modified inside the loop. */
|
||||||
|
#if !LJ_SOFTFP
|
||||||
|
work = as->modset & ~(as->freeset | as->phiset) & RSET_FPR;
|
||||||
|
while (work) {
|
||||||
|
Reg r = rset_pickbot(work);
|
||||||
|
ra_restore(as, regcost_ref(as->cost[r]));
|
||||||
|
rset_clear(work, r);
|
||||||
|
checkmclim(as);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
work = as->modset & ~(as->freeset | as->phiset);
|
work = as->modset & ~(as->freeset | as->phiset);
|
||||||
while (work) {
|
while (work) {
|
||||||
Reg r = rset_pickbot(work);
|
Reg r = rset_pickbot(work);
|
||||||
|
Loading…
Reference in New Issue
Block a user