Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix debug info emitted for VLT_STK_REG/VLT_FPSTK variable locations #98479

Merged
merged 2 commits into from
Feb 15, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ private static void DumpVarLocation(DwarfExpressionBuilder e, VarLoc loc)
break;
case VarLocType.VLT_STK:
case VarLocType.VLT_STK2:
case VarLocType.VLT_FPSTK:
case VarLocType.VLT_STK_BYREF:
e.OpBReg(loc.B, loc.C);
if (loc.LocationType == VarLocType.VLT_STK_BYREF)
Expand All @@ -531,11 +530,16 @@ private static void DumpVarLocation(DwarfExpressionBuilder e, VarLoc loc)
e.OpPiece();
break;
case VarLocType.VLT_STK_REG:
e.OpBReg(loc.C, loc.D);
e.OpBReg(loc.B, loc.C);
e.OpPiece();
e.OpReg(loc.B);
e.OpReg(loc.D);
e.OpPiece();
break;
case VarLocType.VLT_FPSTK:
// On ARM32 this is used to encode actual registers. This may be wrong for x86
// which we don't support anyway.
e.OpReg(loc.B);
Comment on lines +539 to +541
Copy link
Contributor

@SingleAccretion SingleAccretion Feb 15, 2024

Choose a reason for hiding this comment

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

I would expect this to be correct on x86 as well - the Jit never places anything but the return value on the actual FPU stack.

break;
default:
// Unsupported
Debug.Assert(loc.LocationType != VarLocType.VLT_FIXED_VA);
Expand Down