Fix instruction hex display (#54675)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Thu, 24 Jun 2021 17:25:54 +0000 (19:25 +0200)
committerGitHub <noreply@github.com>
Thu, 24 Jun 2021 17:25:54 +0000 (19:25 +0200)
src/coreclr/jit/emitxarch.cpp

index 6578232..a0a5e32 100644 (file)
@@ -8676,8 +8676,10 @@ void emitter::emitDispIns(
     if (code != nullptr)
     {
         /* Display the instruction hex code */
+        assert(((code >= emitCodeBlock) && (code < emitCodeBlock + emitTotalHotCodeSize)) ||
+               ((code >= emitColdCodeBlock) && (code < emitColdCodeBlock + emitTotalColdCodeSize)));
 
-        emitDispInsHex(id, code, sz);
+        emitDispInsHex(id, code + writeableOffset, sz);
     }
 
     /* Display the instruction name */