llvm.org GIT mirror llvm / f772f07
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167133 91177308-0d34-0410-b5e6-96231b3b80d8 Ulrich Weigand 7 years ago
2 changed file(s) with 23 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
223223 OwningPtr TheJIT;
224224 };
225225
226 // Tests on ARM disabled as we're running the old jit
227 #if !defined(__arm__)
226 // Tests on ARM and PowerPC disabled as we're running the old jit
227 #if !defined(__arm__) && !defined(__powerpc__)
228228
229229 // Regression test for a bug. The JIT used to allocate globals inside the same
230230 // memory block used for the function, and when the function code was freed,
294294 EXPECT_EQ(3, *GPtr);
295295 }
296296
297 #endif // !defined(__arm__)
297 #endif // !defined(__arm__) && !defined(__powerpc__)
298298
299299 int PlusOne(int arg) {
300300 return arg + 1;
301301 }
302302
303 // ARM tests disabled pending fix for PR10783.
304 #if !defined(__arm__)
303 // ARM and PowerPC tests disabled pending fix for PR10783.
304 #if !defined(__arm__) && !defined(__powerpc__)
305305 TEST_F(JITTest, FarCallToKnownFunction) {
306306 // x86-64 can only make direct calls to functions within 32 bits of
307307 // the current PC. To call anything farther away, we have to load
479479 EXPECT_EQ(RJMM->startExceptionTableCalls.size(),
480480 NumTablesDeallocated);
481481 }
482 #endif // !defined(__arm__)
482 #endif // !defined(__arm__) && !defined(__powerpc__)
483483
484484 // ARM, MIPS and PPC still emit stubs for calls since the target may be
485485 // too far away to call directly. This #if can probably be removed when
525525 }
526526 #endif // !ARM && !PPC
527527
528 // Tests on ARM disabled as we're running the old jit
529 #if !defined(__arm__)
528 // Tests on ARM and PowerPC disabled as we're running the old jit
529 #if !defined(__arm__) && !defined(__powerpc__)
530530
531531 TEST_F(JITTest, FunctionPointersOutliveTheirCreator) {
532532 TheJIT->DisableLazyCompilation(true);
562562 #endif
563563 }
564564
565 #endif //!defined(__arm__)
566
567 // ARM does not have an implementation
565 #endif //!defined(__arm__) && !defined(__powerpc__)
566
567 // Tests on ARM and PowerPC disabled as we're running the old jit
568 // In addition, ARM does not have an implementation
568569 // of replaceMachineCodeForFunction(), so recompileAndRelinkFunction
569570 // doesn't work.
570 #if !defined(__arm__)
571 #if !defined(__arm__) && !defined(__powerpc__)
571572 TEST_F(JITTest, FunctionIsRecompiledAndRelinked) {
572573 Function *F = Function::Create(TypeBuilder::get(Context),
573574 GlobalValue::ExternalLinkage, "test", M);
598599 EXPECT_EQ(2, OrigFPtr())
599600 << "The old pointer's target should now jump to the new version";
600601 }
601 #endif // !defined(__arm__)
602 #endif // !defined(__arm__) && !defined(__powerpc__)
602603
603604 } // anonymous namespace
604605 // This variable is intentionally defined differently in the statically-compiled
608609 int32_t JITTest_AvailableExternallyGlobal LLVM_ATTRIBUTE_USED = 42;
609610 namespace {
610611
611 // Tests on ARM disabled as we're running the old jit
612 #if !defined(__arm__)
612 // Tests on ARM and PowerPC disabled as we're running the old jit
613 #if !defined(__arm__) && !defined(__powerpc__)
613614
614615 TEST_F(JITTest, AvailableExternallyGlobalIsntEmitted) {
615616 TheJIT->DisableLazyCompilation(true);
627628 EXPECT_EQ(42, loader()) << "func should return 42 from the external global,"
628629 << " not 7 from the IR version.";
629630 }
630 #endif //!defined(__arm__)
631 #endif //!defined(__arm__) && !defined(__powerpc__)
631632 } // anonymous namespace
632633 // This function is intentionally defined differently in the statically-compiled
633634 // program from the IR input to the JIT to assert that the JIT doesn't use its
638639 }
639640 namespace {
640641
641 // ARM tests disabled pending fix for PR10783.
642 #if !defined(__arm__)
642 // ARM and PowerPC tests disabled pending fix for PR10783.
643 #if !defined(__arm__) && !defined(__powerpc__)
643644 TEST_F(JITTest, AvailableExternallyFunctionIsntCompiled) {
644645 TheJIT->DisableLazyCompilation(true);
645646 LoadAssembly("define available_externally i32 "
795796 (intptr_t)TheJIT->getPointerToFunction(recur1IR));
796797 EXPECT_EQ(3, recur1(4));
797798 }
798 #endif // !defined(__arm__)
799 #endif // !defined(__arm__) && !defined(__powerpc__)
799800
800801 // This code is copied from JITEventListenerTest, but it only runs once for all
801802 // the tests in this directory. Everything seems fine, but that's strange
6464 FooF2 = M2->getFunction("foo2");
6565 }
6666
67 // ARM tests disabled pending fix for PR10783.
68 #if !defined(__arm__)
67 // ARM and PowerPC tests disabled pending fix for PR10783.
68 #if !defined(__arm__) && !defined(__powerpc__)
6969
7070 TEST(MultiJitTest, EagerMode) {
7171 LLVMContext Context1;
175175 #endif
176176 EXPECT_TRUE(sa == fa);
177177 }
178 #endif // !defined(__arm__)
178 #endif // !defined(__arm__) && !defined(__powerpc__)
179179
180180 } // anonymous namespace