From 3e286c1e72651f91a2f4ca5b1fa2f366ac4cd0fa Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 28 Feb 2013 17:51:16 +0100 Subject: [PATCH 1/2] ARM: Fix cache flush/sync for exit stubs of JIT-compiled code. --- src/lj_asm_arm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h index afb1054e..196f797e 100644 --- a/src/lj_asm_arm.h +++ b/src/lj_asm_arm.h @@ -91,6 +91,7 @@ static MCode *asm_exitstub_gen(ASMState *as, ExitNo group) *mxp++ = group*EXITSTUBS_PER_GROUP; for (i = 0; i < EXITSTUBS_PER_GROUP; i++) *mxp++ = ARMI_B|((-6-i)&0x00ffffffu); + lj_mcode_sync(as->mcbot, mxp); lj_mcode_commitbot(as->J, mxp); as->mcbot = mxp; as->mclim = as->mcbot + MCLIM_REDZONE; From 78c97bc5a1529b0e21d417011ddb956c08a4643e Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 28 Feb 2013 17:52:31 +0100 Subject: [PATCH 2/2] MIPS: Fix cache flush/sync for JIT-compiled code jump area. --- src/lj_asm_mips.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h index cd283b88..e80f7582 100644 --- a/src/lj_asm_mips.h +++ b/src/lj_asm_mips.h @@ -71,6 +71,7 @@ static void asm_sparejump_setup(ASMState *as) memset(mxp+2, 0, MIPS_SPAREJUMP*8); mxp += MIPS_SPAREJUMP*2; lua_assert(mxp < as->mctop); + lj_mcode_sync(as->mcbot, mxp); lj_mcode_commitbot(as->J, mxp); as->mcbot = mxp; as->mclim = as->mcbot + MCLIM_REDZONE;