-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
JIT: Add support for struct returns from Swift reverse pinvokes #100091
JIT: Add support for struct returns from Swift reverse pinvokes #100091
Conversation
/azp run runtime-coreclr jitstress, runtime-coreclr jitstressregs, runtime-coreclr jitstress2-jitstressregs |
Azure Pipelines successfully started running 3 pipeline(s). |
cc @dotnet/jit-contrib PTAL @amanasifkhalid Failures look like #99810 and other known failures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
{ | ||
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++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Makes sense to factor this, let me do that in a follow-up.
Also FYI @jkoritzinsky and cc @jkotas for the stub change. |
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
The stub change LGTM |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
Update the 10 tests to have some struct returns as well.
We also have to change the prestub to save
rax
since it's used as a register for the ret buffer in Swift calls.