[PATCH] [Mips64] Add support for MCJIT for MIPS64r2 and MIPS64r6

Vladimir Radosavljevic vladimir.radosavljevic at rt-rk.com
Fri May 15 09:53:09 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h:124-139
@@ -116,2 +123,18 @@
 
+  // Apply relocation in instruction
+  bool applyRelocation;
+
+  // True if using the result of the previous relocation type
+  bool useCalculatedValue;
+
+  // The result of the previous relocation type
+  int64_t calculatedValue;
+
+  // A map from section to a GOT section that has entries for section's GOT
+  // relocations.
+  DenseMap<SID, SID> SectionToGOTMap;
+
+  // A map to avoid duplicate got entries
+  StringMap<uint64_t> GOTSymbolOffsets;
+
   // When a module is loaded we save the SectionID of the EH frame section
----------------
lhames wrote:
> Could you please note in the comments that these data structures are MIPS64 specific? At some point in the future we would like to split RuntimeDyldELF into multiple target-specific subclasses along the same lines as RuntimeDyldMachO. When that happens it will be very helpful to know that these data structures can be moved into the RuntimeDyldELF_MIPS64 subclass. 
Done.

================
Comment at: unittests/ExecutionEngine/MCJIT/MCJITTestBase.h:295
@@ -294,3 +294,3 @@
     // The architectures below are known to be compatible with MCJIT as they
     // are copied from test/ExecutionEngine/MCJIT/lit.local.cfg and should be
     // kept in sync.
----------------
dsanders wrote:
> I think the answer is 'no' but: Does test/ExecutionEngine/MCJIT/lit.local.cfg need updating?
We don't have to change test/ExecutionEngine/MCJIT/lit.local.cfg, because 'Mips' contains all Mips triples.
You can see that in autoconf/configure.ac.
```
  mips-* | mips64-*)      host_arch="Mips" ;;
  mipsel-* | mips64el-*)  host_arch="Mips" ;;

```

http://reviews.llvm.org/D9667

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






More information about the llvm-commits mailing list