Skip to content

Commit

Permalink
Update feature names for new stdarch
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Nov 2, 2023
1 parent 4172de1 commit a46fb3c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 20 deletions.
4 changes: 0 additions & 4 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,6 @@ pub mod primitive;
deprecated_in_future
)]
#[allow(rustdoc::bare_urls)]
// FIXME: This annotation should be moved into rust-lang/stdarch after clashing_extern_declarations is
// merged. It currently cannot because bootstrap fails as the lint hasn't been defined yet.
#[allow(clashing_extern_declarations)]
#[unstable(feature = "stdsimd", issue = "48556")]
mod core_arch;

#[stable(feature = "simd_arch", since = "1.27.0")]
Expand Down
14 changes: 8 additions & 6 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@
#![feature(get_many_mut)]
#![feature(lazy_cell)]
#![feature(log_syntax)]
#![feature(stdsimd)]
#![feature(test)]
#![feature(trace_macros)]
// tidy-alphabetical-end
Expand Down Expand Up @@ -617,13 +616,16 @@ pub mod arch {

#[stable(feature = "simd_aarch64", since = "1.60.0")]
pub use std_detect::is_aarch64_feature_detected;
#[unstable(feature = "stdarch_arm_feature_detection", issue = "111190")]
pub use std_detect::is_arm_feature_detected;
#[unstable(feature = "is_riscv_feature_detected", issue = "111192")]
pub use std_detect::is_riscv_feature_detected;
#[stable(feature = "simd_x86", since = "1.27.0")]
pub use std_detect::is_x86_feature_detected;
#[unstable(feature = "stdsimd", issue = "48556")]
pub use std_detect::{
is_arm_feature_detected, is_mips64_feature_detected, is_mips_feature_detected,
is_powerpc64_feature_detected, is_powerpc_feature_detected, is_riscv_feature_detected,
};
#[unstable(feature = "stdarch_mips_feature_detection", issue = "111188")]
pub use std_detect::{is_mips64_feature_detected, is_mips_feature_detected};
#[unstable(feature = "stdarch_powerpc_feature_detection", issue = "111191")]
pub use std_detect::{is_powerpc64_feature_detected, is_powerpc_feature_detected};
}

// This was stabilized in the crate root so we have to keep it there.
Expand Down
16 changes: 10 additions & 6 deletions library/std/tests/run-time-detect.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
//! These tests just check that the macros are available in std.

#![cfg_attr(
any(
all(target_arch = "arm", any(target_os = "linux", target_os = "android")),
all(target_arch = "powerpc", target_os = "linux"),
all(target_arch = "powerpc64", target_os = "linux"),
),
feature(stdsimd)
all(target_arch = "arm", any(target_os = "linux", target_os = "android")),
feature(stdarch_arm_feature_detection)
)]
#![cfg_attr(
all(target_arch = "powerpc", target_os = "linux"),
feature(stdarch_powerpc_feature_detection)
)]
#![cfg_attr(
all(target_arch = "powerpc64", target_os = "linux"),
feature(stdarch_powerpc_feature_detection)
)]

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/pass/intrinsics-x86-aes-vaes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//@ignore-target-wasm32
//@compile-flags: -C target-feature=+aes,+vaes,+avx512f

#![feature(avx512_target_feature, stdsimd)]
#![feature(avx512_target_feature, stdarch_x86_avx512)]

use core::mem::transmute;
#[cfg(target_arch = "x86")]
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/pass/intrinsics-x86-avx512.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//@compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bitalg,+avx512vpopcntdq

#![feature(avx512_target_feature)]
#![feature(stdsimd)]
#![feature(stdarch_x86_avx512)]

#[cfg(target_arch = "x86")]
use std::arch::x86::*;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/asm/aarch64/type-check-3.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// only-aarch64
// compile-flags: -C target-feature=+neon

#![feature(repr_simd, stdsimd, asm_const)]
#![feature(repr_simd, asm_const)]

use std::arch::aarch64::float64x2_t;
use std::arch::{asm, global_asm};
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/asm/aarch64/type-check-4.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// only-aarch64
// compile-flags: -C target-feature=+neon

#![feature(repr_simd, stdsimd, asm_const)]
#![feature(repr_simd, asm_const)]

use std::arch::aarch64::float64x2_t;
use std::arch::{asm, global_asm};
Expand Down

0 comments on commit a46fb3c

Please sign in to comment.