mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 10:39:45 +00:00
Merge pull request #19083 from he32/fix-arm64-be
line-index: don't try to use (unavailable) neon on big-endian aarch64
This commit is contained in:
commit
ed1d4092a7
1 changed files with 8 additions and 4 deletions
|
|
@ -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(
|
||||
src: &str,
|
||||
lines: &mut Vec<TextSize>,
|
||||
|
|
@ -347,7 +347,7 @@ unsafe fn analyze_source_file_sse2(
|
|||
}
|
||||
|
||||
#[target_feature(enable = "neon")]
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
|
||||
#[inline]
|
||||
// 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")]
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
|
||||
unsafe fn analyze_source_file_neon(
|
||||
src: &str,
|
||||
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 ...
|
||||
fn analyze_source_file_dispatch(
|
||||
src: &str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue