aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_asm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index bb134ac2..ff64402c 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -1652,6 +1652,7 @@ void lj_asm_trace(jit_State *J, GCtrace *T)
1652{ 1652{
1653 ASMState as_; 1653 ASMState as_;
1654 ASMState *as = &as_; 1654 ASMState *as = &as_;
1655 MCode *origtop;
1655 1656
1656 /* Ensure an initialized instruction beyond the last one for HIOP checks. */ 1657 /* Ensure an initialized instruction beyond the last one for HIOP checks. */
1657 J->cur.nins = lj_ir_nextins(J); 1658 J->cur.nins = lj_ir_nextins(J);
@@ -1674,7 +1675,8 @@ void lj_asm_trace(jit_State *J, GCtrace *T)
1674 } else { 1675 } else {
1675 as->parent = NULL; 1676 as->parent = NULL;
1676 } 1677 }
1677 as->mctop = lj_mcode_reserve(J, &as->mcbot); /* Reserve MCode memory. */ 1678 /* Reserve MCode memory. */
1679 as->mctop = origtop = lj_mcode_reserve(J, &as->mcbot);
1678 as->mcp = as->mctop; 1680 as->mcp = as->mctop;
1679 as->mclim = as->mcbot + MCLIM_REDZONE; 1681 as->mclim = as->mcbot + MCLIM_REDZONE;
1680 asm_setup_target(as); 1682 asm_setup_target(as);
@@ -1737,7 +1739,7 @@ void lj_asm_trace(jit_State *J, GCtrace *T)
1737 if (!as->loopref) 1739 if (!as->loopref)
1738 asm_tail_fixup(as, T->link); /* Note: this may change as->mctop! */ 1740 asm_tail_fixup(as, T->link); /* Note: this may change as->mctop! */
1739 T->szmcode = (MSize)((char *)as->mctop - (char *)as->mcp); 1741 T->szmcode = (MSize)((char *)as->mctop - (char *)as->mcp);
1740 asm_cache_flush(T->mcode, as->mctop); 1742 asm_cache_flush(T->mcode, origtop);
1741} 1743}
1742 1744
1743#undef IR 1745#undef IR