mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Disable all old-JIT unit tests on PowerPC.
These tests were all failing since the old JIT doesn't work for PowerPC (any more), and there are no plans to attempt to fix it again (instead, work focuses on MCJIT). llvm-svn: 167133
This commit is contained in:
parent
4c6d01059c
commit
d3685b18a9
@ -224,8 +224,8 @@ class JITTest : public testing::Test {
|
|||||||
OwningPtr<ExecutionEngine> TheJIT;
|
OwningPtr<ExecutionEngine> TheJIT;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Tests on ARM disabled as we're running the old jit
|
// Tests on ARM and PowerPC disabled as we're running the old jit
|
||||||
#if !defined(__arm__)
|
#if !defined(__arm__) && !defined(__powerpc__)
|
||||||
|
|
||||||
// Regression test for a bug. The JIT used to allocate globals inside the same
|
// Regression test for a bug. The JIT used to allocate globals inside the same
|
||||||
// memory block used for the function, and when the function code was freed,
|
// memory block used for the function, and when the function code was freed,
|
||||||
@ -295,14 +295,14 @@ TEST(JIT, GlobalInFunction) {
|
|||||||
EXPECT_EQ(3, *GPtr);
|
EXPECT_EQ(3, *GPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !defined(__arm__)
|
#endif // !defined(__arm__) && !defined(__powerpc__)
|
||||||
|
|
||||||
int PlusOne(int arg) {
|
int PlusOne(int arg) {
|
||||||
return arg + 1;
|
return arg + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ARM tests disabled pending fix for PR10783.
|
// ARM and PowerPC tests disabled pending fix for PR10783.
|
||||||
#if !defined(__arm__)
|
#if !defined(__arm__) && !defined(__powerpc__)
|
||||||
TEST_F(JITTest, FarCallToKnownFunction) {
|
TEST_F(JITTest, FarCallToKnownFunction) {
|
||||||
// x86-64 can only make direct calls to functions within 32 bits of
|
// x86-64 can only make direct calls to functions within 32 bits of
|
||||||
// the current PC. To call anything farther away, we have to load
|
// the current PC. To call anything farther away, we have to load
|
||||||
@ -480,7 +480,7 @@ TEST_F(JITTest, ModuleDeletion) {
|
|||||||
EXPECT_EQ(RJMM->startExceptionTableCalls.size(),
|
EXPECT_EQ(RJMM->startExceptionTableCalls.size(),
|
||||||
NumTablesDeallocated);
|
NumTablesDeallocated);
|
||||||
}
|
}
|
||||||
#endif // !defined(__arm__)
|
#endif // !defined(__arm__) && !defined(__powerpc__)
|
||||||
|
|
||||||
// ARM, MIPS and PPC still emit stubs for calls since the target may be
|
// ARM, MIPS and PPC still emit stubs for calls since the target may be
|
||||||
// too far away to call directly. This #if can probably be removed when
|
// too far away to call directly. This #if can probably be removed when
|
||||||
@ -526,8 +526,8 @@ TEST_F(JITTest, NoStubs) {
|
|||||||
}
|
}
|
||||||
#endif // !ARM && !PPC
|
#endif // !ARM && !PPC
|
||||||
|
|
||||||
// Tests on ARM disabled as we're running the old jit
|
// Tests on ARM and PowerPC disabled as we're running the old jit
|
||||||
#if !defined(__arm__)
|
#if !defined(__arm__) && !defined(__powerpc__)
|
||||||
|
|
||||||
TEST_F(JITTest, FunctionPointersOutliveTheirCreator) {
|
TEST_F(JITTest, FunctionPointersOutliveTheirCreator) {
|
||||||
TheJIT->DisableLazyCompilation(true);
|
TheJIT->DisableLazyCompilation(true);
|
||||||
@ -563,12 +563,13 @@ TEST_F(JITTest, FunctionPointersOutliveTheirCreator) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //!defined(__arm__)
|
#endif //!defined(__arm__) && !defined(__powerpc__)
|
||||||
|
|
||||||
// ARM does not have an implementation
|
// Tests on ARM and PowerPC disabled as we're running the old jit
|
||||||
|
// In addition, ARM does not have an implementation
|
||||||
// of replaceMachineCodeForFunction(), so recompileAndRelinkFunction
|
// of replaceMachineCodeForFunction(), so recompileAndRelinkFunction
|
||||||
// doesn't work.
|
// doesn't work.
|
||||||
#if !defined(__arm__)
|
#if !defined(__arm__) && !defined(__powerpc__)
|
||||||
TEST_F(JITTest, FunctionIsRecompiledAndRelinked) {
|
TEST_F(JITTest, FunctionIsRecompiledAndRelinked) {
|
||||||
Function *F = Function::Create(TypeBuilder<int(void), false>::get(Context),
|
Function *F = Function::Create(TypeBuilder<int(void), false>::get(Context),
|
||||||
GlobalValue::ExternalLinkage, "test", M);
|
GlobalValue::ExternalLinkage, "test", M);
|
||||||
@ -599,7 +600,7 @@ TEST_F(JITTest, FunctionIsRecompiledAndRelinked) {
|
|||||||
EXPECT_EQ(2, OrigFPtr())
|
EXPECT_EQ(2, OrigFPtr())
|
||||||
<< "The old pointer's target should now jump to the new version";
|
<< "The old pointer's target should now jump to the new version";
|
||||||
}
|
}
|
||||||
#endif // !defined(__arm__)
|
#endif // !defined(__arm__) && !defined(__powerpc__)
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
// This variable is intentionally defined differently in the statically-compiled
|
// This variable is intentionally defined differently in the statically-compiled
|
||||||
@ -609,8 +610,8 @@ extern "C" int32_t JITTest_AvailableExternallyGlobal;
|
|||||||
int32_t JITTest_AvailableExternallyGlobal LLVM_ATTRIBUTE_USED = 42;
|
int32_t JITTest_AvailableExternallyGlobal LLVM_ATTRIBUTE_USED = 42;
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// Tests on ARM disabled as we're running the old jit
|
// Tests on ARM and PowerPC disabled as we're running the old jit
|
||||||
#if !defined(__arm__)
|
#if !defined(__arm__) && !defined(__powerpc__)
|
||||||
|
|
||||||
TEST_F(JITTest, AvailableExternallyGlobalIsntEmitted) {
|
TEST_F(JITTest, AvailableExternallyGlobalIsntEmitted) {
|
||||||
TheJIT->DisableLazyCompilation(true);
|
TheJIT->DisableLazyCompilation(true);
|
||||||
@ -628,7 +629,7 @@ TEST_F(JITTest, AvailableExternallyGlobalIsntEmitted) {
|
|||||||
EXPECT_EQ(42, loader()) << "func should return 42 from the external global,"
|
EXPECT_EQ(42, loader()) << "func should return 42 from the external global,"
|
||||||
<< " not 7 from the IR version.";
|
<< " not 7 from the IR version.";
|
||||||
}
|
}
|
||||||
#endif //!defined(__arm__)
|
#endif //!defined(__arm__) && !defined(__powerpc__)
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
// This function is intentionally defined differently in the statically-compiled
|
// This function is intentionally defined differently in the statically-compiled
|
||||||
// program from the IR input to the JIT to assert that the JIT doesn't use its
|
// program from the IR input to the JIT to assert that the JIT doesn't use its
|
||||||
@ -639,8 +640,8 @@ extern "C" int32_t JITTest_AvailableExternallyFunction() {
|
|||||||
}
|
}
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// ARM tests disabled pending fix for PR10783.
|
// ARM and PowerPC tests disabled pending fix for PR10783.
|
||||||
#if !defined(__arm__)
|
#if !defined(__arm__) && !defined(__powerpc__)
|
||||||
TEST_F(JITTest, AvailableExternallyFunctionIsntCompiled) {
|
TEST_F(JITTest, AvailableExternallyFunctionIsntCompiled) {
|
||||||
TheJIT->DisableLazyCompilation(true);
|
TheJIT->DisableLazyCompilation(true);
|
||||||
LoadAssembly("define available_externally i32 "
|
LoadAssembly("define available_externally i32 "
|
||||||
@ -796,7 +797,7 @@ TEST(LazyLoadedJITTest, EagerCompiledRecursionThroughGhost) {
|
|||||||
(intptr_t)TheJIT->getPointerToFunction(recur1IR));
|
(intptr_t)TheJIT->getPointerToFunction(recur1IR));
|
||||||
EXPECT_EQ(3, recur1(4));
|
EXPECT_EQ(3, recur1(4));
|
||||||
}
|
}
|
||||||
#endif // !defined(__arm__)
|
#endif // !defined(__arm__) && !defined(__powerpc__)
|
||||||
|
|
||||||
// This code is copied from JITEventListenerTest, but it only runs once for all
|
// This code is copied from JITEventListenerTest, but it only runs once for all
|
||||||
// the tests in this directory. Everything seems fine, but that's strange
|
// the tests in this directory. Everything seems fine, but that's strange
|
||||||
|
@ -65,8 +65,8 @@ void createModule2(LLVMContext &Context2, Module *&M2, Function *&FooF2) {
|
|||||||
FooF2 = M2->getFunction("foo2");
|
FooF2 = M2->getFunction("foo2");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ARM tests disabled pending fix for PR10783.
|
// ARM and PowerPC tests disabled pending fix for PR10783.
|
||||||
#if !defined(__arm__)
|
#if !defined(__arm__) && !defined(__powerpc__)
|
||||||
|
|
||||||
TEST(MultiJitTest, EagerMode) {
|
TEST(MultiJitTest, EagerMode) {
|
||||||
LLVMContext Context1;
|
LLVMContext Context1;
|
||||||
@ -176,6 +176,6 @@ TEST(MultiJitTest, JitPool) {
|
|||||||
#endif
|
#endif
|
||||||
EXPECT_TRUE(sa == fa);
|
EXPECT_TRUE(sa == fa);
|
||||||
}
|
}
|
||||||
#endif // !defined(__arm__)
|
#endif // !defined(__arm__) && !defined(__powerpc__)
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user