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

add follow-up assert during unwinding #112817

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

kunalspathak
Copy link
Member

follow-up to #112799 (comment)

@Copilot Copilot bot review requested due to automatic review settings February 22, 2025 14:54

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • src/coreclr/jit/unwindamd64.cpp: Language not supported
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 22, 2025
@kunalspathak
Copy link
Member Author

Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

assert(genIsValidIntReg(reg));
unwindRegNum = reg;
}
assert(unwindRegNum <= 15);
Copy link
Member

Choose a reason for hiding this comment

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

Is this correct?

We have 32 float registers with AVX512 and can have up to 32 general-purpose registers with APX.

If we're relying on something like this only being non-volatile registers, then I'd think we want a comment explaining that.

Copy link
Member

Choose a reason for hiding this comment

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

OpInfo only has 4 bits, so it can only fit up to 15, so if there were ever callee-saves with a higher index it would also need some other unwind code.

Copy link
Member Author

Choose a reason for hiding this comment

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

From this link

We propose to define the new GPRs as caller-saved (volatile) states in application binary interfaces (ABIs), facilitating interoperability with legacy binaries.

The callee-saved state is unchanged, but will add a comment that @tannergooding asked.

@kunalspathak kunalspathak merged commit 39c94e0 into dotnet:main Feb 26, 2025
104 of 112 checks passed
@kunalspathak kunalspathak deleted the unwind-apx-assert branch February 26, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants