Skip to content

Commit

Permalink
src/impls.rs: don't attempt use of neon / SIMD on big-endian aarch64.
Browse files Browse the repository at this point in the history
Neon / SIMD is known to be problematical in rust, ref.
rust-lang/stdarch#1484, even
though the CPU itself supports it.
  • Loading branch information
he32 committed Oct 2, 2024
1 parent 8abf7da commit 493b45a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ mod simd {
);
#[cfg(zerocopy_aarch64_simd)]
simd_arch_mod!(
#[cfg(target_arch = "aarch64")]
#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
aarch64, aarch64, float32x2_t, float32x4_t, float64x1_t, float64x2_t, int8x8_t, int8x8x2_t,
int8x8x3_t, int8x8x4_t, int8x16_t, int8x16x2_t, int8x16x3_t, int8x16x4_t, int16x4_t,
int16x8_t, int32x2_t, int32x4_t, int64x1_t, int64x2_t, poly8x8_t, poly8x8x2_t, poly8x8x3_t,
Expand Down Expand Up @@ -1879,7 +1879,7 @@ mod tests {
vector_signed_long,
vector_unsigned_long
);
#[cfg(all(target_arch = "aarch64", zerocopy_aarch64_simd))]
#[cfg(all(target_arch = "aarch64", zerocopy_aarch64_simd, target_endian = "little"))]
#[rustfmt::skip]
test_simd_arch_mod!(
aarch64, float32x2_t, float32x4_t, float64x1_t, float64x2_t, int8x8_t, int8x8x2_t,
Expand Down

0 comments on commit 493b45a

Please sign in to comment.