From: Tim Northover Date: Sat, 4 May 2013 18:52:44 +0000 (+0000) Subject: AArch64: use __clear_cache under GCCish environments X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9a29cf281e5fc4e3fd4f4f83296fbc22ebfdac86;p=oota-llvm.git 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181129 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/Unix/Memory.inc b/lib/Support/Unix/Memory.inc index e9b26bdb80f..72a8af621df 100644 --- a/lib/Support/Unix/Memory.inc +++ b/lib/Support/Unix/Memory.inc @@ -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(Addr); const char *End = Start + Len;