@@ -340,6 +340,13 @@ extern "C" {
340
340
fn vsl ( a : vector_signed_int , b : vector_signed_int ) -> vector_signed_int ;
341
341
#[ link_name = "llvm.ppc.altivec.slo" ]
342
342
fn vslo ( a : vector_signed_int , b : vector_signed_int ) -> vector_signed_int ;
343
+
344
+ #[ link_name = "llvm.ppc.altivec.srab" ]
345
+ fn vsrab ( a : vector_signed_char , b : vector_unsigned_char ) -> vector_signed_char ;
346
+ #[ link_name = "llvm.ppc.altivec.srah" ]
347
+ fn vsrah ( a : vector_signed_short , b : vector_unsigned_short ) -> vector_signed_short ;
348
+ #[ link_name = "llvm.ppc.altivec.sraw" ]
349
+ fn vsraw ( a : vector_signed_int , b : vector_unsigned_int ) -> vector_signed_int ;
343
350
}
344
351
345
352
macro_rules! s_t_l {
@@ -2704,6 +2711,14 @@ mod sealed {
2704
2711
2705
2712
impl_vec_shift ! { [ VectorSr vec_sr] ( vsrb, vsrh, vsrw) }
2706
2713
2714
+ #[ unstable( feature = "stdarch_powerpc" , issue = "111145" ) ]
2715
+ pub trait VectorSra < Other > {
2716
+ type Result ;
2717
+ unsafe fn vec_sra ( self , b : Other ) -> Self :: Result ;
2718
+ }
2719
+
2720
+ impl_vec_shift ! { [ VectorSra vec_sra] ( vsrab, vsrah, vsraw) }
2721
+
2707
2722
#[ unstable( feature = "stdarch_powerpc" , issue = "111145" ) ]
2708
2723
pub trait VectorSld {
2709
2724
unsafe fn vec_sld < const UIMM4 : i32 > ( self , b : Self ) -> Self ;
@@ -2986,6 +3001,17 @@ where
2986
3001
a. vec_sr ( b)
2987
3002
}
2988
3003
3004
+ /// Vector Shift Right Algebraic
3005
+ #[ inline]
3006
+ #[ target_feature( enable = "altivec" ) ]
3007
+ #[ unstable( feature = "stdarch_powerpc" , issue = "111145" ) ]
3008
+ pub unsafe fn vec_sra < T , U > ( a : T , b : U ) -> <T as sealed:: VectorSra < U > >:: Result
3009
+ where
3010
+ T : sealed:: VectorSra < U > ,
3011
+ {
3012
+ a. vec_sra ( b)
3013
+ }
3014
+
2989
3015
/// Vector Shift Left Double
2990
3016
///
2991
3017
/// ## Endian considerations
0 commit comments