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

calling convention tests #38

Open
pittma opened this issue Jul 9, 2019 · 1 comment
Open

calling convention tests #38

pittma opened this issue Jul 9, 2019 · 1 comment

Comments

@pittma
Copy link
Contributor

pittma commented Jul 9, 2019

We learned in debugging for #28, that without extern "C", Rust does not abide the aarch32 calling convention but instead, puts the parameters on the stack and a pointer to them in r0. With that in mind, consider one of the subtleties of aarch64's calling convention: If a "composite type" is greater or equal to 16 bytes (2 words) in size, then it shall go into the stack and a pointer to it into x0, otherwise, it can go into x0 and x1. Without extern "C", does Rust follow these rules? Or does it always do the pointer-into-the-stack method?

@mullr
Copy link
Collaborator

mullr commented Aug 15, 2019

Without extern "C", does Rust follow these rules? Or does it always do the pointer-into-the-stack method?

Whatever it happens to do, it's intentionally undefined, so we can't rely on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants