7 #include <sys/syscall.h> 11 #include <asm/cachectl.h> 12 #endif // #ifdef __mips 14 #if V8_TARGET_ARCH_MIPS64 16 #include "src/assembler.h" 17 #include "src/macro-assembler.h" 19 #include "src/simulator.h" 25 void CpuFeatures::FlushICache(
void* start,
size_t size) {
26 #if !defined(USE_SIMULATOR) 32 #if defined(ANDROID) && !defined(__LP64__) 34 char *end =
reinterpret_cast<char *
>(start) + size;
36 reinterpret_cast<intptr_t>(start), reinterpret_cast<intptr_t>(end), 0);
40 res = syscall(__NR_cacheflush, start, size, ICACHE);
41 if (res) FATAL(
"Failed to flush the instruction cache");
43 #endif // !USE_SIMULATOR. 49 #endif // V8_TARGET_ARCH_MIPS64