@@ -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.
@@ -163,7 +167,8 @@ pub fn _mm_alignr_epi8<const IMM8: i32>(a: __m128i, b: __m128i) -> __m128i {
163167#[ target_feature( enable = "ssse3" ) ]
164168#[ cfg_attr( test, assert_instr( phaddw) ) ]
165169#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
166- pub fn _mm_hadd_epi16 ( a : __m128i , b : __m128i ) -> __m128i {
170+ #[ rustc_const_unstable( feature = "stdarch_const_intrinsics" , issue = "none" ) ]
171+ pub const fn _mm_hadd_epi16 ( a : __m128i , b : __m128i ) -> __m128i {
167172 let a = a. as_i16x8 ( ) ;
168173 let b = b. as_i16x8 ( ) ;
169174 unsafe {
@@ -194,7 +199,8 @@ pub fn _mm_hadds_epi16(a: __m128i, b: __m128i) -> __m128i {
194199#[ target_feature( enable = "ssse3" ) ]
195200#[ cfg_attr( test, assert_instr( phaddd) ) ]
196201#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
197- pub fn _mm_hadd_epi32 ( a : __m128i , b : __m128i ) -> __m128i {
202+ #[ rustc_const_unstable( feature = "stdarch_const_intrinsics" , issue = "none" ) ]
203+ pub const fn _mm_hadd_epi32 ( a : __m128i , b : __m128i ) -> __m128i {
198204 let a = a. as_i32x4 ( ) ;
199205 let b = b. as_i32x4 ( ) ;
200206 unsafe {
@@ -212,7 +218,8 @@ pub fn _mm_hadd_epi32(a: __m128i, b: __m128i) -> __m128i {
212218#[ target_feature( enable = "ssse3" ) ]
213219#[ cfg_attr( test, assert_instr( phsubw) ) ]
214220#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
215- pub fn _mm_hsub_epi16 ( a : __m128i , b : __m128i ) -> __m128i {
221+ #[ rustc_const_unstable( feature = "stdarch_const_intrinsics" , issue = "none" ) ]
222+ pub const fn _mm_hsub_epi16 ( a : __m128i , b : __m128i ) -> __m128i {
216223 let a = a. as_i16x8 ( ) ;
217224 let b = b. as_i16x8 ( ) ;
218225 unsafe {
@@ -244,7 +251,8 @@ pub fn _mm_hsubs_epi16(a: __m128i, b: __m128i) -> __m128i {
244251#[ target_feature( enable = "ssse3" ) ]
245252#[ cfg_attr( test, assert_instr( phsubd) ) ]
246253#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
247- pub fn _mm_hsub_epi32 ( a : __m128i , b : __m128i ) -> __m128i {
254+ #[ rustc_const_unstable( feature = "stdarch_const_intrinsics" , issue = "none" ) ]
255+ pub const fn _mm_hsub_epi32 ( a : __m128i , b : __m128i ) -> __m128i {
248256 let a = a. as_i32x4 ( ) ;
249257 let b = b. as_i32x4 ( ) ;
250258 unsafe {
0 commit comments