Tracking Issue for naked_functions_target_feature
#138568
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-naked
Area: `#[naked]`, prologue and epilogue-free, functions, https://git.io/vAzzS
A-target-feature
Area: Enabling/disabling target features like AVX, Neon, etc.
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
F-naked_functions_target_feature
`#![feature(naked_functions_target_feature)]`
F-naked_functions
`#![feature(naked_functions)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
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_feature
is 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_feature
does 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
The text was updated successfully, but these errors were encountered: