<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>First off, this is awesome to see PPC getting MC-ified. Thank you for working on this!</div><div><br></div><div>I don't know PPC well enough to comment on the architecture specific aspects of this, but a few general comments inline below:</div><div><br></div><div><blockquote type="cite"><div>From 4ffb3e57d5fd34aec32fec662c9ee3581e186882 Mon Sep 17 00:00:00 2001</div><div>From: Adhemerval Zanella <<a href="mailto:azanella@linux.vnet.ibm.com">azanella@linux.vnet.ibm.com</a>></div><div>Date: Mon, 17 Sep 2012 12:32:35 -0500</div><div>Subject: [PATCH 10/11] Initial support for PowerPC64 MCJIT</div><div><br></div><div>---</div><div> lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp    |   18 ++</div><div> lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp |  279 +++++++++++++++++++-</div><div> lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h   |   11 +</div><div> lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h  |    2 +</div><div> 4 files changed, 308 insertions(+), 2 deletions(-)</div><div><br></div><div>diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp</div><div>index 880129d..d824845 100644</div><div>--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp</div><div>+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp</div><div>@@ -362,6 +362,24 @@ uint8_t *RuntimeDyldImpl::createStubFunction(uint8_t *Addr) {</div><div>     StubAddr++;</div><div>     *StubAddr = NopInstr;</div><div>     return Addr;</div><div>+  } else if (Arch == Triple::ppc64) {</div><div>+    // PowerPC64 stub: the address points to a function descriptor</div><div>+    // instead of the function itself. Load the function address</div><div>+    // on r11 and sets it to control register. Also loads the function</div><div>+    // TOC in r2 and environment pointer to r11.</div><div>+    uint32_t *StubAddr = (uint32_t*)Addr;</div><div>+    *(StubAddr+0)  = 0x3D800000; // lis   r12, highest(addr)</div><div>+    *(StubAddr+1)  = 0x618C0000; // ori   r12, higher(addr)</div><div>+    *(StubAddr+2)  = 0x798C07C6; // sldi  r12, r12, 32</div><div>+    *(StubAddr+3)  = 0x658C0000; // oris  r12, r12, h(addr)</div><div>+    *(StubAddr+4)  = 0x618C0000; // ori   r12, r12, l(addr)</div><div>+    *(StubAddr+5)  = 0xF8410028; // std   r2,  40(r1)</div><div>+    *(StubAddr+6)  = 0xE96C0000; // ld    r11, 0(r12)</div><div>+    *(StubAddr+7)  = 0xE84C0008; // ld    r2,  0(r12)</div><div>+    *(StubAddr+8)  = 0x7D6903A6; // mtctr r11</div><div>+    *(StubAddr+9)  = 0xE96C0010; // ld    r11, 16(r2)</div><div>+    *(StubAddr+10) = 0x4E800420; // bctr</div></blockquote><div><br></div><div>Is StubAddr guaranteed to be 32-bit aligned? Typically not.</div><br><blockquote type="cite"><div>+    return Addr;</div><div>   }</div><div>   return Addr;</div><div> }</div><div>diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp</div><div>index a1c0e40..ba0dd3c 100644</div><div>--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp</div><div>+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp</div><div>@@ -27,6 +27,14 @@ using namespace llvm::object;</div><div> </div><div> namespace {</div><div> </div><div>+static inline</div><div>+error_code Check(error_code Err) {</div><div>+  if (Err) {</div><div>+    report_fatal_error(Err.message());</div><div>+  }</div><div>+  return Err;</div><div>+}</div><div>+</div><div> template<support::endianness target_endianness, bool is64Bits></div><div> class DyldELFObject : public ELFObjectFile<target_endianness, is64Bits> {</div><div>   LLVM_ELF_IMPORT_TYPES(target_endianness, is64Bits)</div><div>@@ -343,6 +351,183 @@ void RuntimeDyldELF::resolveMIPSRelocation(uint8_t *LocalAddress,</div><div>    }</div><div> }</div><div> </div><div>+// Return the .TOC. section address to R_PPC64_TOC relocations.</div><div>+uint64_t RuntimeDyldELF::findPPC64TOC() const</div><div>+{</div><div>+  // The TOC consists of sections .got, .toc, .tocbss, .plt in that</div><div>+  // order. The TOC starts where the first of these sections starts.</div><div>+  SectionList::const_iterator it = Sections.begin();</div><div>+  for (; it != Sections.end(); ++it) {</div><div>+    if ((*it).Name == ".got")</div></blockquote><div><br></div><div>LLVM style is to use the "->" operator here. e.g., "it->Name".</div><br><blockquote type="cite"><div>+      break;</div><div>+    if ((*it).Name == ".toc")</div><div>+      break;</div><div>+    if ((*it).Name == ".tocbss")</div><div>+      break;</div><div>+    if ((*it).Name == ".plt")</div><div>+      break;</div><div>+  }</div><div>+  if (it == Sections.end()) {</div><div>+    // This may happen for</div><div>+    // * references to TOC base base (sym@toc, .odp relocation) without</div><div>+    // a .toc directive.</div><div>+    // In this case lets just use the first section (which is usually</div></blockquote><div><br></div><div>Can omit "lets" here. If you prefer w/ it, it's missing an apostrophe (i.e., "let's").</div><br><blockquote type="cite"><div>+    // the .odp) since the code won't reference the .toc base</div><div>+    // directly.</div><div>+    it = Sections.begin();</div><div>+  }</div><div>+  assert (it != Sections.end());</div><div>+  // Per the ppc64-elf-linux ABI, The TOC base if TOC value plus 0x8000</div><div>+  // thus permitting a full 64 Kbytes segment.</div><div>+  return (*it).LoadAddress + 0x8000;</div><div>+}</div><div>+</div><div>+// Returns the sections and offset associated with the ODP entry referenced</div><div>+// by Symbol.</div><div>+void RuntimeDyldELF::findOPDEntrySection(ObjectImage &Obj,</div><div>+                                         ObjSectionToIDMap &LocalSections,</div><div>+                                         RelocationValueRef &Rel)</div><div>+{</div></blockquote><div><br></div><div>Open brace goes on the same line as the close paren of the decl.</div><br><blockquote type="cite"><div>+  // Get the ELF symbol value (st_value) to compare with Relocation offset in</div><div>+  // .opd entries</div><div>+</div><div>+  error_code err;</div><div>+  for (section_iterator si = Obj.begin_sections(),</div><div>+     se = Obj.end_sections(); si != se; si.increment(err)) {</div><div>+    StringRef SectionName;</div><div>+    Check(si->getName(SectionName));</div><div>+    if (SectionName != ".opd")</div><div>+      continue;</div><div>+</div><div>+    for (relocation_iterator i = si->begin_relocations(),</div><div>+         e = si->end_relocations(); i != e;) {</div><div>+      Check(err);</div><div>+</div><div>+      // The R_PPC64_ADDR64 relocation indicates the first field</div><div>+      // of a .opd entry</div><div>+      uint64_t TypeFunc;</div><div>+      Check(i->getType(TypeFunc));</div><div>+      if (TypeFunc != ELF::R_PPC64_ADDR64) {</div><div>+        i.increment(err);</div><div>+        continue;</div><div>+      }</div><div>+</div><div>+      SymbolRef TargetSymbol;</div><div>+      Check(i->getSymbol(TargetSymbol));</div><div>+      uint64_t TargetSymbolOffset;</div><div>+      Check(i->getOffset(TargetSymbolOffset));</div><div>+      int64_t TargetAdditionalInfo;</div><div>+      Check(i->getAdditionalInfo(TargetAdditionalInfo));</div><div>+</div><div>+      i = i.increment(err);</div><div>+      if (i == e)</div><div>+        break;</div><div>+      Check(err);</div><div>+</div><div>+      // Just check if following relocation is a R_PPC64_TOC</div><div>+      uint64_t TypeTOC;</div><div>+      Check(i->getType(TypeTOC));</div><div>+      if (TypeTOC != ELF::R_PPC64_TOC)</div><div>+        continue;</div><div>+</div><div>+      // Finally compares the Symbol value and the target symbol offset</div><div>+      // to check if this .opd entry refers to the symbol the relocation</div><div>+      // points to.</div><div>+      if (Rel.Addend != (intptr_t)TargetSymbolOffset)</div><div>+        continue;</div><div>+</div><div>+      section_iterator tsi(Obj.end_sections());</div><div>+      Check(TargetSymbol.getSection(tsi));</div><div>+      Rel.SectionID = findOrEmitSection(Obj, (*tsi), true, LocalSections);</div><div>+      Rel.Addend = (intptr_t)TargetAdditionalInfo;</div><div>+      return;</div><div>+    }</div><div>+  }</div><div>+  llvm_unreachable("Attempting to get address of ODP entry!");</div><div>+}</div><div>+</div><div>+static inline</div><div>+uint16_t ppc_lo (uint64_t value)</div><div>+{</div><div>+  return value & 0xffff;</div><div>+}</div><div>+</div><div>+static inline</div><div>+uint16_t ppc_hi (uint64_t value)</div><div>+{</div><div>+  return (value >> 16) & 0xffff;</div><div>+}</div><div>+</div><div>+static inline</div><div>+uint16_t ppc_higher (uint64_t value)</div><div>+{</div><div>+  return (value >> 32) & 0xffff;</div><div>+}</div><div>+</div><div>+static inline</div><div>+uint16_t ppc_highest (uint64_t value)</div><div>+{</div><div>+  return (value >> 48) & 0xffff;</div><div>+}</div></blockquote><div><br></div><div>The names for these functions are a) ambiguous and b) not following LLVM's naming guidelines. Please review: <a href="http://llvm.org/docs/CodingStandards.html#coding-standards">http://llvm.org/docs/CodingStandards.html#coding-standards</a></div><br><blockquote type="cite"><div>+</div><div>+void RuntimeDyldELF::resolvePPC64Relocation(uint8_t *LocalAddress,</div><div>+<span class="Apple-tab-span" style="white-space:pre">                                 </span>    uint64_t FinalAddress,</div><div>+<span class="Apple-tab-span" style="white-space:pre">                                        </span>    uint64_t Value,</div><div>+<span class="Apple-tab-span" style="white-space:pre">                                       </span>    uint32_t Type,</div><div>+<span class="Apple-tab-span" style="white-space:pre">                                        </span>    int64_t Addend) {</div><div>+  uint64_t* RelocAddr = (uint64_t*)LocalAddress;</div><div>+  switch (Type) {</div><div>+  default:</div><div>+    llvm_unreachable("Relocation type not implemented yet!");</div><div>+  break;</div><div>+  case ELF::R_PPC64_ADDR16_LO :</div><div>+    *((uint16_t*)RelocAddr+1) = ppc_lo (Value + Addend);</div></blockquote><div><br></div>LocalAddress is not guaranteed to be 16-bit aligned. Ditto on below references.</div><div><br><blockquote type="cite"><div>+    break;</div><div>+  case ELF::R_PPC64_ADDR16_HI :</div><div>+    *((uint16_t*)RelocAddr+1) = ppc_hi (Value + Addend);</div><div>+    break;</div><div>+  case ELF::R_PPC64_ADDR16_HIGHER :</div><div>+    *((uint16_t*)RelocAddr+1) = ppc_higher (Value + Addend);</div><div>+    break;</div><div>+  case ELF::R_PPC64_ADDR16_HIGHEST :</div><div>+    *((uint16_t*)RelocAddr+1) = ppc_highest (Value + Addend);</div><div>+    break;</div><div>+  case ELF::R_PPC64_ADDR14 :</div><div>+    {</div><div>+      assert(((Value + Addend) & 3) == 0);</div><div>+      uint16_t *insn = ((uint16_t*)RelocAddr+1);</div><div>+      *insn = (*insn & 3) | ((Value + Addend) & 0xfffc);</div><div>+    } break;</div><div>+  case ELF::R_PPC64_REL24 :</div><div>+    {</div><div>+      int32_t delta = static_cast<int32_t>(Value - FinalAddress + Addend);</div><div>+      if (SignExtend32<24>(delta) != delta)</div><div>+        llvm_unreachable("Relocation R_PPC64_REL24 overflow");</div><div>+      // Generates a 'bl <address>' instruction</div><div>+      *(uint32_t*)(RelocAddr) = 0x48000001 | (delta & 0x03FFFFFC);</div><div>+    } break;</div><div>+  case ELF::R_PPC64_ADDR64 :</div><div>+    *RelocAddr = Value + Addend;</div><div>+    break;</div><div>+  case ELF::R_PPC64_TOC :</div><div>+    *RelocAddr = findPPC64TOC();</div><div>+    break;</div><div>+  case ELF::R_PPC64_TOC16 :</div><div>+    {</div><div>+      uint64_t TOCStart = findPPC64TOC();</div><div>+      Value = ppc_lo((Value + Addend) - TOCStart);</div><div>+      *((uint16_t*)RelocAddr) = ppc_lo (Value);</div><div>+    } break;</div><div>+  case ELF::R_PPC64_TOC16_DS :</div><div>+    {</div><div>+      uint64_t TOCStart = findPPC64TOC();</div><div>+      Value = ((Value + Addend) - TOCStart);</div><div>+      *((uint16_t*)RelocAddr) = ppc_lo (Value);</div><div>+    } break;</div><div>+  }</div><div>+}</div><div>+</div><div>+</div><div> void RuntimeDyldELF::resolveRelocation(uint8_t *LocalAddress,</div><div>                                        uint64_t FinalAddress,</div><div>                                        uint64_t Value,</div><div>@@ -369,6 +554,9 @@ void RuntimeDyldELF::resolveRelocation(uint8_t *LocalAddress,</div><div>                           (uint32_t)(Value & 0xffffffffL), Type,</div><div>                           (uint32_t)(Addend & 0xffffffffL));</div><div>     break;</div><div>+  case Triple::ppc64:</div><div>+    resolvePPC64Relocation(LocalAddress, FinalAddress, Value, Type, Addend);</div><div>+    break;</div><div>   default: llvm_unreachable("Unsupported CPU type!");</div><div>   }</div><div> }</div><div>@@ -393,6 +581,8 @@ void RuntimeDyldELF::processRelocationRef(const ObjRelocationInfo &Rel,</div><div>   RelocationValueRef Value;</div><div>   // First search for the symbol in the local symbol table</div><div>   SymbolTableMap::const_iterator lsi = Symbols.find(TargetName.data());</div><div>+  SymbolRef::Type SymType;</div><div>+  Symbol.getType(SymType);</div><div>   if (lsi != Symbols.end()) {</div><div>     Value.SectionID = lsi->second.first;</div><div>     Value.Addend = lsi->second.second;</div><div>@@ -404,8 +594,6 @@ void RuntimeDyldELF::processRelocationRef(const ObjRelocationInfo &Rel,</div><div>       Value.SectionID = gsi->second.first;</div><div>       Value.Addend = gsi->second.second;</div><div>     } else {</div><div>-      SymbolRef::Type SymType;</div><div>-      Symbol.getType(SymType);</div><div>       switch (SymType) {</div><div>         case SymbolRef::ST_Debug: {</div><div>           // TODO: Now ELF SymbolRef::ST_Debug = STT_SECTION, it's not obviously</div><div>@@ -513,6 +701,93 @@ void RuntimeDyldELF::processRelocationRef(const ObjRelocationInfo &Rel,</div><div>                         Section.StubOffset, RelType, 0);</div><div>       Section.StubOffset += getMaxStubSize();</div><div>     }</div><div>+  } else if (Arch == Triple::ppc64) {</div><div>+    if (RelType == ELF::R_PPC64_REL24) {</div><div>+      // A PPC branch relocation will need a stub function if the target is</div><div>+      // an external symbol (Symbol::ST_Unknown) or if the target address</div><div>+      // is not within the signed 24-bits branch address.</div><div>+      SectionEntry &Section = Sections[Rel.SectionID];</div><div>+      uint8_t *Target = Section.Address + Rel.Offset;</div><div>+      bool RangeOverflow = false;</div><div>+      if (SymType != SymbolRef::ST_Unknown) {</div><div>+        // A function call may points to the .opd entry, so the final symbol value</div><div>+        // in calculated based in the relocation values in .opd section.</div><div>+        findOPDEntrySection(Obj, ObjSectionToID, Value);</div><div>+        uint8_t *RelocTarget = Sections[Value.SectionID].Address + Value.Addend;</div><div>+        int32_t delta = static_cast<int32_t>(Target - RelocTarget);</div><div>+        // If it is within 24-bits branch range, just set the branch target</div><div>+        if (SignExtend32<24>(delta) == delta) {</div><div>+          RelocationEntry RE(Rel.SectionID, Rel.Offset, RelType, Value.Addend);</div><div>+          if (Value.SymbolName)</div><div>+            addRelocationForSymbol(RE, Value.SymbolName);</div><div>+          else</div><div>+            addRelocationForSection(RE, Value.SectionID);</div><div>+        } else {</div><div>+          RangeOverflow = true;</div><div>+        }</div><div>+      }</div><div>+      if (SymType == SymbolRef::ST_Unknown || RangeOverflow == true) {</div><div>+        // It is an external symbol (SymbolRef::ST_Unknown) or within a range</div><div>+        // larger than 24-bits.</div><div>+        StubMap::const_iterator i = Stubs.find(Value);</div><div>+        if (i != Stubs.end()) {</div><div>+          // Symbol function stub already created, just relocate to it</div><div>+          resolveRelocation(Target, (uint64_t)Target, (uint64_t)Section.Address</div><div>+                            + i->second, RelType, 0);</div><div>+          DEBUG(dbgs() << " Stub function found\n");</div><div>+        } else {</div><div>+          // Create a new stub function.</div><div>+          DEBUG(dbgs() << " Create a new stub function\n");</div><div>+          Stubs[Value] = Section.StubOffset;</div><div>+          uint8_t *StubTargetAddr = createStubFunction(Section.Address +</div><div>+                                                       Section.StubOffset);</div><div>+          RelocationEntry RE(Rel.SectionID, StubTargetAddr - Section.Address,</div><div>+                             ELF::R_PPC64_ADDR64, Value.Addend);</div><div>+</div><div>+          // Generates the 64-bits address loads as exemplified in section</div><div>+          // 4.5.1 in PPC64 ELF ABI.</div><div>+          RelocationEntry REhst(Rel.SectionID,</div><div>+                                StubTargetAddr - Section.Address,</div><div>+                                ELF::R_PPC64_ADDR16_HIGHEST, Value.Addend);</div><div>+          RelocationEntry REhr(Rel.SectionID,</div><div>+                               StubTargetAddr - Section.Address + 4,</div><div>+                               ELF::R_PPC64_ADDR16_HIGHER, Value.Addend);</div><div>+          RelocationEntry REh(Rel.SectionID,</div><div>+                              StubTargetAddr - Section.Address + 12,</div><div>+                              ELF::R_PPC64_ADDR16_HI, Value.Addend);</div><div>+          RelocationEntry REl(Rel.SectionID,</div><div>+                              StubTargetAddr - Section.Address + 16,</div><div>+                              ELF::R_PPC64_ADDR16_LO, Value.Addend);</div><div>+</div><div>+          if (Value.SymbolName) {</div><div>+            addRelocationForSymbol(REhst, Value.SymbolName);</div><div>+            addRelocationForSymbol(REhr,  Value.SymbolName);</div><div>+            addRelocationForSymbol(REh,   Value.SymbolName);</div><div>+            addRelocationForSymbol(REl,   Value.SymbolName);</div><div>+          } else {</div><div>+            addRelocationForSection(REhst, Value.SectionID);</div><div>+            addRelocationForSection(REhr,  Value.SectionID);</div><div>+            addRelocationForSection(REh,   Value.SectionID);</div><div>+            addRelocationForSection(REl,   Value.SectionID);</div><div>+          }</div><div>+</div><div>+          resolveRelocation(Target, (uint64_t)Target, (uint64_t)Section.Address</div><div>+                            + Section.StubOffset, RelType, 0);</div><div>+          if (SymType == SymbolRef::ST_Unknown)</div><div>+            // Restore the TOC for external calls</div><div>+            *((uint32_t*)Target+1) = 0xE8410028;  // ld r2,40(r1)</div><div>+          Section.StubOffset += getMaxStubSize();</div><div>+        }</div><div>+      }</div><div>+    } else {</div><div>+      RelocationEntry RE(Rel.SectionID, Rel.Offset, RelType, Value.Addend);</div><div>+      // Extra check to avoid relocation againt empty symbols (usually</div><div>+      // the R_PPC64_TOC).</div><div>+      if (Value.SymbolName && !TargetName.empty())</div><div>+        addRelocationForSymbol(RE, Value.SymbolName);</div><div>+      else</div><div>+        addRelocationForSection(RE, Value.SectionID);</div><div>+    }</div><div>   } else {</div><div>     RelocationEntry RE(Rel.SectionID, Rel.Offset, RelType, Value.Addend);</div><div>     if (Value.SymbolName)</div><div>diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h</div><div>index eade49e..997351b 100644</div><div>--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h</div><div>+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h</div><div>@@ -48,6 +48,12 @@ protected:</div><div>                              uint32_t Type,</div><div>                              int32_t Addend);</div><div> </div><div>+  void resolvePPC64Relocation(uint8_t *LocalAddress,</div><div>+                              uint64_t FinalAddress,</div><div>+                              uint64_t Value,</div><div>+                              uint32_t Type,</div><div>+                              int64_t Addend);</div><div>+</div><div>   virtual void resolveRelocation(uint8_t *LocalAddress,</div><div>                                  uint64_t FinalAddress,</div><div>                                  uint64_t Value,</div><div>@@ -63,6 +69,11 @@ protected:</div><div>   virtual ObjectImage *createObjectImage(const MemoryBuffer *InputBuffer);</div><div>   virtual void handleObjectLoaded(ObjectImage *Obj);</div><div> </div><div>+  uint64_t findPPC64TOC() const;</div><div>+  void findOPDEntrySection(ObjectImage &Obj,</div><div>+                           ObjSectionToIDMap &LocalSections,</div><div>+                           RelocationValueRef &Rel);</div><div>+</div><div> public:</div><div>   RuntimeDyldELF(RTDyldMemoryManager *mm)</div><div>       : RuntimeDyldImpl(mm), LoadedObject(0) {}</div><div>diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h</div><div>index b29ff40..47807eb 100644</div><div>--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h</div><div>+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h</div><div>@@ -166,6 +166,8 @@ protected:</div><div>       return 8; // 32-bit instruction and 32-bit address</div><div>     else if (Arch == Triple::mipsel)</div><div>       return 16;</div><div>+    else if (Arch == Triple::ppc64)</div><div>+      return 44;</div><div>     else</div><div>       return 0;</div><div>   }</div><div>-- </div><div>1.7.1</div><div><br></div></blockquote><div><div><div>On Sep 17, 2012, at 1:21 PM, Adhemerval Zanella <<a href="mailto:azanella@linux.vnet.ibm.com">azanella@linux.vnet.ibm.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">This is the initial support of MCJIT for PPC64-elf-abi. I didn't add any testcase<br>because I focused on existing ones. It correctly runs the following ones:<br><br>ExecutionEngine/2003-01-04-ArgumentBug.ll<br>ExecutionEngine/2003-01-04-LoopTest.ll<br>ExecutionEngine/2003-01-04-PhiTest.ll<br>ExecutionEngine/2003-01-09-SARTest.ll<br>ExecutionEngine/2003-01-10-FUCOM.ll<br>ExecutionEngine/2003-01-15-AlignmentTest.ll<br>ExecutionEngine/2003-05-11-PHIRegAllocBug.ll<br>ExecutionEngine/2003-06-04-bzip2-bug.ll<br>ExecutionEngine/2003-06-05-PHIBug.ll<br>ExecutionEngine/2003-08-15-AllocaAssertion.ll<br>ExecutionEngine/2003-08-21-EnvironmentTest.ll<br>ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll<br>ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll<br>ExecutionEngine/simplesttest.ll<br>ExecutionEngine/simpletest.ll<br>ExecutionEngine/stubs.ll<br>ExecutionEngine/test-arith.ll<br>ExecutionEngine/test-branch.ll<br>ExecutionEngine/test-call-no-external-funcs.ll<br>ExecutionEngine/test-cast.ll<br>ExecutionEngine/test-common-symbols.ll<br>ExecutionEngine/test-constantexpr.ll<br>ExecutionEngine/test-fp-no-external-funcs.ll<br>ExecutionEngine/test-fp.ll<br>ExecutionEngine/test-global-init-nonzero.ll<br>ExecutionEngine/test-global.ll<br>ExecutionEngine/test-loadstore.ll<br>ExecutionEngine/test-local.ll<br>ExecutionEngine/test-logical.ll<br>ExecutionEngine/test-loop.ll<br>ExecutionEngine/test-phi.ll<br>ExecutionEngine/test-ret.ll<br>ExecutionEngine/test-return.ll<br>ExecutionEngine/test-setcond-fp.ll<br>ExecutionEngine/test-setcond-int.ll<br>ExecutionEngine/test-shift.ll      <br><br>-- <br>Adhemerval Zanella Netto<br>  Software Engineer<br>  Linux Technology Center Brazil<br>  Toolchain / GLIBC on Power Architecture<br>  <a href="mailto:azanella@linux.vnet.ibm.com">azanella@linux.vnet.ibm.com</a> / <a href="mailto:azanella@br.ibm.com">azanella@br.ibm.com</a><br>  +55 61 8642-9890<br><br><span><0010-Initial-support-for-PowerPC64-MCJIT.patch></span>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></div></div></body></html>