llvm.org GIT mirror llvm / 048ca53
Merging r227269: ------------------------------------------------------------------------ r227269 | petarj | 2015-01-27 23:30:18 +0000 (Tue, 27 Jan 2015) | 7 lines [mips] Use __clear_cache builtin instead of cacheflush() Use __clear_cache builtin instead of cacheflush() in Unix Memory::InvalidateInstructionCache(). Differential Revision: http://reviews.llvm.org/D7198 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235858 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Sanders 4 years ago
1 changed file(s) with 2 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
332332 for (intptr_t Line = StartLine; Line < EndLine; Line += LineSize)
333333 asm volatile("icbi 0, %0" : : "r"(Line));
334334 asm volatile("isync");
335 # elif (defined(__arm__) || defined(__aarch64__)) && defined(__GNUC__)
335 # elif (defined(__arm__) || defined(__aarch64__) || defined(__mips__)) && \
336 defined(__GNUC__)
336337 // FIXME: Can we safely always call this for __GNUC__ everywhere?
337338 const char *Start = static_cast(Addr);
338339 const char *End = Start + Len;
339340 __clear_cache(const_cast(Start), const_cast(End));
340 # elif defined(__mips__)
341 const char *Start = static_cast(Addr);
342 # if defined(ANDROID)
343 // The declaration of "cacheflush" in Android bionic:
344 // extern int cacheflush(long start, long end, long flags);
345 const char *End = Start + Len;
346 long LStart = reinterpret_cast(const_cast(Start));
347 long LEnd = reinterpret_cast(const_cast(End));
348 cacheflush(LStart, LEnd, BCACHE);
349 # else
350 cacheflush(const_cast(Start), Len, BCACHE);
351 # endif
352341 # endif
353342
354343 #endif // end apple