diff options
author | keunyoung <keunyoung@google.com> | 2013-03-07 12:50:38 -0800 |
---|---|---|
committer | The Android Automerger <android-build@android.com> | 2013-03-08 11:29:44 -0800 |
commit | c1884ed17f3386e5f1f8a2d1939e46b77e7a6d1a (patch) | |
tree | 7772572122ffc8776ef7a85b2df0fb3c643c0fce | |
parent | d2ba544d44789c76cad3c03b3289ae9e3cfe3f8e (diff) | |
download | external_llvm-c1884ed17f3386e5f1f8a2d1939e46b77e7a6d1a.zip external_llvm-c1884ed17f3386e5f1f8a2d1939e46b77e7a6d1a.tar.gz external_llvm-c1884ed17f3386e5f1f8a2d1939e46b77e7a6d1a.tar.bz2 |
Android uses cacheflush(long, long, long) for MIPS.
Change-Id: Ia2902dd3521ff310e2261c8f627c95b3e7c9fdad
-rw-r--r-- | lib/Support/Unix/Memory.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Support/Unix/Memory.inc b/lib/Support/Unix/Memory.inc index e00394e..2686ba6 100644 --- a/lib/Support/Unix/Memory.inc +++ b/lib/Support/Unix/Memory.inc @@ -331,8 +331,13 @@ void Memory::InvalidateInstructionCache(const void *Addr, const char *End = Start + Len; __clear_cache(const_cast<char *>(Start), const_cast<char *>(End)); # elif defined(__mips__) +# if defined(ANDROID) + // Android uses cacheflush(long, long, long) instead. + cacheflush(reinterpret_cast<long>(Addr), Len, BCACHE); +# else const char *Start = static_cast<const char *>(Addr); cacheflush(const_cast<char *>(Start), Len, BCACHE); +# endif # endif #endif // end apple |