line-index: don't try to use neon on big-endian aarch64.

This commit is contained in:
Havard Eidnes 2025-02-04 15:22:49 +00:00
parent f3998f7f8a
commit f4842d5803

View File

@ -235,7 +235,7 @@ fn analyze_source_file_dispatch(
} }
} }
#[cfg(target_arch = "aarch64")] #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
fn analyze_source_file_dispatch( fn analyze_source_file_dispatch(
src: &str, src: &str,
lines: &mut Vec<TextSize>, lines: &mut Vec<TextSize>,
@ -347,7 +347,7 @@ unsafe fn analyze_source_file_sse2(
} }
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[cfg(target_arch = "aarch64")] #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
#[inline] #[inline]
// See https://community.arm.com/arm-community-blogs/b/infrastructure-solutions-blog/posts/porting-x86-vector-bitmask-optimizations-to-arm-neon // See https://community.arm.com/arm-community-blogs/b/infrastructure-solutions-blog/posts/porting-x86-vector-bitmask-optimizations-to-arm-neon
// //
@ -362,7 +362,7 @@ unsafe fn move_mask(v: std::arch::aarch64::uint8x16_t) -> u64 {
} }
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[cfg(target_arch = "aarch64")] #[cfg(all(target_arch = "aarch64", target_endian = "little"))]
unsafe fn analyze_source_file_neon( unsafe fn analyze_source_file_neon(
src: &str, src: &str,
lines: &mut Vec<TextSize>, lines: &mut Vec<TextSize>,
@ -441,7 +441,11 @@ unsafe fn analyze_source_file_neon(
} }
} }
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64")))] #[cfg(not(any(
target_arch = "x86",
target_arch = "x86_64",
all(target_arch = "aarch64", target_endian = "little")
)))]
// The target (or compiler version) does not support SSE2 ... // The target (or compiler version) does not support SSE2 ...
fn analyze_source_file_dispatch( fn analyze_source_file_dispatch(
src: &str, src: &str,