[llvm] r181129 - AArch64: use __clear_cache under GCCish environments

Tim Northover Tim.Northover at arm.com
Sat May 4 11:52:45 PDT 2013


Author: tnorthover
Date: Sat May  4 13:52:44 2013
New Revision: 181129

URL: http://llvm.org/viewvc/llvm-project?rev=181129&view=rev
Log:
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).

Modified:
    llvm/trunk/lib/Support/Unix/Memory.inc

Modified: llvm/trunk/lib/Support/Unix/Memory.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Memory.inc?rev=181129&r1=181128&r2=181129&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Memory.inc (original)
+++ llvm/trunk/lib/Support/Unix/Memory.inc Sat May  4 13:52:44 2013
@@ -325,7 +325,7 @@ void Memory::InvalidateInstructionCache(
   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;





More information about the llvm-commits mailing list