diff options
author | Mike Pall <mike> | 2011-10-24 16:16:14 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-10-24 16:16:14 +0200 |
commit | 8fc9bc172413630d1b7a769deb1ef7e45ffa9b0e (patch) | |
tree | ec60a8a4b79e9d7dab2218023f615e9ea1504da8 /src | |
parent | 32098921fda08aad6d67efff20d2e1b31b92fa63 (diff) | |
download | luajit-8fc9bc172413630d1b7a769deb1ef7e45ffa9b0e.tar.gz luajit-8fc9bc172413630d1b7a769deb1ef7e45ffa9b0e.tar.bz2 luajit-8fc9bc172413630d1b7a769deb1ef7e45ffa9b0e.zip |
Make sure to flush/sync the D/I-cache for all generated code.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_asm.c | 6 |
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 |