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

JIT: Add support for SwiftIndirectResult in Swift calling convention #103570

Merged
merged 18 commits into from
Jun 18, 2024

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Jun 17, 2024

Add a test for pinvoke/reverse pinvokes involving SwiftIndirectResult, and add the necessary support to make the tests pass in RyuJIT.

@jakobbotsch jakobbotsch marked this pull request as ready for review June 17, 2024 16:01
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @amanasifkhalid

FYI @jkurdek @kotlarmilos @matouskozak

Copy link
Member

@amanasifkhalid amanasifkhalid left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@@ -2118,7 +2137,7 @@ void Compiler::impPopArgsForSwiftCall(GenTreeCall* call, CORINFO_SIG_INFO* sig,

// If using SwiftError*, spill entire stack as we will need to reuse the
// error argument after the call.
if (checkEntireStack)
if (spillStack)
Copy link
Member

Choose a reason for hiding this comment

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

Could you update this comment to mention the SwiftIndirectResult case, please?

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved the existing comment up to where we assign spillStack in the SwiftError* case instead (there is already a comment on the new spillStack = true I added)

@jakobbotsch jakobbotsch merged commit 35437dd into dotnet:main Jun 18, 2024
108 of 113 checks passed
@jakobbotsch jakobbotsch deleted the swift-indirect-result branch June 18, 2024 13:58
@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants