Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions src/coreclr/jit/emitarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6927,8 +6927,25 @@ void emitter::emitDispReg(regNumber reg, emitAttr attr, bool addComma)
{
if (isFloatReg(reg))
{
const char* size = attr == EA_8BYTE ? "d" : "s";
printf("%s%s", size, emitFloatRegName(reg, attr) + 1);
if (attr == EA_8BYTE)
{
unsigned regIndex = reg - REG_F0;
regIndex >>= 1;

if (regIndex < 10)
{
printf("d%c", regIndex + '0');
}
else
{
assert(regIndex < 100);
printf("d%c%c", (regIndex / 10), (regIndex % 10));
}
}
else
{
printf("s%s", emitFloatRegName(reg, attr) + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this side also incorrect? I could easily have misread the chain of calls, but it looked like emitFloatRegName is going to return "f" so it would be "sf", which doesn't seem right.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but since we do + 1, we remove the extra f character that gets printed. This portion is unchanged actually.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will just use something manual version of _itoa to convert from int -> string.

}
}
else
{
Expand Down