diff --git a/lib/Support/Unix/Memory.inc b/lib/Support/Unix/Memory.inc index 58fda420eb6..73f586ff4a8 100644 --- a/lib/Support/Unix/Memory.inc +++ b/lib/Support/Unix/Memory.inc @@ -310,14 +310,14 @@ void Memory::InvalidateInstructionCache(const void *Addr, // icache invalidation for PPC and ARM. #if defined(__APPLE__) -# if (defined(__POWERPC__) || defined (__ppc__) || \ +# if (defined(__POWERPC__) || defined (__ppc__) || defined (__powerpc__) \ defined(_POWER) || defined(_ARCH_PPC)) || defined(__arm__) sys_icache_invalidate(const_cast(Addr), Len); # endif #else -# if (defined(__POWERPC__) || defined (__ppc__) || \ +# if (defined(__POWERPC__) || defined (__ppc__) || defined (__powerpc__) || \ defined(_POWER) || defined(_ARCH_PPC)) && defined(__GNUC__) const size_t LineSize = 32; diff --git a/lib/Target/PowerPC/PPCJITInfo.cpp b/lib/Target/PowerPC/PPCJITInfo.cpp index 18f4adf839e..71c8f1db1c7 100644 --- a/lib/Target/PowerPC/PPCJITInfo.cpp +++ b/lib/Target/PowerPC/PPCJITInfo.cpp @@ -71,7 +71,7 @@ static void EmitBranchToAt(uint64_t At, uint64_t To, bool isCall, bool is64Bit){ extern "C" void PPC32CompilationCallback(); extern "C" void PPC64CompilationCallback(); -#if (!defined(__ppc__) && !defined(__powerpc__)) || defined(__powerpc64__) || defined(__ppc64__) +#if defined(__powerpc64__) || defined(__ppc64__) void PPC32CompilationCallback() { llvm_unreachable("This is not a 32bit PowerPC, you can't execute this!"); } @@ -356,8 +356,8 @@ TargetJITInfo::StubLayout PPCJITInfo::getStubLayout() { return Result; } -#if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \ -defined(__APPLE__) +#if (defined(__POWERPC__) || defined (__ppc__) || defined(__powerpc__) || \ +defined(_POWER)) && defined(__APPLE__) extern "C" void sys_icache_invalidate(const void *Addr, size_t len); #endif diff --git a/unittests/ADT/BitVectorTest.cpp b/unittests/ADT/BitVectorTest.cpp index d7cde891fb5..4d3223e418d 100644 --- a/unittests/ADT/BitVectorTest.cpp +++ b/unittests/ADT/BitVectorTest.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // Some of these tests fail on PowerPC for unknown reasons. -#ifndef __ppc__ +#if !defined(__ppc__) && !defined(__powerpc__) #include "llvm/ADT/BitVector.h" #include "llvm/ADT/SmallBitVector.h" diff --git a/unittests/ADT/PackedVectorTest.cpp b/unittests/ADT/PackedVectorTest.cpp index 55b5d8d049d..b6a7e583012 100644 --- a/unittests/ADT/PackedVectorTest.cpp +++ b/unittests/ADT/PackedVectorTest.cpp @@ -9,7 +9,7 @@ // BitVectorTest tests fail on PowerPC for unknown reasons, so disable this // as well since it depends on a BitVector. -#ifndef __ppc__ +#if !defined(__ppc__) && !defined(__powerpc__) #include "llvm/ADT/PackedVector.h" #include "gtest/gtest.h" diff --git a/unittests/ExecutionEngine/JIT/MultiJITTest.cpp b/unittests/ExecutionEngine/JIT/MultiJITTest.cpp index 4018cd5ce2f..29689b71a24 100644 --- a/unittests/ExecutionEngine/JIT/MultiJITTest.cpp +++ b/unittests/ExecutionEngine/JIT/MultiJITTest.cpp @@ -21,7 +21,8 @@ using namespace llvm; namespace { // ARM, PowerPC and SystemZ tests disabled pending fix for PR10783. -#if !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__) +#if !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__) && \ + !defined(__ppc__) bool LoadAssemblyInto(Module *M, const char *assembly) { SMDiagnostic Error;