svn commit: r208038 - projects/clangbsd-import/contrib/llvm/lib/System

Ed Schouten ed at FreeBSD.org
Thu May 13 17:32:31 UTC 2010


Author: ed
Date: Thu May 13 17:32:30 2010
New Revision: 208038
URL: http://svn.freebsd.org/changeset/base/208038

Log:
  Crude hack to make LLVM build on FreeBSD/arm.
  
  LLVM needs a function to flush the icache of certain memory regions.
  glibc has a function for it called __clear_cache(), but FreeBSD's libc
  doesn't have it. I don't care about flushing the icache at all, because
  it's only used when JITting, which we are not going to do with Clang.

Modified:
  projects/clangbsd-import/contrib/llvm/lib/System/Memory.cpp

Modified: projects/clangbsd-import/contrib/llvm/lib/System/Memory.cpp
==============================================================================
--- projects/clangbsd-import/contrib/llvm/lib/System/Memory.cpp	Thu May 13 17:22:00 2010	(r208037)
+++ projects/clangbsd-import/contrib/llvm/lib/System/Memory.cpp	Thu May 13 17:32:30 2010	(r208038)
@@ -61,7 +61,7 @@ void llvm::sys::Memory::InvalidateInstru
   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(__GNUC__) && !defined(__FreeBSD__)
   // FIXME: Can we safely always call this for __GNUC__ everywhere?
   char *Start = (char*) Addr;
   char *End = Start + Len;


More information about the svn-src-projects mailing list