lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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
}