X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FUnix%2FMemory.inc;h=e9b26bdb80f2e36f3c5e5c2e03b2e296321119ab;hb=d5e1be03eda2e8036f136fdf12a5f5d9e1e684d8;hp=e00394ec6aa34a9dffe5ded4e4ed6c9c685a6dea;hpb=033ee0f111b572ad4f167676e3c4bb4b71fe2da8;p=oota-llvm.git diff --git a/lib/Support/Unix/Memory.inc b/lib/Support/Unix/Memory.inc index e00394ec6aa..e9b26bdb80f 100644 --- a/lib/Support/Unix/Memory.inc +++ b/lib/Support/Unix/Memory.inc @@ -332,7 +332,16 @@ void Memory::InvalidateInstructionCache(const void *Addr, __clear_cache(const_cast(Start), const_cast(End)); # elif defined(__mips__) const char *Start = static_cast(Addr); +# if defined(ANDROID) + // The declaration of "cacheflush" in Android bionic: + // extern int cacheflush(long start, long end, long flags); + const char *End = Start + Len; + long LStart = reinterpret_cast(const_cast(Start)); + long LEnd = reinterpret_cast(const_cast(End)); + cacheflush(LStart, LEnd, BCACHE); +# else cacheflush(const_cast(Start), Len, BCACHE); +# endif # endif #endif // end apple