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

Vladimir Radosavljevic via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 06:05:58 PDT 2015


vradosavljevic added inline comments.

================
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;
   }
----------------
dsanders wrote:
> 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.
Yes, we should warn.


Repository:
  rL LLVM

http://reviews.llvm.org/D11217





More information about the llvm-commits mailing list