[PATCH] [mips64] Add support for MCJIT for MIPS64

Daniel Sanders daniel.sanders at imgtec.com
Mon Dec 22 09:29:42 PST 2014


I recently decided to try a mips64 native build and found that there's only two kinds of 'make check-all' failures for this build at the moment. One of them is the lack of an MCJIT which this patch addresses. I've submitted a patch for the other.

I'll wait for a version of this patch that accounts for Lang's comments before reviewing in detail but there's a couple high-level comments I'd like to add.


================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:1121-1129
@@ -919,7 +1120,11 @@
     break;
   case Triple::mips: // Fall through.
   case Triple::mipsel:
     resolveMIPSRelocation(Section, Offset, (uint32_t)(Value & 0xffffffffL),
                           Type, (uint32_t)(Addend & 0xffffffffL));
     break;
+  case Triple::mips64:
+  case Triple::mips64el:
+    resolveMIPS64Relocation(Section, Offset, Value, Type, Addend, SectionID);
+    break;
   case Triple::ppc64: // Fall through.
----------------
We should take the ABI from the ELF e_flags (like PPC64 does) rather than from the triple. It should be possible to use all ABI's on all mips triples (e.g. N32 on a mips triple with -mcpu=mips64, or O32 on a mips64 triple). Admittedly this doesn't work right now but we're working on fixing it.

On a related note, this patch doesn't seem to distinguish N32 and N64. It looks like you're implementing N64 and silently treating N32 as if it were N64.

http://reviews.llvm.org/D5913

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list