Skip to content

Commit

Permalink
Bug 1882291. Switch to stdarch_arm_neon_intrinsics feature on rust >=…
Browse files Browse the repository at this point in the history
…1.78. r=glandium

We only need this on ARM32 because the ARM64 intrinsics are stable.

stdarch_arm_neon_intrinsics was split out from stdsimd here:
rust-lang/stdarch#1486

Differential Revision: https://phabricator.services.mozilla.com/D203039
  • Loading branch information
jrmuizel authored and MrAlex94 committed May 13, 2024
1 parent 736f292 commit 01fe038
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions gfx/qcms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ cmyk = []

[dependencies]
libc = {version = "0.2", optional = true }

[build-dependencies]
version_check = "0.9"
7 changes: 7 additions & 0 deletions gfx/qcms/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extern crate version_check as rustc;

fn main() {
if rustc::is_min_version("1.78.0").unwrap_or(false) {
println!("cargo:rustc-cfg=stdsimd_split");
}
}
6 changes: 4 additions & 2 deletions gfx/qcms/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
#![allow(non_upper_case_globals)]
// These are needed for the neon SIMD code and can be removed once the MSRV supports the
// instrinsics we use
#![cfg_attr(feature = "neon", feature(stdsimd))]
#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_neon_intrinsics))]
#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_feature_detection))]
#![cfg_attr(all(not(stdsimd_split), target_arch = "arm", feature = "neon"), feature(stdsimd))]
#![cfg_attr(
feature = "neon",
all(target_arch = "arm", feature = "neon"),
feature(arm_target_feature, raw_ref_op)
)]
Expand Down

0 comments on commit 01fe038

Please sign in to comment.