Skip to content

Commit f91abb5

Browse files
committed
Disable NEON intrinsics on big-endian ARM
These are currently broken because the order of elements inside vectors is reversed on big-endian systems: the ARM ABI requires that element 0 is located at the highest address of the vector type. However LLVM intrinsics expect element 0 to be located at the lowest address. See https://llvm.org/docs/BigEndianNEON.html and `arm_neon.h` in Clang for more details. Although this is a breaking change, this is acceptable for 2 reasons: - big endian ARM targets are only tier 3. - it is preferable to stop existing code from compiling than to let it run and produce incorrect results.
1 parent f4528dd commit f91abb5

File tree

6 files changed

+14
-98
lines changed

6 files changed

+14
-98
lines changed

crates/core_arch/src/aarch64/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
//! [arm_ref]: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0073a/IHI0073A_arm_neon_intrinsics_ref.pdf
77
//! [arm_dat]: https://developer.arm.com/technologies/neon/intrinsics
88
9+
// NEON intrinsics are currently broken on big-endian, so don't expose them. (#1484)
10+
#[cfg(target_endian = "little")]
911
mod neon;
12+
#[cfg(target_endian = "little")]
1013
pub use self::neon::*;
1114

1215
mod tme;

0 commit comments

Comments
 (0)