16
16
#[ inline]
17
17
pub fn swizzle_dyn ( self , idxs : Simd < u8 , N > ) -> Self {
18
18
#![ allow( unused_imports, unused_unsafe) ]
19
- #[ cfg( target_arch = "aarch64" ) ]
19
+ #[ cfg( all ( target_arch = "aarch64" , target_endian = "little" ) ) ]
20
20
use core:: arch:: aarch64:: { uint8x8_t, vqtbl1q_u8, vtbl1_u8} ;
21
- #[ cfg( all( target_arch = "arm" , target_feature = "v7" ) ) ]
21
+ #[ cfg( all( target_arch = "arm" , target_feature = "v7" , target_endian = "little" ) ) ]
22
22
use core:: arch:: arm:: { uint8x8_t, vtbl1_u8} ;
23
23
#[ cfg( target_arch = "wasm32" ) ]
24
24
use core:: arch:: wasm32 as wasm;
@@ -29,13 +29,17 @@ where
29
29
// SAFETY: Intrinsics covered by cfg
30
30
unsafe {
31
31
match N {
32
- #[ cfg( target_feature = "neon" ) ]
32
+ #[ cfg( all ( target_feature = "neon" , target_endian = "little" ) ) ]
33
33
8 => transize ( vtbl1_u8, self , idxs) ,
34
34
#[ cfg( target_feature = "ssse3" ) ]
35
35
16 => transize ( x86:: _mm_shuffle_epi8, self , idxs) ,
36
36
#[ cfg( target_feature = "simd128" ) ]
37
37
16 => transize ( wasm:: i8x16_swizzle, self , idxs) ,
38
- #[ cfg( all( target_arch = "aarch64" , target_feature = "neon" ) ) ]
38
+ #[ cfg( all(
39
+ target_arch = "aarch64" ,
40
+ target_feature = "neon" ,
41
+ target_endian = "little"
42
+ ) ) ]
39
43
16 => transize ( vqtbl1q_u8, self , idxs) ,
40
44
#[ cfg( all( target_feature = "avx2" , not( target_feature = "avx512vbmi" ) ) ) ]
41
45
32 => transize_raw ( avx2_pshufb, self , idxs) ,
0 commit comments