Skip to content

Commit ead19a3

Browse files
authored
Add idIsBound() check in emitDispJumpList() (#71086)
* Add idIsBound() check in emitDispJumpList() * Simpler code
1 parent 11b746a commit ead19a3

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

src/coreclr/jit/emit.cpp

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3894,29 +3894,33 @@ void emitter::emitDispJumpList()
38943894
unsigned int jmpCount = 0;
38953895
for (instrDescJmp* jmp = emitJumpList; jmp != nullptr; jmp = jmp->idjNext)
38963896
{
3897-
#if defined(TARGET_ARM64)
3898-
if ((jmp->idInsFmt() == IF_LARGEADR) || (jmp->idInsFmt() == IF_LARGELDC))
3899-
{
3900-
printf("IG%02u IN%04x %3s[%u] -> %s\n", jmp->idjIG->igNum, jmp->idDebugOnlyInfo()->idNum,
3901-
codeGen->genInsDisplayName(jmp), jmp->idCodeSize(), getRegName(jmp->idReg1()));
3902-
}
3903-
else
3897+
printf("IG%02u IN%04x %3s[%u]", jmp->idjIG->igNum, jmp->idDebugOnlyInfo()->idNum,
3898+
codeGen->genInsDisplayName(jmp), jmp->idCodeSize());
3899+
3900+
if (!jmp->idIsBound())
39043901
{
3905-
printf("IG%02u IN%04x %3s[%u] -> IG%02u\n", jmp->idjIG->igNum, jmp->idDebugOnlyInfo()->idNum,
3906-
codeGen->genInsDisplayName(jmp), jmp->idCodeSize(),
3907-
((insGroup*)emitCodeGetCookie(jmp->idAddr()->iiaBBlabel))->igNum);
3908-
}
3902+
3903+
#if defined(TARGET_ARM64)
3904+
if ((jmp->idInsFmt() == IF_LARGEADR) || (jmp->idInsFmt() == IF_LARGELDC))
3905+
{
3906+
printf(" -> %s", getRegName(jmp->idReg1()));
3907+
}
3908+
else
3909+
{
3910+
printf(" -> IG%02u", ((insGroup*)emitCodeGetCookie(jmp->idAddr()->iiaBBlabel))->igNum);
3911+
}
39093912
#else
3910-
printf("IG%02u IN%04x %3s[%u] -> IG%02u %s\n", jmp->idjIG->igNum, jmp->idDebugOnlyInfo()->idNum,
3911-
codeGen->genInsDisplayName(jmp), jmp->idCodeSize(),
3912-
((insGroup*)emitCodeGetCookie(jmp->idAddr()->iiaBBlabel))->igNum,
3913+
printf(" -> IG%02u", ((insGroup*)emitCodeGetCookie(jmp->idAddr()->iiaBBlabel))->igNum);
3914+
39133915
#if defined(TARGET_XARCH)
3914-
jmp->idjIsRemovableJmpCandidate ? " ; removal candidate" : ""
3915-
#else
3916-
""
3917-
#endif
3918-
);
3919-
#endif
3916+
if (jmp->idjIsRemovableJmpCandidate)
3917+
{
3918+
printf(" ; removal candidate");
3919+
}
3920+
#endif // TARGET_XARCH
3921+
#endif // !TARGET_ARM64
3922+
}
3923+
printf("\n");
39203924
jmpCount += 1;
39213925
}
39223926
printf(" total jump count: %u\n", jmpCount);

0 commit comments

Comments
 (0)