Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 May 2010 17:32:30 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r208038 - projects/clangbsd-import/contrib/llvm/lib/System
Message-ID:  <201005131732.o4DHWU91001139@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005131732.o4DHWU91001139>