@@ -674,6 +674,30 @@ pub unsafe fn vmvnq_u32(a: uint32x4_t) -> uint32x4_t {
674
674
simd_xor ( a, b)
675
675
}
676
676
677
+ /// Vector bitwise not.
678
+ #[ inline]
679
+ #[ target_feature( enable = "neon" ) ]
680
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v7" ) ) ]
681
+ #[ cfg_attr( all( test, target_arch = "arm" ) , assert_instr( vmvn) ) ]
682
+ #[ cfg_attr( all( test, target_arch = "aarch64" ) , assert_instr( mvn) ) ]
683
+ pub unsafe fn vmvn_p8 ( a : poly8x8_t ) -> poly8x8_t {
684
+ let b = poly8x8_t ( 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 ) ;
685
+ simd_xor ( a, b)
686
+ }
687
+
688
+ /// Vector bitwise not.
689
+ #[ inline]
690
+ #[ target_feature( enable = "neon" ) ]
691
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v7" ) ) ]
692
+ #[ cfg_attr( all( test, target_arch = "arm" ) , assert_instr( vmvn) ) ]
693
+ #[ cfg_attr( all( test, target_arch = "aarch64" ) , assert_instr( mvn) ) ]
694
+ pub unsafe fn vmvnq_p8 ( a : poly8x16_t ) -> poly8x16_t {
695
+ let b = poly8x16_t (
696
+ 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 , 255 ,
697
+ ) ;
698
+ simd_xor ( a, b)
699
+ }
700
+
677
701
/// Folding minimum of adjacent pairs
678
702
#[ inline]
679
703
#[ target_feature( enable = "neon" ) ]
@@ -1406,6 +1430,24 @@ mod tests {
1406
1430
assert_eq ! ( r, e) ;
1407
1431
}
1408
1432
1433
+ #[ simd_test( enable = "neon" ) ]
1434
+ unsafe fn test_vmvn_p8 ( ) {
1435
+ let a = u8x8:: new ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ;
1436
+ let e = u8x8:: new ( 255 , 254 , 253 , 252 , 251 , 250 , 249 , 248 ) ;
1437
+ let r: u8x8 = transmute ( vmvn_p8 ( transmute ( a) ) ) ;
1438
+ assert_eq ! ( r, e) ;
1439
+ }
1440
+
1441
+ #[ simd_test( enable = "neon" ) ]
1442
+ unsafe fn test_vmvnq_p8 ( ) {
1443
+ let a = u8x16:: new ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ) ;
1444
+ let e = u8x16:: new (
1445
+ 255 , 254 , 253 , 252 , 251 , 250 , 249 , 248 , 247 , 246 , 245 , 244 , 243 , 242 , 241 , 240 ,
1446
+ ) ;
1447
+ let r: u8x16 = transmute ( vmvnq_p8 ( transmute ( a) ) ) ;
1448
+ assert_eq ! ( r, e) ;
1449
+ }
1450
+
1409
1451
#[ simd_test( enable = "neon" ) ]
1410
1452
unsafe fn test_vmovn_s16 ( ) {
1411
1453
let a = i16x8:: new ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ;
0 commit comments