AArch64: use __clear_cache under GCCish environments

AArch64 is going to need some kind of cache-invalidation in order to
successfully JIT since it has a weak memory-model. This is provided by
a __clear_cache builtin in libgcc, which acts very much like the
32-bit ARM equivalent (on platforms where it exists).

llvm-svn: 181129
This commit is contained in:
Tim Northover 2013-05-04 18:52:44 +00:00
parent 2f75a0c0d8
commit 6c26b327ef
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ 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(__GNUC__)
# elif (defined(__arm__) || defined(__aarch64__)) && defined(__GNUC__)
// FIXME: Can we safely always call this for __GNUC__ everywhere?
const char *Start = static_cast<const char *>(Addr);
const char *End = Start + Len;