Skip to content

Commit 493b45a

Browse files
committed
src/impls.rs: don't attempt use of neon / SIMD on big-endian aarch64.
Neon / SIMD is known to be problematical in rust, ref. rust-lang/stdarch#1484, even though the CPU itself supports it.
1 parent 8abf7da commit 493b45a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/impls.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ mod simd {
934934
);
935935
#[cfg(zerocopy_aarch64_simd)]
936936
simd_arch_mod!(
937-
#[cfg(target_arch = "aarch64")]
937+
#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
938938
aarch64, aarch64, float32x2_t, float32x4_t, float64x1_t, float64x2_t, int8x8_t, int8x8x2_t,
939939
int8x8x3_t, int8x8x4_t, int8x16_t, int8x16x2_t, int8x16x3_t, int8x16x4_t, int16x4_t,
940940
int16x8_t, int32x2_t, int32x4_t, int64x1_t, int64x2_t, poly8x8_t, poly8x8x2_t, poly8x8x3_t,
@@ -1879,7 +1879,7 @@ mod tests {
18791879
vector_signed_long,
18801880
vector_unsigned_long
18811881
);
1882-
#[cfg(all(target_arch = "aarch64", zerocopy_aarch64_simd))]
1882+
#[cfg(all(target_arch = "aarch64", zerocopy_aarch64_simd, target_endian = "little"))]
18831883
#[rustfmt::skip]
18841884
test_simd_arch_mod!(
18851885
aarch64, float32x2_t, float32x4_t, float64x1_t, float64x2_t, int8x8_t, int8x8x2_t,

0 commit comments

Comments
 (0)