-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Tracking issue for the "efiapi" calling convention #65815
Comments
Supported architectures in UEFI are described here: https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions rust-lang#65815
…, r=nagisa Limit efiapi calling convention to supported arches Supported architectures in UEFI are described here: https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions rust-lang#65815
Supported architectures in UEFI are described here: https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions Changes to tests modeled on 8240e7a. rust-lang#65815
On arm, llvm treats the C calling convention as `aapcs` on soft-float targets and `aapcs-vfp` on hard-float targets [1]. UEFI specifies in the arm calling convention that floating point extensions aren't used [2], so always translate `efiapi` to `aapcs` on arm. [1]: rust-lang/compiler-builtins#116 (comment) [2]: https://uefi.org/specs/UEFI/2.10/02_Overview.html#detailed-calling-convention rust-lang#65815
…, r=nagisa Limit efiapi calling convention to supported arches Supported architectures in UEFI are described here: https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions rust-lang#65815
…r=nagisa Use aapcs for efiapi calling convention on arm On arm, [llvm treats the C calling convention as `aapcs` on soft-float targets and `aapcs-vfp` on hard-float targets](rust-lang/compiler-builtins#116 (comment)). UEFI specifies in the arm calling convention that [floating point extensions aren't used](https://uefi.org/specs/UEFI/2.10/02_Overview.html#detailed-calling-convention), so always translate `efiapi` to `aapcs` on arm. rust-lang#65815
…r=nagisa Use aapcs for efiapi calling convention on arm On arm, [llvm treats the C calling convention as `aapcs` on soft-float targets and `aapcs-vfp` on hard-float targets](rust-lang/compiler-builtins#116 (comment)). UEFI specifies in the arm calling convention that [floating point extensions aren't used](https://uefi.org/specs/UEFI/2.10/02_Overview.html#detailed-calling-convention), so always translate `efiapi` to `aapcs` on arm. rust-lang#65815
…r=JohnTitor unstable-book: Add page for the `abi_efiapi` feature Tracking issue for `abi_efiapi`: rust-lang#65815
…r=JohnTitor unstable-book: Add page for the `abi_efiapi` feature Tracking issue for `abi_efiapi`: rust-lang#65815
The two known issues identified in the issue description have been resolved. Stabilization ReportSummaryThis feature adds the extern "efiapi" fn func() { todo!() } When compiling for a UEFI target such as The UEFI ABI can only be used on architectures where UEFI is supported: #104020 Some examples of usage in the Rust UEFI ecosystem: For background on why the ABI is named Documentation
Tests
|
I think this should be stabilized together with |
IMO that doesn't need to be a blocker for |
Shall we stabilieze the @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. |
Pondering: how much value do we get from lang FCPs for calling conventions? Could we define everything related to syntax and semantics independent of the set of values that actually are supported as CC values? Does the language spec ever really need to care if someone wants My instinct is that the existence of particular calling conventions would be far better as a T-compiler decision (like for targets), and lang would only come into it for things with semantic impact, like if someone wishes to add a feature for, say, |
@scottmcm I do think we should be reviewing new ABI proposals, yes. Among other things, some ABIs may be proposed to solve problems that may be better solved a different way or with more comprehensive interactions (e.g. defining naked functions or interrupt handlers). Some ABIs may be supported across many targets (like this one). Some ABIs may have interactions with the set of types or function attributes permitted. This ABI also raised other language issues, such as the availability of specific ABIs on targets that don't support them. So in general, while I think most ABIs will be uncontroversial, I don't think they should pass by without review. |
@rfcbot reviewed |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
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. This will be merged soon. |
Tracking issue: rust-lang#65815
Tracking issue for the
efiapi
calling convention, added in PR #65809. The feature gate name isabi_efiapi
.The
efiapi
calling convention can be used for defining a function with an ABI compatible with the UEFI Interfaces as defined in the UEFI Specification. On the currently supported platform, this means selecting between thewin64
ABI or theC
ABI depending on the target architecture.Usage
Known Issues
aapcs
on ARM, andaapcs64
en ARM64, instead of delegating toC
.The text was updated successfully, but these errors were encountered: