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

cranelift: Test calling across different calling conventions #4801

Merged
merged 2 commits into from
Aug 31, 2022

Conversation

afonso360
Copy link
Contributor

👋 Hey,

This is a continuation of the TODO items in #4667 . It looks like #4667 accidentally already enables us to mix calling conventions so we don't need to do anything except remove an unused error.

This is an important feature for #4566 since we decided to mark big/little endian behaviour via calling convention, so this allows us to write runtests for that.

@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Aug 27, 2022
Copy link
Contributor

@jameysharp jameysharp left a comment

Choose a reason for hiding this comment

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

Seems straightforward to me. @cfallin, do you have any concerns about calls between different calling conventions?

I imagine this new test would trivially pass if we accidentally ignore the calling convention specifier. Anyone have any thoughts on how we could detect that particular kind of bug?

Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me; one note below on the specific calling conventions chosen.


; Tests calling across different calling conventions

function %callee_fast_i64(i64) -> i64 fast {
Copy link
Member

Choose a reason for hiding this comment

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

fast and system_v are actually the same in practice right now -- perhaps we could try system_v and windows_fastcall ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That might not work on aarch64 and s390x, but we can try one of the wasmtime ones.

@jameysharp
Copy link
Contributor

This test still passes after merging with main. It's been a few days since CI ran so I thought I'd double-check.

@jameysharp jameysharp merged commit 2beaf73 into bytecodealliance:main Aug 31, 2022
@afonso360 afonso360 deleted the call-cc branch March 21, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants