@@ -96,6 +96,7 @@ pub unsafe fn _mm256_or_ps(a: __m256, b: __m256) -> __m256 {
96
96
#[ inline]
97
97
#[ target_feature( enable = "avx" ) ]
98
98
#[ cfg_attr( test, assert_instr( vshufpd, imm8 = 0x1 ) ) ]
99
+ #[ rustc_args_required_const( 2 ) ]
99
100
pub unsafe fn _mm256_shuffle_pd ( a : __m256d , b : __m256d , imm8 : i32 ) -> __m256d {
100
101
let imm8 = ( imm8 & 0xFF ) as u8 ;
101
102
macro_rules! shuffle4 {
@@ -138,6 +139,7 @@ pub unsafe fn _mm256_shuffle_pd(a: __m256d, b: __m256d, imm8: i32) -> __m256d {
138
139
#[ inline]
139
140
#[ target_feature( enable = "avx" ) ]
140
141
#[ cfg_attr( test, assert_instr( vshufps, imm8 = 0x0 ) ) ]
142
+ #[ rustc_args_required_const( 2 ) ]
141
143
pub unsafe fn _mm256_shuffle_ps ( a : __m256 , b : __m256 , imm8 : i32 ) -> __m256 {
142
144
let imm8 = ( imm8 & 0xFF ) as u8 ;
143
145
macro_rules! shuffle4 {
@@ -330,6 +332,7 @@ pub unsafe fn _mm256_div_pd(a: __m256d, b: __m256d) -> __m256d {
330
332
#[ inline]
331
333
#[ target_feature( enable = "avx" ) ]
332
334
#[ cfg_attr( test, assert_instr( vroundpd, b = 0x3 ) ) ]
335
+ #[ rustc_args_required_const( 1 ) ]
333
336
pub unsafe fn _mm256_round_pd ( a : __m256d , b : i32 ) -> __m256d {
334
337
macro_rules! call {
335
338
( $imm8: expr) => { roundpd256( a, $imm8) }
@@ -369,6 +372,7 @@ pub unsafe fn _mm256_floor_pd(a: __m256d) -> __m256d {
369
372
#[ inline]
370
373
#[ target_feature( enable = "avx" ) ]
371
374
#[ cfg_attr( test, assert_instr( vroundps, b = 0x00 ) ) ]
375
+ #[ rustc_args_required_const( 1 ) ]
372
376
pub unsafe fn _mm256_round_ps ( a : __m256 , b : i32 ) -> __m256 {
373
377
macro_rules! call {
374
378
( $imm8: expr) => {
@@ -419,6 +423,7 @@ pub unsafe fn _mm256_sqrt_pd(a: __m256d) -> __m256d {
419
423
#[ inline]
420
424
#[ target_feature( enable = "avx" ) ]
421
425
#[ cfg_attr( test, assert_instr( vblendpd, imm8 = 9 ) ) ]
426
+ #[ rustc_args_required_const( 2 ) ]
422
427
pub unsafe fn _mm256_blend_pd ( a : __m256d , b : __m256d , imm8 : i32 ) -> __m256d {
423
428
let imm8 = ( imm8 & 0xFF ) as u8 ;
424
429
macro_rules! blend4 {
@@ -461,6 +466,7 @@ pub unsafe fn _mm256_blend_pd(a: __m256d, b: __m256d, imm8: i32) -> __m256d {
461
466
#[ inline]
462
467
#[ target_feature( enable = "avx" ) ]
463
468
#[ cfg_attr( test, assert_instr( vblendps, imm8 = 9 ) ) ]
469
+ #[ rustc_args_required_const( 2 ) ]
464
470
pub unsafe fn _mm256_blend_ps ( a : __m256 , b : __m256 , imm8 : i32 ) -> __m256 {
465
471
let imm8 = ( imm8 & 0xFF ) as u8 ;
466
472
macro_rules! blend4 {
@@ -531,6 +537,7 @@ pub unsafe fn _mm256_blendv_ps(a: __m256, b: __m256, c: __m256) -> __m256 {
531
537
#[ inline]
532
538
#[ target_feature( enable = "avx" ) ]
533
539
#[ cfg_attr( test, assert_instr( vdpps, imm8 = 0x0 ) ) ]
540
+ #[ rustc_args_required_const( 2 ) ]
534
541
pub unsafe fn _mm256_dp_ps ( a : __m256 , b : __m256 , imm8 : i32 ) -> __m256 {
535
542
macro_rules! call {
536
543
( $imm8: expr) => { vdpps( a, b, $imm8) }
@@ -678,6 +685,7 @@ pub const _CMP_TRUE_US: i32 = 0x1f;
678
685
#[ inline]
679
686
#[ target_feature( enable = "avx,sse2" ) ]
680
687
#[ cfg_attr( test, assert_instr( vcmpeqpd, imm8 = 0 ) ) ] // TODO Validate vcmppd
688
+ #[ rustc_args_required_const( 2 ) ]
681
689
pub unsafe fn _mm_cmp_pd ( a : __m128d , b : __m128d , imm8 : i32 ) -> __m128d {
682
690
macro_rules! call {
683
691
( $imm8: expr) => { vcmppd( a, b, $imm8) }
@@ -691,6 +699,7 @@ pub unsafe fn _mm_cmp_pd(a: __m128d, b: __m128d, imm8: i32) -> __m128d {
691
699
#[ inline]
692
700
#[ target_feature( enable = "avx" ) ]
693
701
#[ cfg_attr( test, assert_instr( vcmpeqpd, imm8 = 0 ) ) ] // TODO Validate vcmppd
702
+ #[ rustc_args_required_const( 2 ) ]
694
703
pub unsafe fn _mm256_cmp_pd ( a : __m256d , b : __m256d , imm8 : i32 ) -> __m256d {
695
704
macro_rules! call {
696
705
( $imm8: expr) => { vcmppd256( a, b, $imm8) }
@@ -704,6 +713,7 @@ pub unsafe fn _mm256_cmp_pd(a: __m256d, b: __m256d, imm8: i32) -> __m256d {
704
713
#[ inline]
705
714
#[ target_feature( enable = "avx,sse" ) ]
706
715
#[ cfg_attr( test, assert_instr( vcmpeqps, imm8 = 0 ) ) ] // TODO Validate vcmpps
716
+ #[ rustc_args_required_const( 2 ) ]
707
717
pub unsafe fn _mm_cmp_ps ( a : __m128 , b : __m128 , imm8 : i32 ) -> __m128 {
708
718
macro_rules! call {
709
719
( $imm8: expr) => { vcmpps( a, b, $imm8) }
@@ -717,6 +727,7 @@ pub unsafe fn _mm_cmp_ps(a: __m128, b: __m128, imm8: i32) -> __m128 {
717
727
#[ inline]
718
728
#[ target_feature( enable = "avx" ) ]
719
729
#[ cfg_attr( test, assert_instr( vcmpeqps, imm8 = 0 ) ) ] // TODO Validate vcmpps
730
+ #[ rustc_args_required_const( 2 ) ]
720
731
pub unsafe fn _mm256_cmp_ps ( a : __m256 , b : __m256 , imm8 : i32 ) -> __m256 {
721
732
macro_rules! call {
722
733
( $imm8: expr) => { vcmpps256( a, b, $imm8) }
@@ -732,6 +743,7 @@ pub unsafe fn _mm256_cmp_ps(a: __m256, b: __m256, imm8: i32) -> __m256 {
732
743
#[ inline]
733
744
#[ target_feature( enable = "avx,sse2" ) ]
734
745
#[ cfg_attr( test, assert_instr( vcmpeqsd, imm8 = 0 ) ) ] // TODO Validate vcmpsd
746
+ #[ rustc_args_required_const( 2 ) ]
735
747
pub unsafe fn _mm_cmp_sd ( a : __m128d , b : __m128d , imm8 : i32 ) -> __m128d {
736
748
macro_rules! call {
737
749
( $imm8: expr) => { vcmpsd( a, b, $imm8) }
@@ -747,6 +759,7 @@ pub unsafe fn _mm_cmp_sd(a: __m128d, b: __m128d, imm8: i32) -> __m128d {
747
759
#[ inline]
748
760
#[ target_feature( enable = "avx,sse" ) ]
749
761
#[ cfg_attr( test, assert_instr( vcmpeqss, imm8 = 0 ) ) ] // TODO Validate vcmpss
762
+ #[ rustc_args_required_const( 2 ) ]
750
763
pub unsafe fn _mm_cmp_ss ( a : __m128 , b : __m128 , imm8 : i32 ) -> __m128 {
751
764
macro_rules! call {
752
765
( $imm8: expr) => { vcmpss( a, b, $imm8) }
@@ -830,7 +843,8 @@ pub unsafe fn _mm256_cvttps_epi32(a: __m256) -> __m256i {
830
843
/// floating-point elements) from `a`, selected with `imm8`.
831
844
#[ inline]
832
845
#[ target_feature( enable = "avx" ) ]
833
- #[ cfg_attr( test, assert_instr( vextractf128) ) ]
846
+ #[ cfg_attr( test, assert_instr( vextractf128, imm8 = 1 ) ) ]
847
+ #[ rustc_args_required_const( 1 ) ]
834
848
pub unsafe fn _mm256_extractf128_ps ( a : __m256 , imm8 : i32 ) -> __m128 {
835
849
match imm8 & 1 {
836
850
0 => simd_shuffle4 ( a, _mm256_undefined_ps ( ) , [ 0 , 1 , 2 , 3 ] ) ,
@@ -842,7 +856,8 @@ pub unsafe fn _mm256_extractf128_ps(a: __m256, imm8: i32) -> __m128 {
842
856
/// floating-point elements) from `a`, selected with `imm8`.
843
857
#[ inline]
844
858
#[ target_feature( enable = "avx" ) ]
845
- #[ cfg_attr( test, assert_instr( vextractf128) ) ]
859
+ #[ cfg_attr( test, assert_instr( vextractf128, imm8 = 1 ) ) ]
860
+ #[ rustc_args_required_const( 1 ) ]
846
861
pub unsafe fn _mm256_extractf128_pd ( a : __m256d , imm8 : i32 ) -> __m128d {
847
862
match imm8 & 1 {
848
863
0 => simd_shuffle2 ( a, _mm256_undefined_pd ( ) , [ 0 , 1 ] ) ,
@@ -853,7 +868,8 @@ pub unsafe fn _mm256_extractf128_pd(a: __m256d, imm8: i32) -> __m128d {
853
868
/// Extract 128 bits (composed of integer data) from `a`, selected with `imm8`.
854
869
#[ inline]
855
870
#[ target_feature( enable = "avx" ) ]
856
- #[ cfg_attr( test, assert_instr( vextractf128) ) ]
871
+ #[ cfg_attr( test, assert_instr( vextractf128, imm8 = 1 ) ) ]
872
+ #[ rustc_args_required_const( 1 ) ]
857
873
pub unsafe fn _mm256_extractf128_si256 ( a : __m256i , imm8 : i32 ) -> __m128i {
858
874
let b = _mm256_undefined_si256 ( ) . as_i64x4 ( ) ;
859
875
let dst: i64x2 = match imm8 & 1 {
@@ -903,6 +919,7 @@ pub unsafe fn _mm_permutevar_ps(a: __m128, b: __m128i) -> __m128 {
903
919
#[ inline]
904
920
#[ target_feature( enable = "avx" ) ]
905
921
#[ cfg_attr( test, assert_instr( vpermilps, imm8 = 9 ) ) ]
922
+ #[ rustc_args_required_const( 1 ) ]
906
923
pub unsafe fn _mm256_permute_ps ( a : __m256 , imm8 : i32 ) -> __m256 {
907
924
let imm8 = ( imm8 & 0xFF ) as u8 ;
908
925
macro_rules! shuffle4 {
@@ -955,6 +972,7 @@ pub unsafe fn _mm256_permute_ps(a: __m256, imm8: i32) -> __m256 {
955
972
#[ inline]
956
973
#[ target_feature( enable = "avx,sse" ) ]
957
974
#[ cfg_attr( test, assert_instr( vpermilps, imm8 = 9 ) ) ]
975
+ #[ rustc_args_required_const( 1 ) ]
958
976
pub unsafe fn _mm_permute_ps ( a : __m128 , imm8 : i32 ) -> __m128 {
959
977
let imm8 = ( imm8 & 0xFF ) as u8 ;
960
978
macro_rules! shuffle4 {
@@ -1025,6 +1043,7 @@ pub unsafe fn _mm_permutevar_pd(a: __m128d, b: __m128i) -> __m128d {
1025
1043
#[ inline]
1026
1044
#[ target_feature( enable = "avx" ) ]
1027
1045
#[ cfg_attr( test, assert_instr( vpermilpd, imm8 = 0x1 ) ) ]
1046
+ #[ rustc_args_required_const( 1 ) ]
1028
1047
pub unsafe fn _mm256_permute_pd ( a : __m256d , imm8 : i32 ) -> __m256d {
1029
1048
let imm8 = ( imm8 & 0xFF ) as u8 ;
1030
1049
macro_rules! shuffle4 {
@@ -1067,6 +1086,7 @@ pub unsafe fn _mm256_permute_pd(a: __m256d, imm8: i32) -> __m256d {
1067
1086
#[ inline]
1068
1087
#[ target_feature( enable = "avx,sse2" ) ]
1069
1088
#[ cfg_attr( test, assert_instr( vpermilpd, imm8 = 0x1 ) ) ]
1089
+ #[ rustc_args_required_const( 1 ) ]
1070
1090
pub unsafe fn _mm_permute_pd ( a : __m128d , imm8 : i32 ) -> __m128d {
1071
1091
let imm8 = ( imm8 & 0xFF ) as u8 ;
1072
1092
macro_rules! shuffle2 {
@@ -1093,6 +1113,7 @@ pub unsafe fn _mm_permute_pd(a: __m128d, imm8: i32) -> __m128d {
1093
1113
#[ inline]
1094
1114
#[ target_feature( enable = "avx" ) ]
1095
1115
#[ cfg_attr( test, assert_instr( vperm2f128, imm8 = 0x5 ) ) ]
1116
+ #[ rustc_args_required_const( 2 ) ]
1096
1117
pub unsafe fn _mm256_permute2f128_ps (
1097
1118
a : __m256 , b : __m256 , imm8 : i32
1098
1119
) -> __m256 {
@@ -1107,6 +1128,7 @@ pub unsafe fn _mm256_permute2f128_ps(
1107
1128
#[ inline]
1108
1129
#[ target_feature( enable = "avx" ) ]
1109
1130
#[ cfg_attr( test, assert_instr( vperm2f128, imm8 = 0x31 ) ) ]
1131
+ #[ rustc_args_required_const( 2 ) ]
1110
1132
pub unsafe fn _mm256_permute2f128_pd (
1111
1133
a : __m256d , b : __m256d , imm8 : i32
1112
1134
) -> __m256d {
@@ -1121,6 +1143,7 @@ pub unsafe fn _mm256_permute2f128_pd(
1121
1143
#[ inline]
1122
1144
#[ target_feature( enable = "avx" ) ]
1123
1145
#[ cfg_attr( test, assert_instr( vperm2f128, imm8 = 0x31 ) ) ]
1146
+ #[ rustc_args_required_const( 2 ) ]
1124
1147
pub unsafe fn _mm256_permute2f128_si256 (
1125
1148
a : __m256i , b : __m256i , imm8 : i32
1126
1149
) -> __m256i {
@@ -1184,6 +1207,7 @@ pub unsafe fn _mm256_broadcast_pd(a: &__m128d) -> __m256d {
1184
1207
#[ inline]
1185
1208
#[ target_feature( enable = "avx" ) ]
1186
1209
#[ cfg_attr( test, assert_instr( vinsertf128, imm8 = 1 ) ) ]
1210
+ #[ rustc_args_required_const( 2 ) ]
1187
1211
pub unsafe fn _mm256_insertf128_ps ( a : __m256 , b : __m128 , imm8 : i32 ) -> __m256 {
1188
1212
let b = _mm256_castps128_ps256 ( b) ;
1189
1213
match imm8 & 1 {
@@ -1198,6 +1222,7 @@ pub unsafe fn _mm256_insertf128_ps(a: __m256, b: __m128, imm8: i32) -> __m256 {
1198
1222
#[ inline]
1199
1223
#[ target_feature( enable = "avx" ) ]
1200
1224
#[ cfg_attr( test, assert_instr( vinsertf128, imm8 = 1 ) ) ]
1225
+ #[ rustc_args_required_const( 2 ) ]
1201
1226
pub unsafe fn _mm256_insertf128_pd (
1202
1227
a : __m256d , b : __m128d , imm8 : i32
1203
1228
) -> __m256d {
@@ -1212,6 +1237,7 @@ pub unsafe fn _mm256_insertf128_pd(
1212
1237
#[ inline]
1213
1238
#[ target_feature( enable = "avx" ) ]
1214
1239
#[ cfg_attr( test, assert_instr( vinsertf128, imm8 = 1 ) ) ]
1240
+ #[ rustc_args_required_const( 2 ) ]
1215
1241
pub unsafe fn _mm256_insertf128_si256 (
1216
1242
a : __m256i , b : __m128i , imm8 : i32
1217
1243
) -> __m256i {
@@ -1228,6 +1254,7 @@ pub unsafe fn _mm256_insertf128_si256(
1228
1254
#[ inline]
1229
1255
#[ target_feature( enable = "avx" ) ]
1230
1256
// This intrinsic has no corresponding instruction.
1257
+ #[ rustc_args_required_const( 2 ) ]
1231
1258
pub unsafe fn _mm256_insert_epi8 ( a : __m256i , i : i8 , index : i32 ) -> __m256i {
1232
1259
mem:: transmute ( simd_insert ( a. as_i8x32 ( ) , ( index as u32 ) & 31 , i) )
1233
1260
}
@@ -1237,6 +1264,7 @@ pub unsafe fn _mm256_insert_epi8(a: __m256i, i: i8, index: i32) -> __m256i {
1237
1264
#[ inline]
1238
1265
#[ target_feature( enable = "avx" ) ]
1239
1266
// This intrinsic has no corresponding instruction.
1267
+ #[ rustc_args_required_const( 2 ) ]
1240
1268
pub unsafe fn _mm256_insert_epi16 ( a : __m256i , i : i16 , index : i32 ) -> __m256i {
1241
1269
mem:: transmute ( simd_insert ( a. as_i16x16 ( ) , ( index as u32 ) & 15 , i) )
1242
1270
}
@@ -1246,6 +1274,7 @@ pub unsafe fn _mm256_insert_epi16(a: __m256i, i: i16, index: i32) -> __m256i {
1246
1274
#[ inline]
1247
1275
#[ target_feature( enable = "avx" ) ]
1248
1276
// This intrinsic has no corresponding instruction.
1277
+ #[ rustc_args_required_const( 2 ) ]
1249
1278
pub unsafe fn _mm256_insert_epi32 ( a : __m256i , i : i32 , index : i32 ) -> __m256i {
1250
1279
mem:: transmute ( simd_insert ( a. as_i32x8 ( ) , ( index as u32 ) & 7 , i) )
1251
1280
}
0 commit comments