Skip to content

Commit 6ddf7ad

Browse files
Restrict Arm types to Arm v7+
This mostly mirrors the restrictions in std::arch. It can be loosened slightly with later refactoring.
1 parent 7d91357 commit 6ddf7ad

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

crates/core_simd/src/vendor.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ mod x86;
2121
#[cfg(any(target_arch = "wasm32"))]
2222
mod wasm32;
2323

24-
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
24+
#[cfg(any(
25+
target_arch = "aarch64",
26+
all(target_arch = "arm", target_feature = "v7")
27+
))]
2528
mod arm;
2629

2730
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]

crates/core_simd/src/vendor/arm.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::simd::*;
22

3-
#[cfg(target_arch = "arm")]
3+
#[cfg(all(target_arch = "arm", target_feature = "v7"))]
44
use core::arch::arm::*;
55

66
#[cfg(target_arch = "aarch64")]
@@ -35,7 +35,7 @@ from_transmute! { unsafe i64x2 => int64x2_t }
3535
from_transmute! { unsafe Simd<u64, 1> => poly64x1_t }
3636
from_transmute! { unsafe u64x2 => poly64x2_t }
3737

38-
#[cfg(target_arch = "arm")]
38+
#[cfg(all(target_arch = "arm", target_feature = "v7"))]
3939
mod arm {
4040
use super::*;
4141
from_transmute! { unsafe Simd<u8, 4> => uint8x4_t }

0 commit comments

Comments
 (0)