Re: [ANN] luaffi (ffi library ala luajit's for the standard lua vm)
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [ANN] luaffi (ffi library ala luajit's for the standard lua vm)
- From: Dimiter 'malkia' Stanev <malkia@...>
- Date: 2011年7月25日 11:10:38 -0700
Great work, James!
I've also added arm support (for CE only atm). Does anyone know a
portable way of flushing the instruction cache for posix systems? (ie
posix equiv of FlushInstructionCache
http://msdn.microsoft.com/en-us/library/ms679350(v=vs.85).aspx)
This is from luajit's code:
lj_asm.c
/* Flush instruction cache. */
static void asm_cache_flush(MCode *start, MCode *end)
{
VG_INVALIDATE(start, (char *)end-(char *)start);
#if LJ_TARGET_X86ORX64
UNUSED(start); UNUSED(end);
#elif LJ_TARGET_OSX
sys_icache_invalidate(start, end-start);
#elif defined(__GNUC__)
__clear_cache(start, end);
#else
#error "Missing builtin to flush instruction cache"
#endif
}