-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
RFC: SIMD vectors in FFI #2574
RFC: SIMD vectors in FFI #2574
Conversation
This seems like a straightforward, reasonable change. @rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
@rfcbot reviewed |
@gnzlbg Thanks! The implementation in rust-lang/rust#59238 doesn't seem all that complex so therefore: @rfcbot reviewed |
ping @Zoxc @varkor @withoutboats |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
Are architecture-specific vector types always passed in the vector registers in C ABIs or is that an x86-ism? I know ARM has lots of interesting ABI stuff. |
How vector types are passed depends on the ABI used. One could define an x86 ABI that doesn't pass vectors in registers, and in fact, the "Rust ABI" is such an ABI since it currently passes vectors by memory on x86. FWIW this RFC does not propose always using vector registers on C FFI. Instead, it proposes passing them to C using the ABI of the target, whatever that might be. For doing that correctly, we do need to know whether the type being passed to C is a vector type, its element type, and length, because in most widely used platform ABIs those things will determine which vector register to use. |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon. |
Huzzah! This RFC has been merged! Tracking issue: rust-lang/rust#63068 |
This RFC allows using architecture-specific vector types like
core::arch::x86_64::__m128
in C FFI.Rendered.
Tracking issue