Skip to content

Commit 8ed7f57

Browse files
authored
Fix comments in asm with JitDiffableDasm=1 (#56416)
* Avoid asserts in DasmDiffable mode * simplify * Make formatter happier * Address feedback
1 parent 7424613 commit 8ed7f57

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/coreclr/jit/emit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3936,7 +3936,7 @@ void emitter::emitDispCommentForHandle(size_t handle, GenTreeFlags flag)
39363936
// NOTE: eGetCPString always returns nullptr on Linux/ARM
39373937
if (wstr == nullptr)
39383938
{
3939-
printf("%s string handle", commentPrefix);
3939+
str = "string handle";
39403940
}
39413941
else
39423942
{

src/coreclr/jit/emitxarch.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8851,6 +8851,7 @@ void emitter::emitDispIns(
88518851
else
88528852
{
88538853
PRINT_CONSTANT:
8854+
ssize_t srcVal = val;
88548855
// Munge any pointers if we want diff-able disassembly
88558856
if (emitComp->opts.disDiffable)
88568857
{
@@ -8872,8 +8873,7 @@ void emitter::emitDispIns(
88728873
{ // (val < 0)
88738874
printf("-0x%IX", -val);
88748875
}
8875-
8876-
emitDispCommentForHandle(val, id->idDebugOnlyInfo()->idFlags & GTF_ICON_HDL_MASK);
8876+
emitDispCommentForHandle(srcVal, id->idDebugOnlyInfo()->idFlags & GTF_ICON_HDL_MASK);
88778877
}
88788878
break;
88798879

0 commit comments

Comments
 (0)