JIT: Add support for struct returns from Swift reverse pinvokes#100091
Merged
jakobbotsch merged 37 commits intodotnet:mainfrom Mar 23, 2024
Merged
JIT: Add support for struct returns from Swift reverse pinvokes#100091jakobbotsch merged 37 commits intodotnet:mainfrom
jakobbotsch merged 37 commits intodotnet:mainfrom
Conversation
Member
Author
|
/azp run runtime-coreclr jitstress, runtime-coreclr jitstressregs, runtime-coreclr jitstress2-jitstressregs |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Member
Author
|
cc @dotnet/jit-contrib PTAL @amanasifkhalid Failures look like #99810 and other known failures |
amanasifkhalid
approved these changes
Mar 22, 2024
| { | ||
| printf("Swift compilation returns %s as %d primitive(s) in registers\n", | ||
| typGetObjLayout(retTypeHnd)->GetClassName(), lowering->numLoweredElements); | ||
| for (size_t i = 0; i < lowering->numLoweredElements; i++) |
Contributor
There was a problem hiding this comment.
I think we dump these lowered element types in a few places now, right? You may want to consider moving this logic to a helper method (though feel free to do that in a future PR).
Member
Author
There was a problem hiding this comment.
Yeah. Makes sense to factor this, let me do that in a follow-up.
Member
Author
|
Also FYI @jkoritzinsky and cc @jkotas for the stub change. |
jkotas
reviewed
Mar 22, 2024
jkotas
reviewed
Mar 22, 2024
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Member
|
The stub change LGTM |
This was referenced Mar 23, 2024
Closed
Member
Author
|
/azp run runtime |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the 10 tests to have some struct returns as well.
We also have to change the prestub to save
raxsince it's used as a register for the ret buffer in Swift calls.