@@ -1295,6 +1295,24 @@ mod sealed {
1295
1295
1296
1296
impl_vec_trait ! { [ VectorAndc vec_andc] + 2 b ( andc) }
1297
1297
1298
+ #[ inline]
1299
+ #[ target_feature( enable = "altivec" ) ]
1300
+ #[ cfg_attr( all( test, not( target_feature = "vsx" ) ) , assert_instr( vorc) ) ]
1301
+ #[ cfg_attr( all( test, target_feature = "vsx" ) , assert_instr( xxlorc) ) ]
1302
+ unsafe fn orc ( a : vector_signed_char , b : vector_signed_char ) -> vector_signed_char {
1303
+ let a = transmute ( a) ;
1304
+ let b = transmute ( b) ;
1305
+ transmute ( simd_or ( simd_xor ( u8x16:: splat ( 0xff ) , b) , a) )
1306
+ }
1307
+
1308
+ #[ unstable( feature = "stdarch_powerpc" , issue = "111145" ) ]
1309
+ pub trait VectorOrc < Other > {
1310
+ type Result ;
1311
+ unsafe fn vec_orc ( self , b : Other ) -> Self :: Result ;
1312
+ }
1313
+
1314
+ impl_vec_trait ! { [ VectorOrc vec_orc] + 2 b ( orc) }
1315
+
1298
1316
test_impl ! { vec_vand( a: vector_signed_char, b: vector_signed_char) -> vector_signed_char [ simd_and, vand / xxland ] }
1299
1317
1300
1318
#[ unstable( feature = "stdarch_powerpc" , issue = "111145" ) ]
@@ -3703,6 +3721,23 @@ where
3703
3721
a. vec_andc ( b)
3704
3722
}
3705
3723
3724
+ /// Vector OR with Complement
3725
+ ///
3726
+ /// ## Purpose
3727
+ /// Performs a bitwise OR of the first vector with the bitwise-complemented second vector.
3728
+ ///
3729
+ /// ## Result value
3730
+ /// r is the bitwise OR of a and the bitwise complement of b.
3731
+ #[ inline]
3732
+ #[ target_feature( enable = "altivec" ) ]
3733
+ #[ unstable( feature = "stdarch_powerpc" , issue = "111145" ) ]
3734
+ pub unsafe fn vec_orc < T , U > ( a : T , b : U ) -> <T as sealed:: VectorOrc < U > >:: Result
3735
+ where
3736
+ T : sealed:: VectorOrc < U > ,
3737
+ {
3738
+ a. vec_orc ( b)
3739
+ }
3740
+
3706
3741
/// Vector and.
3707
3742
#[ inline]
3708
3743
#[ target_feature( enable = "altivec" ) ]
0 commit comments