File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,10 @@ mod integer_simd;
5050 feature = "runtime-dispatch-simd" ,
5151 any( target_arch = "x86" , target_arch = "x86_64" )
5252 ) ,
53- target_arch = "aarch64" ,
53+ all(
54+ target_arch = "aarch64" ,
55+ target_endian = "little"
56+ ) ,
5457 target_arch = "wasm32" ,
5558 feature = "generic-simd"
5659) ) ]
@@ -93,7 +96,11 @@ pub fn count(haystack: &[u8], needle: u8) -> usize {
9396 }
9497 }
9598 }
96- #[ cfg( all( target_arch = "aarch64" , not( feature = "generic_simd" ) ) ) ]
99+ #[ cfg( all(
100+ target_arch = "aarch64" ,
101+ target_endian = "little" ,
102+ not( feature = "generic_simd" )
103+ ) ) ]
97104 {
98105 unsafe {
99106 return simd:: aarch64:: chunk_count ( haystack, needle) ;
@@ -155,7 +162,11 @@ pub fn num_chars(utf8_chars: &[u8]) -> usize {
155162 }
156163 }
157164 }
158- #[ cfg( all( target_arch = "aarch64" , not( feature = "generic_simd" ) ) ) ]
165+ #[ cfg( all(
166+ target_arch = "aarch64" ,
167+ target_endian = "little" ,
168+ not( feature = "generic_simd" )
169+ ) ) ]
159170 {
160171 unsafe {
161172 return simd:: aarch64:: chunk_num_chars ( utf8_chars) ;
You can’t perform that action at this time.
0 commit comments