diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2014-06-24 13:53:56 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2014-06-24 13:53:56 +0000 |
commit | d3aaad2d266afb80bb4be2815d45b4300e3f0c0f (patch) | |
tree | 591484f1b91ca523b0e6b69d2cbced2e7c189196 /lib/Support | |
parent | cdde33ebaad211e1ce0fc22b53bbccff8bb3c1a4 (diff) | |
download | llvm-d3aaad2d266afb80bb4be2815d45b4300e3f0c0f.tar.gz llvm-d3aaad2d266afb80bb4be2815d45b4300e3f0c0f.tar.bz2 llvm-d3aaad2d266afb80bb4be2815d45b4300e3f0c0f.tar.xz |
Revert: r211588 - [mips] Use __clear_cache builtin instead of cacheflush() in Unix Memory::InvalidateInstructionCache()
Buildbot reports a test failure on the llvm-mips-linux builder and blames r211588.
Although it doesn't appear in the blamelist, it seems it could also be r211587
(because it's committed to compiler-rt?) since they were tested together.
Reverting the most likely suspect (r211588) to confirm one way or the other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Unix/Memory.inc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Support/Unix/Memory.inc b/lib/Support/Unix/Memory.inc index cae39d4edc..c9d89a8247 100644 --- a/lib/Support/Unix/Memory.inc +++ b/lib/Support/Unix/Memory.inc @@ -333,15 +333,23 @@ void Memory::InvalidateInstructionCache(const void *Addr, for (intptr_t Line = StartLine; Line < EndLine; Line += LineSize) asm volatile("icbi 0, %0" : : "r"(Line)); asm volatile("isync"); -# elif (defined(__arm__) || defined(__aarch64__) || defined(__mips__)) && defined(__GNUC__) +# elif (defined(__arm__) || defined(__aarch64__)) && defined(__GNUC__) // FIXME: Can we safely always call this for __GNUC__ everywhere? - // Use compiler's builtin const char *Start = static_cast<const char *>(Addr); const char *End = Start + Len; __clear_cache(const_cast<char *>(Start), const_cast<char *>(End)); # elif defined(__mips__) const char *Start = static_cast<const char *>(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<long>(const_cast<char *>(Start)); + long LEnd = reinterpret_cast<long>(const_cast<char *>(End)); + cacheflush(LStart, LEnd, BCACHE); +# else cacheflush(const_cast<char *>(Start), Len, BCACHE); +# endif # endif #endif // end apple |