[PATCH] Add AArch64 (LE/BE) support to CMake

Renato Golin renato.golin at linaro.org
Thu Feb 20 11:33:41 PST 2014


Hi t.p.northover,

http://llvm-reviews.chandlerc.com/D2825

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D2825?vs=7206&id=7256#toc

Files:
  autoconf/config.guess
  test/ExecutionEngine/lit.local.cfg
  unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
  unittests/ExecutionEngine/JIT/JITTest.cpp
  unittests/ExecutionEngine/JIT/MultiJITTest.cpp

Index: autoconf/config.guess
===================================================================
--- autoconf/config.guess
+++ autoconf/config.guess
@@ -864,6 +864,9 @@
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
+    aarch64*:Linux:*)
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
Index: test/ExecutionEngine/lit.local.cfg
===================================================================
--- test/ExecutionEngine/lit.local.cfg
+++ test/ExecutionEngine/lit.local.cfg
@@ -1,6 +1,10 @@
 if config.root.host_arch in ['PowerPC', 'AArch64', 'SystemZ']:
     config.unsupported = True
 
+# CMake and autoconf diverge in naming or host_arch
+if 'aarch64' in config.root.target_triple:
+    config.unsupported = True
+
 if 'hexagon' in config.root.target_triple:
     config.unsupported = True
 
Index: unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
===================================================================
--- unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
+++ unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp
@@ -73,7 +73,7 @@
 };
 
 // Tests on SystemZ disabled as we're running the old JIT
-#if !defined(__s390__)
+#if !defined(__s390__) && !defined(__aarch64__)
 Function *buildFunction(Module *M) {
   Function *Result = Function::Create(
       TypeBuilder<int32_t(int32_t), false>::get(getGlobalContext()),
Index: unittests/ExecutionEngine/JIT/JITTest.cpp
===================================================================
--- unittests/ExecutionEngine/JIT/JITTest.cpp
+++ unittests/ExecutionEngine/JIT/JITTest.cpp
@@ -52,7 +52,8 @@
 namespace {
 
 // Tests on ARM, PowerPC and SystemZ disabled as we're running the old jit
-#if !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__)
+#if !defined(__arm__) && !defined(__powerpc__) && !defined(__s390__) \
+                      && !defined(__aarch64__)
 
 Function *makeReturnGlobal(std::string Name, GlobalVariable *G, Module *M) {
   std::vector<Type*> params;
@@ -438,7 +439,7 @@
 // too far away to call directly.  This #if can probably be removed when
 // http://llvm.org/PR5201 is fixed.
 #if !defined(__arm__) && !defined(__mips__) && \
-    !defined(__powerpc__) && !defined(__ppc__)
+    !defined(__powerpc__) && !defined(__ppc__) && !defined(__aarch64__)
 typedef int (*FooPtr) ();
 
 TEST_F(JITTest, NoStubs) {
@@ -514,7 +515,7 @@
 
 // ARM does not have an implementation of replaceMachineCodeForFunction(),
 // so recompileAndRelinkFunction doesn't work.
-#if !defined(__arm__)
+#if !defined(__arm__) && !defined(__aarch64__)
 TEST_F(JITTest, FunctionIsRecompiledAndRelinked) {
   Function *F = Function::Create(TypeBuilder<int(void), false>::get(Context),
                                  GlobalValue::ExternalLinkage, "test", M);
Index: unittests/ExecutionEngine/JIT/MultiJITTest.cpp
===================================================================
--- unittests/ExecutionEngine/JIT/MultiJITTest.cpp
+++ unittests/ExecutionEngine/JIT/MultiJITTest.cpp
@@ -21,7 +21,8 @@
 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(__aarch64__)
 
 bool LoadAssemblyInto(Module *M, const char *assembly) {
   SMDiagnostic Error;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2825.6.patch
Type: text/x-patch
Size: 3500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140220/a586ef8b/attachment.bin>


More information about the llvm-commits mailing list