The new .NET 10 feature for passing struct fields in registers does not appear to be working as advertized
- Dominant language
- No language data
- Stars
- 4.8k
- Forks
- 6.1k
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 370
Description
### Type of issue
Code does not work
### Description
As documented in the following SO question:
https://stackoverflow.com/questions/79978180/why-does-net-10-jit-not-pass-struct-fields-in-registers-despite-physical-promot#comment141107350_79978180
I am not the author of this question but I have verified that it does not appear to be possible with the given steps to persuade the .NET 10 runtime into behaving as described.
### Page URL
https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-10/runtime#improved-code-generation-for-struct-arguments
### Content source URL
https://github.com/dotnet/docs/blob/main/docs/core/whats-new/dotnet-10/runtime.md
### Document Version Independent Id
64b4a915-2d72-9816-31a1-866ad593bb27
### Platform Id
489673e8-6332-c144-727a-e98fa5cea709
### Article author
@gewarren
### Metadata
* ID: 3357401d-36c1-995f-6b95-17865f4d58a5
* PlatformId: 489673e8-6332-c144-727a-e98fa5cea709
* Service: **dotnet-fundamentals**
[Related Issues](https://github.com/dotnet/docs/issues?q=is%3Aissue+is%3Aopen+64b4a915-2d72-9816-31a1-866ad593bb27)
Contributor guide
Research direction
Start with docs/core/whats-new/dotnet-10/runtime.md and its “Improved code generation for struct arguments” section, then reproduce the steps described in the linked Stack Overflow question. Compare the observed behavior with the article’s wording; done means the documentation accurately describes the supported behavior or clearly explains the limitation.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100