implement syncInstructionCache for ARM

Like, PowerPC, ARM has an instruction cache which must be manually
flushed if/when we compile a new method.  This commit updates
syncInstructionCache to use GCC's builtin __clear_cache routine.
This commit is contained in:
Joel Dice 2011-01-31 15:39:59 -07:00
parent 220f7760b7
commit 9ed1ffff35

View File

@ -55,9 +55,11 @@ loadMemoryBarrier()
}
inline void
syncInstructionCache(const void* start UNUSED, unsigned size UNUSED)
syncInstructionCache(const void* start, unsigned size)
{
asm("nop");
__clear_cache
(const_cast<void*>(start),
const_cast<uint8_t*>(static_cast<const uint8_t*>(start) + size));
}
typedef int (__kernel_cmpxchg_t)(int oldval, int newval, int *ptr);