Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Stabilise aarch64_target_feature #90620

Closed
adamgemmell opened this issue Nov 5, 2021 · 0 comments
Closed

Stabilise aarch64_target_feature #90620

adamgemmell opened this issue Nov 5, 2021 · 0 comments
Labels
O-AArch64 Armv8-A or later processors in AArch64 mode

Comments

@adamgemmell
Copy link
Contributor

adamgemmell commented Nov 5, 2021

This issue constitutes the stabilisation report as per the rustc dev guide. Tracking issue: #44839

This came about as a result of the discussion on stabilising the aarch64 runtime feature detection macro: #86941

Stabilisation PR: #90621

Summary

Along with std::is_aarch64_feature_detected!, we'd like to stabilise aarch64_target_feature. This allows using the target_feature attribute on aarch64 platforms like such:

#[target_feature(enable = "neon")]
unsafe fn asimd_code() {
    ...

This allows for unconditional code generation - the above function will be compiled as if assumed to only run on hosts that support the neon feature.

Note that this differs from compile-time feature detection (via cfg!) and run-time feature detection (via the std::is_aarch64_feature_detected! macro).

Test cases

There are a variety of x86_64 tests in place testing the behaviour of the target_feature attribute. Since this proposal does not change the behaviour of target_feature, only stabilises some of its inputs, I do not believe there's any pressing need to update these tests.

Documentation

I've updated the Rust reference: rust-lang/reference#1102

Unresolved questions

It's possible in the future that PAuth will have reason to be split into two separate features (paca and pacg in Linux's AT_HWCAP. If this happens the plan would be to add two new target_feature options and, if necessary, keep PAuth as the combination of the two. It doesn't make sense to pre-emptively separate them before they're separate in LLVM, nor keep PAuth unstable for an undetermined amount of time.

@sanxiyn sanxiyn added the O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state label Nov 8, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 19, 2022
…ature, r=Amanieu

Stabilise `aarch64_target_feature`

Draft stabilisation PR - rust-lang#90620
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 14, 2022
…ature, r=Amanieu

Stabilise `aarch64_target_feature`

This PR stabilises `aarch64_target_feature` - see rust-lang#90620
@workingjubilee workingjubilee added O-AArch64 Armv8-A or later processors in AArch64 mode and removed O-Arm Target: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state labels Mar 18, 2022
tarcieri added a commit to RustCrypto/block-ciphers that referenced this issue Aug 25, 2022
It's been stabilized: rust-lang/rust#90620

Because of that, it's breaking the build on recent nightlies:

https://github.com/RustCrypto/block-ciphers/runs/7968517726?check_suite_focus=true#step:7:103

> error: the feature `aarch64_target_feature` has been stable since
> 1.61.0 and no longer requires an attribute to enable
tarcieri added a commit to RustCrypto/block-ciphers that referenced this issue Aug 25, 2022
It's been stabilized: rust-lang/rust#90620

Because of that, it's breaking the build on recent nightlies:

https://github.com/RustCrypto/block-ciphers/runs/7968517726?check_suite_focus=true#step:7:103

> error: the feature `aarch64_target_feature` has been stable since
> 1.61.0 and no longer requires an attribute to enable
tarcieri added a commit to RustCrypto/block-ciphers that referenced this issue Aug 25, 2022
It's been stabilized: rust-lang/rust#90620

Because of that, it's breaking the build on recent nightlies:

https://github.com/RustCrypto/block-ciphers/runs/7968517726?check_suite_focus=true#step:7:103

> error: the feature `aarch64_target_feature` has been stable since
> 1.61.0 and no longer requires an attribute to enable    aes: remove use of `aarch64_target_feature`

It's been stabilized: rust-lang/rust#90620

Because of that, it's breaking the build on recent nightlies:

https://github.com/RustCrypto/block-ciphers/runs/7968517726?check_suite_focus=true#step:7:103

> error: the feature `aarch64_target_feature` has been stable since
> 1.61.0 and no longer requires an attribute to enable
tarcieri added a commit to RustCrypto/block-ciphers that referenced this issue Aug 25, 2022
It's been stabilized: rust-lang/rust#90620

Because of that, it's breaking the build on recent nightlies:

https://github.com/RustCrypto/block-ciphers/runs/7968517726?check_suite_focus=true#step:7:103

> error: the feature `aarch64_target_feature` has been stable since
> 1.61.0 and no longer requires an attribute to enable    aes: remove use of `aarch64_target_feature`

It's been stabilized: rust-lang/rust#90620

Because of that, it's breaking the build on recent nightlies:

https://github.com/RustCrypto/block-ciphers/runs/7968517726?check_suite_focus=true#step:7:103

> error: the feature `aarch64_target_feature` has been stable since
> 1.61.0 and no longer requires an attribute to enable
tarcieri added a commit to RustCrypto/block-ciphers that referenced this issue Aug 25, 2022
It's been stabilized: rust-lang/rust#90620

Because of that, it's breaking the build on recent nightlies:

https://github.com/RustCrypto/block-ciphers/runs/7968517726?check_suite_focus=true#step:7:103

> error: the feature `aarch64_target_feature` has been stable since
> 1.61.0 and no longer requires an attribute to enable    aes: remove use of `aarch64_target_feature`

It's been stabilized: rust-lang/rust#90620

Because of that, it's breaking the build on recent nightlies:

https://github.com/RustCrypto/block-ciphers/runs/7968517726?check_suite_focus=true#step:7:103

> error: the feature `aarch64_target_feature` has been stable since
> 1.61.0 and no longer requires an attribute to enable
tarcieri added a commit to RustCrypto/block-ciphers that referenced this issue Aug 25, 2022
It's been stabilized: rust-lang/rust#90620

Because of that, it's breaking the build on recent nightlies:

https://github.com/RustCrypto/block-ciphers/runs/7968517726?check_suite_focus=true#step:7:103

> error: the feature `aarch64_target_feature` has been stable since
> 1.61.0 and no longer requires an attribute to enable    aes: remove use of `aarch64_target_feature`

It's been stabilized: rust-lang/rust#90620

Because of that, it's breaking the build on recent nightlies:

https://github.com/RustCrypto/block-ciphers/runs/7968517726?check_suite_focus=true#step:7:103

> error: the feature `aarch64_target_feature` has been stable since
> 1.61.0 and no longer requires an attribute to enable
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
O-AArch64 Armv8-A or later processors in AArch64 mode
Projects
None yet
Development

No branches or pull requests

3 participants