Skip to content

Conversation

kunalspathak
Copy link
Contributor

follow-up to #112799 (comment)

@Copilot Copilot AI review requested due to automatic review settings February 22, 2025 14:54
Copy link
Contributor

@Copilot Copilot AI left a comment

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

@ghost ghost 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
Contributor 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
Contributor 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
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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