File tree 4 files changed +10
-1
lines changed
4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -221,4 +221,6 @@ features! {
221
221
/// MOVBE (Move Data After Swapping Bytes)
222
222
@FEATURE : #[ stable( feature = "simd_x86" , since = "1.27.0" ) ] ermsb: "ermsb" ;
223
223
/// ERMSB, Enhanced REP MOVSB and STOSB
224
+ @FEATURE : #[ unstable( feature = "xop_target_feature" , issue = "127208" ) ] xop: "xop" ;
225
+ /// XOP: eXtended Operations (AMD)
224
226
}
Original file line number Diff line number Diff line change @@ -264,6 +264,7 @@ pub(crate) fn detect_features() -> cache::Initializer {
264
264
// These features are available on AMD arch CPUs:
265
265
enable ( extended_proc_info_ecx, 6 , Feature :: sse4a) ;
266
266
enable ( extended_proc_info_ecx, 21 , Feature :: tbm) ;
267
+ enable ( extended_proc_info_ecx, 11 , Feature :: xop) ;
267
268
}
268
269
}
269
270
Original file line number Diff line number Diff line change 3
3
#![ cfg_attr( target_arch = "arm" , feature( stdarch_arm_feature_detection) ) ]
4
4
#![ cfg_attr( target_arch = "powerpc" , feature( stdarch_powerpc_feature_detection) ) ]
5
5
#![ cfg_attr( target_arch = "powerpc64" , feature( stdarch_powerpc_feature_detection) ) ]
6
+ #![ cfg_attr(
7
+ any( target_arch = "x86" , target_arch = "x86_64" ) ,
8
+ feature( xop_target_feature)
9
+ ) ]
6
10
#![ allow( clippy:: unwrap_used, clippy:: use_debug, clippy:: print_stdout) ]
7
11
8
12
#[ cfg_attr(
@@ -252,6 +256,7 @@ fn x86_all() {
252
256
println ! ( "xsaveopt: {:?}" , is_x86_feature_detected!( "xsaveopt" ) ) ;
253
257
println ! ( "xsaves: {:?}" , is_x86_feature_detected!( "xsaves" ) ) ;
254
258
println ! ( "xsavec: {:?}" , is_x86_feature_detected!( "xsavec" ) ) ;
259
+ println ! ( "xop: {:?}" , is_x86_feature_detected!( "xop" ) ) ;
255
260
}
256
261
257
262
#[ test]
Original file line number Diff line number Diff line change 1
1
#![ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
2
2
#![ allow( internal_features) ]
3
- #![ feature( stdarch_internal, avx512_target_feature) ]
3
+ #![ feature( stdarch_internal, avx512_target_feature, xop_target_feature ) ]
4
4
5
5
extern crate cupid;
6
6
#[ macro_use]
@@ -79,6 +79,7 @@ fn dump() {
79
79
"avxvnniint16: {:?}" ,
80
80
is_x86_feature_detected!( "avxvnniint16" )
81
81
) ;
82
+ println ! ( "xop: {:?}" , is_x86_feature_detected!( "xop" ) ) ;
82
83
}
83
84
84
85
#[ cfg( feature = "std_detect_env_override" ) ]
You can’t perform that action at this time.
0 commit comments