[PATCH] D11217: [mips64][mcjit] Add test for MIPS64R6 relocations, and change some check expressions in MIPS64R2 test.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 06:26:35 PDT 2015


dsanders accepted this revision.
dsanders added a comment.
This revision is now accepted and ready to land.

LGTM

From the commit message:

> changes some check expressions in MIPS64R2 test


Could you say 'correct' instead of change and summarize the correction?


================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:684
@@ -683,3 +683,3 @@
     uint64_t FinalAddress = (Section.LoadAddress + Offset);
-    return ((Value + Addend - ((FinalAddress | 7) ^ 7)) >> 3) & 0x3ffff;
+    return ((Value + Addend - (FinalAddress & ~0x7)) >> 3) & 0x3ffff;
   }
----------------
This isn't for this patch just something I thought of while reading:

Should we warn if the 'x & ~0x7' masks any bits? I think we should. Likewise for the 'x & 0x3' cases.


Repository:
  rL LLVM

http://reviews.llvm.org/D11217





More information about the llvm-commits mailing list