summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-05-06 16:21:50 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-05-06 16:21:50 +0000
commit80435baa146e9218c46beb4b4ea3961aefd8d950 (patch)
treeb1961cc4bd917140cf449046ba6568c1ef81dca3
parent982a21510e1b77c5ba4a5506f80671350d0d63ae (diff)
downloadbcm5719-llvm-80435baa146e9218c46beb4b4ea3961aefd8d950.tar.gz
bcm5719-llvm-80435baa146e9218c46beb4b4ea3961aefd8d950.zip
[SystemZ] Set up JIT/MCJIT test cases
This patch adds the necessary configuration bits and #ifdef's to set up the JIT/MCJIT test cases for SystemZ. Like other recent targets, we do fully support MCJIT, but do not support the old JIT at all. Set up the lit config files accordingly, and disable old-JIT unit tests. Patch by Richard Sandiford. llvm-svn: 181207
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/lit.local.cfg4
-rw-r--r--llvm/test/ExecutionEngine/lit.local.cfg2
-rw-r--r--llvm/test/lit.cfg3
-rw-r--r--llvm/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp3
-rw-r--r--llvm/unittests/ExecutionEngine/JIT/JITTest.cpp6
-rw-r--r--llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp6
6 files changed, 14 insertions, 10 deletions
diff --git a/llvm/test/ExecutionEngine/MCJIT/lit.local.cfg b/llvm/test/ExecutionEngine/MCJIT/lit.local.cfg
index 2dbc222bba0..30ed4e87e6c 100644
--- a/llvm/test/ExecutionEngine/MCJIT/lit.local.cfg
+++ b/llvm/test/ExecutionEngine/MCJIT/lit.local.cfg
@@ -9,13 +9,13 @@ root = getRoot(config)
targets = set(root.targets_to_build.split())
if ('X86' in targets) | ('AArch64' in targets) | ('ARM' in targets) | \
- ('Mips' in targets) | ('PowerPC' in targets):
+ ('Mips' in targets) | ('PowerPC' in targets) | ('SystemZ' in targets):
config.unsupported = False
else:
config.unsupported = True
if root.host_arch not in ['i386', 'x86', 'x86_64',
- 'AArch64', 'ARM', 'Mips', 'PowerPC']:
+ 'AArch64', 'ARM', 'Mips', 'PowerPC', 'SystemZ']:
config.unsupported = True
if 'i386-apple-darwin' in root.target_triple:
diff --git a/llvm/test/ExecutionEngine/lit.local.cfg b/llvm/test/ExecutionEngine/lit.local.cfg
index 1f8ae69b986..b6945adf015 100644
--- a/llvm/test/ExecutionEngine/lit.local.cfg
+++ b/llvm/test/ExecutionEngine/lit.local.cfg
@@ -7,7 +7,7 @@ def getRoot(config):
root = getRoot(config)
-if root.host_arch in ['PowerPC', 'AArch64']:
+if root.host_arch in ['PowerPC', 'AArch64', 'SystemZ']:
config.unsupported = True
if 'hexagon' in root.target_triple:
diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg
index b423c6e80b7..d38775d9077 100644
--- a/llvm/test/lit.cfg
+++ b/llvm/test/lit.cfg
@@ -160,7 +160,8 @@ config.substitutions.append( ('%lli_mcjit', lli_mcjit) )
# but simply want use the currently considered most reliable jit for platform
# FIXME: ppc32 is not ready for mcjit.
if 'arm' in config.target_triple \
- or 'powerpc64' in config.target_triple:
+ or 'powerpc64' in config.target_triple \
+ or 's390x' in config.target_triple:
defaultIsMCJIT = 'true'
else:
defaultIsMCJIT = 'false'
diff --git a/llvm/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp b/llvm/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
index 6ba8bc42d12..87f482444f4 100644
--- a/llvm/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
@@ -74,6 +74,8 @@ class JITEventListenerTest : public testing::Test {
const OwningPtr<ExecutionEngine> EE;
};
+// Tests on SystemZ disabled as we're running the old JIT
+#if !defined(__s390__)
Function *buildFunction(Module *M) {
Function *Result = Function::Create(
TypeBuilder<int32_t(int32_t), false>::get(getGlobalContext()),
@@ -224,6 +226,7 @@ TEST_F(JITEventListenerTest, MatchesMachineCodeInfo) {
EXPECT_EQ(1U, Listener.FreedEvents[0].Index);
EXPECT_EQ(F_addr, Listener.FreedEvents[0].Code);
}
+#endif
class JITEnvironment : public testing::Environment {
virtual void SetUp() {
diff --git a/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp b/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
index 30bfffbf93b..e6f4cb9af25 100644
--- a/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
+++ b/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
@@ -35,8 +35,8 @@ using namespace llvm;
namespace {
-// Tests on ARM and PowerPC disabled as we're running the old jit
-#if !defined(__arm__) && !defined(__powerpc__)
+// Tests on ARM, PowerPC and SystemZ disabled as we're running the old jit
+#if !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__)
Function *makeReturnGlobal(std::string Name, GlobalVariable *G, Module *M) {
std::vector<Type*> params;
@@ -826,7 +826,7 @@ TEST(LazyLoadedJITTest, EagerCompiledRecursionThroughGhost) {
(intptr_t)TheJIT->getPointerToFunction(recur1IR));
EXPECT_EQ(3, recur1(4));
}
-#endif // !defined(__arm__) && !defined(__powerpc__)
+#endif // !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__)
// 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
diff --git a/llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp b/llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp
index b3e992639db..4018cd5ce2f 100644
--- a/llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp
+++ b/llvm/unittests/ExecutionEngine/JIT/MultiJITTest.cpp
@@ -20,8 +20,8 @@ using namespace llvm;
namespace {
-// ARM and PowerPC tests disabled pending fix for PR10783.
-#if !defined(__arm__) && !defined(__powerpc__)
+// ARM, PowerPC and SystemZ tests disabled pending fix for PR10783.
+#if !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__)
bool LoadAssemblyInto(Module *M, const char *assembly) {
SMDiagnostic Error;
@@ -176,6 +176,6 @@ TEST(MultiJitTest, JitPool) {
#endif
EXPECT_TRUE(sa == fa);
}
-#endif // !defined(__arm__) && !defined(__powerpc__)
+#endif // !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__)
} // anonymous namespace
OpenPOWER on IntegriCloud