1+ #[ cfg( test) ]
2+ use stdarch_test:: assert_instr;
3+
14/// Load tile configuration from a 64-byte memory location specified by mem_addr.
25/// The tile configuration format is specified below, and includes the tile type pallette,
36/// the number of bytes per row, and the number of rows. If the specified pallette_id is zero,
710/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_tile_loadconfig&ig_expand=6875)
811#[ inline]
912#[ target_feature( enable = "amx-tile" ) ]
13+ #[ cfg_attr( test, assert_instr( ldtilecfg) ) ]
1014#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
1115pub unsafe fn _tile_loadconfig ( mem_addr : * const u8 ) {
1216 ldtilecfg ( mem_addr) ;
@@ -19,6 +23,7 @@ pub unsafe fn _tile_loadconfig(mem_addr: *const u8) {
1923/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_tile_storeconfig&ig_expand=6879)
2024#[ inline]
2125#[ target_feature( enable = "amx-tile" ) ]
26+ #[ cfg_attr( test, assert_instr( sttilecfg) ) ]
2227#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
2328pub unsafe fn _tile_storeconfig ( mem_addr : * mut u8 ) {
2429 sttilecfg ( mem_addr) ;
@@ -30,6 +35,7 @@ pub unsafe fn _tile_storeconfig(mem_addr: *mut u8) {
3035#[ inline]
3136#[ rustc_legacy_const_generics( 0 ) ]
3237#[ target_feature( enable = "amx-tile" ) ]
38+ #[ cfg_attr( test, assert_instr( tileloadd, DST = 0 ) ) ]
3339#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
3440pub unsafe fn _tile_loadd < const DST : i32 > ( base : * const u8 , stride : usize ) {
3541 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -41,6 +47,7 @@ pub unsafe fn _tile_loadd<const DST: i32>(base: *const u8, stride: usize) {
4147/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_tile_release&ig_expand=6878)
4248#[ inline]
4349#[ target_feature( enable = "amx-tile" ) ]
50+ #[ cfg_attr( test, assert_instr( tilerelease) ) ]
4451#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
4552pub unsafe fn _tile_release ( ) {
4653 tilerelease ( ) ;
@@ -52,6 +59,7 @@ pub unsafe fn _tile_release() {
5259#[ inline]
5360#[ rustc_legacy_const_generics( 0 ) ]
5461#[ target_feature( enable = "amx-tile" ) ]
62+ #[ cfg_attr( test, assert_instr( tilestored, DST = 0 ) ) ]
5563#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
5664pub unsafe fn _tile_stored < const DST : i32 > ( base : * mut u8 , stride : usize ) {
5765 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -66,6 +74,7 @@ pub unsafe fn _tile_stored<const DST: i32>(base: *mut u8, stride: usize) {
6674#[ inline]
6775#[ rustc_legacy_const_generics( 0 ) ]
6876#[ target_feature( enable = "amx-tile" ) ]
77+ #[ cfg_attr( test, assert_instr( tileloaddt1, DST = 0 ) ) ]
6978#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
7079pub unsafe fn _tile_stream_loadd < const DST : i32 > ( base : * const u8 , stride : usize ) {
7180 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -78,6 +87,7 @@ pub unsafe fn _tile_stream_loadd<const DST: i32>(base: *const u8, stride: usize)
7887#[ inline]
7988#[ rustc_legacy_const_generics( 0 ) ]
8089#[ target_feature( enable = "amx-tile" ) ]
90+ #[ cfg_attr( test, assert_instr( tilezero, DST = 0 ) ) ]
8191#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
8292pub unsafe fn _tile_zero < const DST : i32 > ( ) {
8393 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -92,6 +102,7 @@ pub unsafe fn _tile_zero<const DST: i32>() {
92102#[ inline]
93103#[ rustc_legacy_const_generics( 0 , 1 , 2 ) ]
94104#[ target_feature( enable = "amx-bf16" ) ]
105+ #[ cfg_attr( test, assert_instr( tdpbf16ps, DST = 0 , A = 1 , B = 2 ) ) ]
95106#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
96107pub unsafe fn _tile_dpbf16ps < const DST : i32 , const A : i32 , const B : i32 > ( ) {
97108 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -109,6 +120,7 @@ pub unsafe fn _tile_dpbf16ps<const DST: i32, const A: i32, const B: i32>() {
109120#[ inline]
110121#[ rustc_legacy_const_generics( 0 , 1 , 2 ) ]
111122#[ target_feature( enable = "amx-int8" ) ]
123+ #[ cfg_attr( test, assert_instr( tdpbssd, DST = 0 , A = 1 , B = 2 ) ) ]
112124#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
113125pub unsafe fn _tile_dpbssd < const DST : i32 , const A : i32 , const B : i32 > ( ) {
114126 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -126,6 +138,7 @@ pub unsafe fn _tile_dpbssd<const DST: i32, const A: i32, const B: i32>() {
126138#[ inline]
127139#[ rustc_legacy_const_generics( 0 , 1 , 2 ) ]
128140#[ target_feature( enable = "amx-int8" ) ]
141+ #[ cfg_attr( test, assert_instr( tdpbsud, DST = 0 , A = 1 , B = 2 ) ) ]
129142#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
130143pub unsafe fn _tile_dpbsud < const DST : i32 , const A : i32 , const B : i32 > ( ) {
131144 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -143,6 +156,7 @@ pub unsafe fn _tile_dpbsud<const DST: i32, const A: i32, const B: i32>() {
143156#[ inline]
144157#[ rustc_legacy_const_generics( 0 , 1 , 2 ) ]
145158#[ target_feature( enable = "amx-int8" ) ]
159+ #[ cfg_attr( test, assert_instr( tdpbusd, DST = 0 , A = 1 , B = 2 ) ) ]
146160#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
147161pub unsafe fn _tile_dpbusd < const DST : i32 , const A : i32 , const B : i32 > ( ) {
148162 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -160,6 +174,7 @@ pub unsafe fn _tile_dpbusd<const DST: i32, const A: i32, const B: i32>() {
160174#[ inline]
161175#[ rustc_legacy_const_generics( 0 , 1 , 2 ) ]
162176#[ target_feature( enable = "amx-int8" ) ]
177+ #[ cfg_attr( test, assert_instr( tdpbuud, DST = 0 , A = 1 , B = 2 ) ) ]
163178#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
164179pub unsafe fn _tile_dpbuud < const DST : i32 , const A : i32 , const B : i32 > ( ) {
165180 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -176,6 +191,10 @@ pub unsafe fn _tile_dpbuud<const DST: i32, const A: i32, const B: i32>() {
176191#[ inline]
177192#[ rustc_legacy_const_generics( 0 , 1 , 2 ) ]
178193#[ target_feature( enable = "amx-fp16" ) ]
194+ #[ cfg_attr(
195+ all( test, any( target_os = "linux" , target_env = "msvc" ) ) ,
196+ assert_instr( tdpfp16ps, DST = 0 , A = 1 , B = 2 )
197+ ) ]
179198#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
180199pub unsafe fn _tile_dpfp16ps < const DST : i32 , const A : i32 , const B : i32 > ( ) {
181200 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -196,6 +215,10 @@ pub unsafe fn _tile_dpfp16ps<const DST: i32, const A: i32, const B: i32>() {
196215#[ inline]
197216#[ rustc_legacy_const_generics( 0 , 1 , 2 ) ]
198217#[ target_feature( enable = "amx-complex" ) ]
218+ #[ cfg_attr(
219+ all( test, any( target_os = "linux" , target_env = "msvc" ) ) ,
220+ assert_instr( tcmmimfp16ps, DST = 0 , A = 1 , B = 2 )
221+ ) ]
199222#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
200223pub unsafe fn _tile_cmmimfp16ps < const DST : i32 , const A : i32 , const B : i32 > ( ) {
201224 static_assert_uimm_bits ! ( DST , 3 ) ;
@@ -216,6 +239,10 @@ pub unsafe fn _tile_cmmimfp16ps<const DST: i32, const A: i32, const B: i32>() {
216239#[ inline]
217240#[ rustc_legacy_const_generics( 0 , 1 , 2 ) ]
218241#[ target_feature( enable = "amx-complex" ) ]
242+ #[ cfg_attr(
243+ all( test, any( target_os = "linux" , target_env = "msvc" ) ) ,
244+ assert_instr( tcmmrlfp16ps, DST = 0 , A = 1 , B = 2 )
245+ ) ]
219246#[ unstable( feature = "x86_amx_intrinsics" , issue = "126622" ) ]
220247pub unsafe fn _tile_cmmrlfp16ps < const DST : i32 , const A : i32 , const B : i32 > ( ) {
221248 static_assert_uimm_bits ! ( DST , 3 ) ;
0 commit comments