Skip to content

Commit

Permalink
Avoid printing debug info on 0 byte instructions (dotnet#62077)
Browse files Browse the repository at this point in the history
In particular do not attach it to INS_align that do not end up producing
any code.
  • Loading branch information
jakobbotsch committed Nov 30, 2021
1 parent a47e5d1 commit 663e7b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/coreclr/jit/emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6413,7 +6413,8 @@ unsigned emitter::emitEndCodeGen(Compiler* comp,
size_t curInstrAddr = (size_t)cp;
instrDesc* curInstrDesc = id;

if ((emitComp->opts.disAsm || emitComp->verbose) && (JitConfig.JitDisasmWithDebugInfo() != 0))
if ((emitComp->opts.disAsm || emitComp->verbose) && (JitConfig.JitDisasmWithDebugInfo() != 0) &&
(id->idCodeSize() > 0))
{
UNATIVE_OFFSET curCodeOffs = emitCurCodeOffs(cp);
while (nextMapping != emitComp->genPreciseIPmappings.end())
Expand Down

0 comments on commit 663e7b4

Please sign in to comment.