|
14 | 14 | //===----------------------------------------------------------------------===//
|
15 | 15 | // AMX instructions
|
16 | 16 |
|
17 |
| -let Predicates = [HasAMXTILE, In64BitMode] in { |
18 |
| - let SchedRW = [WriteSystem] in { |
19 |
| - let hasSideEffects = 1, |
20 |
| - Defs = [TMM0,TMM1,TMM2,TMM3,TMM4,TMM5,TMM6,TMM7] in |
21 |
| - def LDTILECFG : I <0x49, MRM0m, (outs), (ins opaquemem:$src), |
22 |
| - "ldtilecfg\t$src", |
23 |
| - [(int_x86_ldtilecfg addr:$src)]>, VEX, T8; |
24 |
| - let hasSideEffects = 1 in |
25 |
| - def STTILECFG : I <0x49, MRM0m, (outs), (ins opaquemem:$src), |
26 |
| - "sttilecfg\t$src", |
27 |
| - [(int_x86_sttilecfg addr:$src)]>, VEX, T8, PD; |
28 |
| - let mayLoad = 1 in |
29 |
| - def TILELOADD : I<0x4b, MRMSrcMemFSIB, (outs TILE:$dst), |
30 |
| - (ins sibmem:$src), |
31 |
| - "tileloadd\t{$src, $dst|$dst, $src}", []>, |
32 |
| - VEX, T8, XD; |
33 |
| - let mayLoad = 1 in |
34 |
| - def TILELOADDT1 : I<0x4b, MRMSrcMemFSIB, (outs TILE:$dst), |
35 |
| - (ins sibmem:$src), |
36 |
| - "tileloaddt1\t{$src, $dst|$dst, $src}", []>, |
37 |
| - VEX, T8, PD; |
| 17 | +multiclass AMX_TILE_COMMON<string Suffix, Predicate HasEGPR> { |
| 18 | +let Predicates = [HasAMXTILE, HasEGPR, In64BitMode] in { |
| 19 | + let hasSideEffects = 1, |
| 20 | + Defs = [TMM0,TMM1,TMM2,TMM3,TMM4,TMM5,TMM6,TMM7] in |
| 21 | + def LDTILECFG#Suffix : I<0x49, MRM0m, (outs), (ins opaquemem:$src), |
| 22 | + "ldtilecfg\t$src", |
| 23 | + [(int_x86_ldtilecfg addr:$src)]>, |
| 24 | + T8, PS; |
| 25 | + let hasSideEffects = 1 in |
| 26 | + def STTILECFG#Suffix : I<0x49, MRM0m, (outs), (ins opaquemem:$src), |
| 27 | + "sttilecfg\t$src", |
| 28 | + [(int_x86_sttilecfg addr:$src)]>, |
| 29 | + T8, PD; |
| 30 | + let mayLoad = 1 in |
| 31 | + def TILELOADD#Suffix : I<0x4b, MRMSrcMemFSIB, (outs TILE:$dst), |
| 32 | + (ins sibmem:$src), |
| 33 | + "tileloadd\t{$src, $dst|$dst, $src}", []>, |
| 34 | + T8, XD; |
| 35 | + let mayLoad = 1 in |
| 36 | + def TILELOADDT1#Suffix : I<0x4b, MRMSrcMemFSIB, (outs TILE:$dst), |
| 37 | + (ins sibmem:$src), |
| 38 | + "tileloaddt1\t{$src, $dst|$dst, $src}", []>, |
| 39 | + T8, PD; |
| 40 | + let mayStore = 1 in |
| 41 | + def TILESTORED#Suffix : I<0x4b, MRMDestMemFSIB, (outs), |
| 42 | + (ins sibmem:$dst, TILE:$src), |
| 43 | + "tilestored\t{$src, $dst|$dst, $src}", []>, |
| 44 | + T8, XS; |
| 45 | +} |
| 46 | +} |
| 47 | + |
| 48 | +let SchedRW = [WriteSystem] in { |
| 49 | + defm "" : AMX_TILE_COMMON<"", NoEGPR>, VEX; |
| 50 | + defm "" : AMX_TILE_COMMON<"_EVEX", HasEGPR>, EVEX, NoCD8; |
| 51 | + |
| 52 | + let Predicates = [HasAMXTILE, In64BitMode] in { |
38 | 53 | let Defs = [TMM0,TMM1,TMM2,TMM3,TMM4,TMM5,TMM6,TMM7] in
|
39 | 54 | def TILERELEASE : I<0x49, MRM_C0, (outs), (ins),
|
40 |
| - "tilerelease", [(int_x86_tilerelease)]>, VEX, T8; |
41 |
| - let mayStore = 1 in |
42 |
| - def TILESTORED : I<0x4b, MRMDestMemFSIB, (outs), |
43 |
| - (ins sibmem:$dst, TILE:$src), |
44 |
| - "tilestored\t{$src, $dst|$dst, $src}", []>, |
45 |
| - VEX, T8, XS; |
| 55 | + "tilerelease", [(int_x86_tilerelease)]>, VEX, T8, PS; |
46 | 56 | def TILEZERO : I<0x49, MRMr0, (outs TILE:$dst), (ins),
|
47 | 57 | "tilezero\t$dst", []>,
|
48 | 58 | VEX, T8, XD;
|
@@ -82,8 +92,8 @@ let Predicates = [HasAMXTILE, In64BitMode] in {
|
82 | 92 | def PTILEZERO : PseudoI<(outs), (ins u8imm:$src),
|
83 | 93 | [(int_x86_tilezero timm:$src)]>;
|
84 | 94 | }
|
85 |
| - } // SchedRW |
86 |
| -} // HasAMXTILE |
| 95 | + } // Predicates |
| 96 | +} // SchedRW |
87 | 97 |
|
88 | 98 | let Predicates = [HasAMXINT8, In64BitMode] in {
|
89 | 99 | let SchedRW = [WriteSystem] in {
|
|
0 commit comments