<div dir="ltr">Hi Christian,<div><br></div><div>Patch LGTM.</div><div><br></div><div>Cheers,</div><div><br></div><div>James</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 25 March 2014 15:14, Christian Pirker <span dir="ltr"><<a href="mailto:cpirker@a-bix.com" target="_blank">cpirker@a-bix.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
This patch adds AArch64 big endian target support to the MC-JIT runtime dynamic linker.<br>
Please review.<br>
<br>
Thanks,<br>
Christian<br>
<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D3179" target="_blank">http://llvm-reviews.chandlerc.com/D3179</a><br>
<br>
Files:<br>
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp<br>
  lib/MC/MCObjectFileInfo.cpp<br>
  test/CodeGen/AArch64/pic-eh-stubs.ll<br>
<br>
Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
===================================================================<br>
--- lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
+++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp<br>
@@ -490,7 +490,7 @@<br>
 }<br>
<br>
 uint8_t *RuntimeDyldImpl::createStubFunction(uint8_t *Addr) {<br>
-  if (Arch == Triple::aarch64) {<br>
+  if (Arch == Triple::aarch64 || Arch == Triple::aarch64_be) {<br>
     // This stub has to be able to access the full address space,<br>
     // since symbol lookup won't necessarily find a handy, in-range,<br>
     // PLT stub for functions which could be anywhere.<br>
Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp<br>
===================================================================<br>
--- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp<br>
+++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp<br>
@@ -844,6 +844,7 @@<br>
                          (uint32_t)(Addend & 0xffffffffL));<br>
     break;<br>
   case Triple::aarch64:<br>
+  case Triple::aarch64_be:<br>
     resolveAArch64Relocation(Section, Offset, Value, Type, Addend);<br>
     break;<br>
   case Triple::arm: // Fall through.<br>
Index: lib/MC/MCObjectFileInfo.cpp<br>
===================================================================<br>
--- lib/MC/MCObjectFileInfo.cpp<br>
+++ lib/MC/MCObjectFileInfo.cpp<br>
@@ -283,7 +283,8 @@<br>
       TTypeEncoding = (CMModel == CodeModel::Small)<br>
         ? dwarf::DW_EH_PE_udata4 : dwarf::DW_EH_PE_absptr;<br>
     }<br>
-  }  else if (T.getArch() ==  Triple::aarch64) {<br>
+  }  else if (T.getArch() == Triple::aarch64 ||<br>
+              T.getArch() == Triple::aarch64_be ) {<br>
     // The small model guarantees static code/data size < 4GB, but not where it<br>
     // will be in memory. Most of these could end up >2GB away so even a signed<br>
     // pc-relative 32-bit address is insufficient, theoretically.<br>
Index: test/CodeGen/AArch64/pic-eh-stubs.ll<br>
===================================================================<br>
--- test/CodeGen/AArch64/pic-eh-stubs.ll<br>
+++ test/CodeGen/AArch64/pic-eh-stubs.ll<br>
@@ -1,4 +1,5 @@<br>
 ; RUN: llc -mtriple=aarch64-none-linux-gnu -relocation-model=pic -o - %s | FileCheck %s<br>
+; RUN: llc -mtriple=aarch64_be-none-linux-gnu -relocation-model=pic -o - %s | FileCheck %s<br>
<br>
 ; Make sure exception-handling PIC code can be linked correctly. An alternative<br>
 ; to the sequence described below would have .gcc_except_table itself writable<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>