From 7a17ff7b3f859024f5c8a6d247d8a2fd6e83f9b1 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Tue, 17 Jun 2008 17:38:31 +0000 Subject: [PATCH] Unbreak non-PPC builds git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52419 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCJITInfo.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Target/PowerPC/PPCJITInfo.cpp b/lib/Target/PowerPC/PPCJITInfo.cpp index 72001ce334b..f241c09480e 100644 --- a/lib/Target/PowerPC/PPCJITInfo.cpp +++ b/lib/Target/PowerPC/PPCJITInfo.cpp @@ -331,12 +331,12 @@ extern "C" void sys_icache_invalidate(const void *Addr, size_t len); #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 @@ defined(__APPLE__) for (intptr_t Line = StartLine; Line < EndLine; Line += LineSize) asm volatile("icbi 0, %0" : : "r"(Line)); asm volatile("isync"); +# endif #endif } -- 2.34.1