Open
Description
This is a tracking issue for the #[target_feature]
segment of RFC 2045 (rust-lang/rfcs#2045).
#[cfg(target_feature)]
was tracked in #29717 and has since been stabilized.
Steps
- Implement the proposed
#[target_feature]
semantics - Document these semantics: Document
target_feature
andcfg_target_feature
. reference#545 - Stabilize
- x86_64 & i686
- The basic set (sse–sse4.2, avx, avx2, ...) (Stabilize x86/x86_64 SIMD #49664)
- adx: Stabilize ADX target feature #93745
- avx512
-
mmx(never going to be stabilized) - sse4a
- tbm
- lahfsahf
- prfchw
- arm
- aarch64
- hexagon
- powerpc
- mips
- x86_64 & i686
@gnzlbg have anything else you want filled out here?
(below added from comments on PR)
- consensus on the API for run-time feature detection
- should
cfg!(feature)
work across #[inline(always)] functions, generics, etc?
And some related tasks:
- API breaking change: allow
#[target_feature]
on unsafe functions only - API breaking change:
#[target_feature = "+feature"]
=>#[target_feature(enable = "feature")]
- fix bug:
cfg_target_feature
andtarget_feature
don't interact properly #42515 - resolve bug: repr(simd) is unsound #44367
Metadata
Metadata
Assignees
Labels
Area: SIMD (Single Instruction Multiple Data)Area: `#[stable]`, `#[unstable]` etc.Area: Enabling/disabling target features like AVX, Neon, etc.Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCLibs issues that are tracked on the team's project board.Status: There are blocking design concerns.Relevant to the language team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.