diff options
author | Mike Pall <mike> | 2023-08-28 22:39:35 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2023-08-28 22:39:35 +0200 |
commit | 7cc53f0b85f834dfba1516ea79d59db463e856fa (patch) | |
tree | ccce498214d8a4591d075254f658804beb3985f8 /src | |
parent | 0fa2f1cbcf023ad0549f1428809e506fa2c78552 (diff) | |
download | luajit-7cc53f0b85f834dfba1516ea79d59db463e856fa.tar.gz luajit-7cc53f0b85f834dfba1516ea79d59db463e856fa.tar.bz2 luajit-7cc53f0b85f834dfba1516ea79d59db463e856fa.zip |
ARM64: Prevent STP fusion for conditional code emitted by TBAR.
Thanks to Peter Cawley. #1057
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_asm_arm64.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h index 34960d7c..1d5cca4f 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h | |||
@@ -1289,8 +1289,9 @@ static void asm_tbar(ASMState *as, IRIns *ir) | |||
1289 | Reg link = ra_scratch(as, rset_exclude(RSET_GPR, tab)); | 1289 | Reg link = ra_scratch(as, rset_exclude(RSET_GPR, tab)); |
1290 | Reg mark = RID_TMP; | 1290 | Reg mark = RID_TMP; |
1291 | MCLabel l_end = emit_label(as); | 1291 | MCLabel l_end = emit_label(as); |
1292 | emit_lso(as, A64I_STRx, link, tab, (int32_t)offsetof(GCtab, gclist)); | ||
1293 | emit_lso(as, A64I_STRB, mark, tab, (int32_t)offsetof(GCtab, marked)); | 1292 | emit_lso(as, A64I_STRB, mark, tab, (int32_t)offsetof(GCtab, marked)); |
1293 | /* Keep STRx in the middle to avoid LDP/STP fusion with surrounding code. */ | ||
1294 | emit_lso(as, A64I_STRx, link, tab, (int32_t)offsetof(GCtab, gclist)); | ||
1294 | emit_setgl(as, tab, gc.grayagain); | 1295 | emit_setgl(as, tab, gc.grayagain); |
1295 | emit_dn(as, A64I_ANDw^emit_isk13(~LJ_GC_BLACK, 0), mark, mark); | 1296 | emit_dn(as, A64I_ANDw^emit_isk13(~LJ_GC_BLACK, 0), mark, mark); |
1296 | emit_getgl(as, link, gc.grayagain); | 1297 | emit_getgl(as, link, gc.grayagain); |