[MCJIT] Fix a debugging-output formatting bug in RuntimeDyld.
authorLang Hames <lhames@gmail.com>
Thu, 18 Sep 2014 16:43:24 +0000 (16:43 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 18 Sep 2014 16:43:24 +0000 (16:43 +0000)
The mismatched mask (7 vs (ColsPerRow-1)) could lead to partial lines being
printed out of place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218061 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp

index fd276e6..fafd395 100644 (file)
@@ -50,7 +50,7 @@ static void dumpSectionMemory(const SectionEntry &S, StringRef State) {
   uint8_t *DataAddr = S.Address;
   uint64_t LoadAddr = S.LoadAddress;
 
-  unsigned StartPadding = LoadAddr & 7;
+  unsigned StartPadding = LoadAddr & (ColsPerRow - 1);
   unsigned BytesRemaining = S.Size;
 
   if (StartPadding) {