-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for naked_functions_target_feature #138568
Copy link
Copy link
Open
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-nakedArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSA-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-naked_functions`#![feature(naked_functions)]``#![feature(naked_functions)]`F-naked_functions_target_feature`#![feature(naked_functions_target_feature)]``#![feature(naked_functions_target_feature)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-nakedArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSArea: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzSA-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-naked_functions`#![feature(naked_functions)]``#![feature(naked_functions)]`F-naked_functions_target_feature`#![feature(naked_functions_target_feature)]``#![feature(naked_functions_target_feature)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
The feature gate for the issue is
#![feature(naked_functions_target_feature)].The
#[target_feature(enable = "...")]attribute on standard functions can have two effects:At the time of writing,
target_featureis ignored when generating code for naked functions even with this feature enabled! Hence, you almost certainly don't need to enable this feature.If you need to change what instructions are accepted, you can use assembler directives in the naked assembly. See #137720 for examples on how to do that on the most common platforms.
For naked functions, a
target_featuredoes not change the generated code of that function: naked functions must already assume that their registers are in particular registers, and can document assumptions about e.g. the use of vector registers as safety conditions on the naked function itself. Hence, the target feature is useful only as documentation, and currently not strictly needed. Note that there are plans to it a hard requirement that functions using vector types in their signature enable the relevant target features.About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
instructions?)
Unresolved Questions
Implementation history