Skip to content

Commit

Permalink
Disable converting nop padding to breakpoints for arm64 under jit str…
Browse files Browse the repository at this point in the history
…ess.

Workaround for issue dotnet#61944.
  • Loading branch information
AndyAyersMS committed Nov 23, 2021
1 parent 1997bee commit be2ec77
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/coreclr/jit/emitarm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11457,18 +11457,18 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp)
#ifdef DEBUG
// Under STRESS_EMITTER, if this is the 'align' before the 'jmp' instruction,
// then add "bkpt" instruction.
instrDescAlign* alignInstr = (instrDescAlign*)id;

if (emitComp->compStressCompile(Compiler::STRESS_EMITTER, 50) &&
(alignInstr->idaIG != alignInstr->idaLoopHeadPredIG) && !skipIns)
{
// There is no good way to squeeze in "bkpt" as well as display it
// in the disassembly because there is no corresponding instrDesc for
// it. As such, leave it as is, the "0xD43E0000" bytecode will be seen
// next to the nop instruction in disasm.
// e.g. D43E0000 align [4 bytes for IG07]
ins = INS_BREAKPOINT;
}
// instrDescAlign* alignInstr = (instrDescAlign*)id;

// if (emitComp->compStressCompile(Compiler::STRESS_EMITTER, 50) &&
// (alignInstr->idaIG != alignInstr->idaLoopHeadPredIG) && !skipIns)
// {
// // There is no good way to squeeze in "bkpt" as well as display it
// // in the disassembly because there is no corresponding instrDesc for
// // it. As such, leave it as is, the "0xD43E0000" bytecode will be seen
// // next to the nop instruction in disasm.
// // e.g. D43E0000 align [4 bytes for IG07]
// ins = INS_bkpt;
// }
#endif
}
#endif // FEATURE_LOOP_ALIGN
Expand Down

0 comments on commit be2ec77

Please sign in to comment.