mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
ARM64: Prevent STP fusion for conditional code emitted by TBAR.
Thanks to Peter Cawley. #1057
This commit is contained in:
parent
0fa2f1cbcf
commit
7cc53f0b85
@ -1289,8 +1289,9 @@ static void asm_tbar(ASMState *as, IRIns *ir)
|
|||||||
Reg link = ra_scratch(as, rset_exclude(RSET_GPR, tab));
|
Reg link = ra_scratch(as, rset_exclude(RSET_GPR, tab));
|
||||||
Reg mark = RID_TMP;
|
Reg mark = RID_TMP;
|
||||||
MCLabel l_end = emit_label(as);
|
MCLabel l_end = emit_label(as);
|
||||||
emit_lso(as, A64I_STRx, link, tab, (int32_t)offsetof(GCtab, gclist));
|
|
||||||
emit_lso(as, A64I_STRB, mark, tab, (int32_t)offsetof(GCtab, marked));
|
emit_lso(as, A64I_STRB, mark, tab, (int32_t)offsetof(GCtab, marked));
|
||||||
|
/* Keep STRx in the middle to avoid LDP/STP fusion with surrounding code. */
|
||||||
|
emit_lso(as, A64I_STRx, link, tab, (int32_t)offsetof(GCtab, gclist));
|
||||||
emit_setgl(as, tab, gc.grayagain);
|
emit_setgl(as, tab, gc.grayagain);
|
||||||
emit_dn(as, A64I_ANDw^emit_isk13(~LJ_GC_BLACK, 0), mark, mark);
|
emit_dn(as, A64I_ANDw^emit_isk13(~LJ_GC_BLACK, 0), mark, mark);
|
||||||
emit_getgl(as, link, gc.grayagain);
|
emit_getgl(as, link, gc.grayagain);
|
||||||
|
Loading…
Reference in New Issue
Block a user