[PATCH] D31649: [mips] Adds support for R_MIPS_26, HIGHER, HIGHEST relocations in RuntimeDyld
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 11:07:42 PDT 2017
sdardis added inline comments.
================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp:874
return Addr;
+ } else if (IsMipsN32ABI || IsMipsN64ABI) {
+ // 0: 3c190000 lui t9,%hi(addr).
----------------
Shouldn't the N32ABI be reusing the O32 implementation, given it also has a 32 bit address space?
================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp:875-878
+ // 0: 3c190000 lui t9,%hi(addr).
+ // 4: 27390000 addiu t9,t9,%lo(addr).
+ // 8: 03200008 jr t9.
+ // c: 00000000 nop.
----------------
This comment is out of sync with the code below.
================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp:883
+ unsigned JrT9Instr = 0x03200008;
+ if ((AbiVariant & ELF::EF_MIPS_ARCH) == ELF::EF_MIPS_ARCH_32R6)
+ JrT9Instr = 0x03200009;
----------------
Shouldn't this be EF_MIPS_ARCH_64R6 ?
================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:1319
+
+ // Creating Hi and Lo relocations for the filled stub instructions.
+ RelocationEntry REHighest(SectionID, StubTargetAddr - Section.getAddress(),
----------------
// Creating Highest, Higher, Hi and Lo relocations for the filled stub instructions.
================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:1337-1338
+ addRelocationForSymbol(RELo, Value.SymbolName);
+ }
+ else {
+ addRelocationForSection(REHighest, Value.SectionID);
----------------
Formatting. This should be "} else {".
Repository:
rL LLVM
https://reviews.llvm.org/D31649
More information about the llvm-commits
mailing list