@@ -16,7 +16,8 @@ use stdarch_test::assert_instr;
1616#[ target_feature( enable = "ssse3" ) ]
1717#[ cfg_attr( test, assert_instr( pabsb) ) ]
1818#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
19- pub fn _mm_abs_epi8 ( a : __m128i ) -> __m128i {
19+ #[ rustc_const_unstable( feature = "stdarch_const_intrinsics" , issue = "none" ) ]
20+ pub const fn _mm_abs_epi8 ( a : __m128i ) -> __m128i {
2021 unsafe {
2122 let a = a. as_i8x16 ( ) ;
2223 let zero = i8x16:: ZERO ;
@@ -34,7 +35,8 @@ pub fn _mm_abs_epi8(a: __m128i) -> __m128i {
3435#[ target_feature( enable = "ssse3" ) ]
3536#[ cfg_attr( test, assert_instr( pabsw) ) ]
3637#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
37- pub fn _mm_abs_epi16 ( a : __m128i ) -> __m128i {
38+ #[ rustc_const_unstable( feature = "stdarch_const_intrinsics" , issue = "none" ) ]
39+ pub const fn _mm_abs_epi16 ( a : __m128i ) -> __m128i {
3840 unsafe {
3941 let a = a. as_i16x8 ( ) ;
4042 let zero = i16x8:: ZERO ;
@@ -52,7 +54,8 @@ pub fn _mm_abs_epi16(a: __m128i) -> __m128i {
5254#[ target_feature( enable = "ssse3" ) ]
5355#[ cfg_attr( test, assert_instr( pabsd) ) ]
5456#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
55- pub fn _mm_abs_epi32 ( a : __m128i ) -> __m128i {
57+ #[ rustc_const_unstable( feature = "stdarch_const_intrinsics" , issue = "none" ) ]
58+ pub const fn _mm_abs_epi32 ( a : __m128i ) -> __m128i {
5659 unsafe {
5760 let a = a. as_i32x4 ( ) ;
5861 let zero = i32x4:: ZERO ;
@@ -104,7 +107,8 @@ pub fn _mm_shuffle_epi8(a: __m128i, b: __m128i) -> __m128i {
104107#[ cfg_attr( test, assert_instr( palignr, IMM8 = 15 ) ) ]
105108#[ rustc_legacy_const_generics( 2 ) ]
106109#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
107- pub fn _mm_alignr_epi8 < const IMM8 : i32 > ( a : __m128i , b : __m128i ) -> __m128i {
110+ #[ rustc_const_unstable( feature = "stdarch_const_intrinsics" , issue = "none" ) ]
111+ pub const fn _mm_alignr_epi8 < const IMM8 : i32 > ( a : __m128i , b : __m128i ) -> __m128i {
108112 static_assert_uimm_bits ! ( IMM8 , 8 ) ;
109113 // If palignr is shifting the pair of vectors more than the size of two
110114 // lanes, emit zero.
0 commit comments