Move helper for syncing data/instruction cache to lj_mcode.c.

Sync caches after dynamic code generation for FFI callbacks.
This commit is contained in:
Mike Pall
2011-12-12 22:49:19 +01:00
parent 2d8f3d75df
commit 10474987bd
8 changed files with 69 additions and 56 deletions

View File

@@ -6,9 +6,16 @@
#ifndef _LJ_MCODE_H
#define _LJ_MCODE_H
#include "lj_jit.h"
#include "lj_obj.h"
#if LJ_HASJIT || LJ_HASFFI
LJ_FUNC void lj_mcode_sync(void *start, void *end);
#endif
#if LJ_HASJIT
#include "lj_jit.h"
LJ_FUNC void lj_mcode_free(jit_State *J);
LJ_FUNC MCode *lj_mcode_reserve(jit_State *J, MCode **lim);
LJ_FUNC void lj_mcode_commit(jit_State *J, MCode *m);