[llvm-commits] [llvm] r52419 - /llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp
Anton Korobeynikov
asl at math.spbu.ru
Tue Jun 17 10:38:31 PDT 2008
Author: asl
Date: Tue Jun 17 12:38:31 2008
New Revision: 52419
URL: http://llvm.org/viewvc/llvm-project?rev=52419&view=rev
Log:
Unbreak non-PPC builds
Modified:
llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp?rev=52419&r1=52418&r2=52419&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp Tue Jun 17 12:38:31 2008
@@ -331,12 +331,12 @@
#endif
void PPCJITInfo::InvalidateInstructionCache(const void *Addr, unsigned len) {
-#if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \
-defined(__APPLE__)
+#if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER))
+# if defined(__APPLE__)
sys_icache_invalidate(Addr, len);
-#elif defined(__GNUC__)
+# elif defined(__GNUC__)
const size_t LineSize = 32;
-
+
const intptr_t Mask = ~(LineSize - 1);
const intptr_t StartLine = ((intptr_t) Addr) & Mask;
const intptr_t EndLine = ((intptr_t) Addr + len + LineSize - 1) & Mask;
@@ -348,6 +348,7 @@
for (intptr_t Line = StartLine; Line < EndLine; Line += LineSize)
asm volatile("icbi 0, %0" : : "r"(Line));
asm volatile("isync");
+# endif
#endif
}
More information about the llvm-commits
mailing list