1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
//! Original PTX specification:
//!
//! tcgen05.st.sync.aligned.shape1.num{.unpack}.b32 [taddr], r;
//! tcgen05.st.sync.aligned.shape2.num{.unpack}.b32 [taddr], immHalfSplitoff, r;
//! .shape1 = { .16x64b, .16x128b, .16x256b, .32x32b };
//! .shape2 = { .16x32bx2 };
//! .num = { .x1, .x2, .x4, .x8, .x16, .x32, .x64, .x128 };
//! .unpack = { .unpack::16b };
#![allow(unused)]
use crate::lexer::PtxToken;
use crate::unparser::{PtxUnparser, common::*};
pub mod section_0 {
use super::*;
use crate::r#type::instruction::tcgen05_st::section_0::*;
impl PtxUnparser for Tcgen05StSyncAlignedShape1NumUnpackB32 {
fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
push_opcode(tokens, "tcgen05");
push_directive(tokens, "st");
push_directive(tokens, "sync");
push_directive(tokens, "aligned");
match &self.shape1 {
Shape1::_16x128b => {
push_directive(tokens, "16x128b");
}
Shape1::_16x256b => {
push_directive(tokens, "16x256b");
}
Shape1::_16x64b => {
push_directive(tokens, "16x64b");
}
Shape1::_32x32b => {
push_directive(tokens, "32x32b");
}
}
match &self.num {
Num::X128 => {
push_directive(tokens, "x128");
}
Num::X16 => {
push_directive(tokens, "x16");
}
Num::X32 => {
push_directive(tokens, "x32");
}
Num::X64 => {
push_directive(tokens, "x64");
}
Num::X1 => {
push_directive(tokens, "x1");
}
Num::X2 => {
push_directive(tokens, "x2");
}
Num::X4 => {
push_directive(tokens, "x4");
}
Num::X8 => {
push_directive(tokens, "x8");
}
}
if let Some(unpack_0) = self.unpack.as_ref() {
match unpack_0 {
Unpack::Unpack16b => {
push_directive(tokens, "unpack::16b");
}
}
}
push_directive(tokens, "b32");
self.taddr.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.r.unparse_tokens(tokens);
tokens.push(PtxToken::Semicolon);
}
}
impl PtxUnparser for Tcgen05StSyncAlignedShape2NumUnpackB32 {
fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
push_opcode(tokens, "tcgen05");
push_directive(tokens, "st");
push_directive(tokens, "sync");
push_directive(tokens, "aligned");
match &self.shape2 {
Shape2::_16x32bx2 => {
push_directive(tokens, "16x32bx2");
}
}
match &self.num {
Num::X128 => {
push_directive(tokens, "x128");
}
Num::X16 => {
push_directive(tokens, "x16");
}
Num::X32 => {
push_directive(tokens, "x32");
}
Num::X64 => {
push_directive(tokens, "x64");
}
Num::X1 => {
push_directive(tokens, "x1");
}
Num::X2 => {
push_directive(tokens, "x2");
}
Num::X4 => {
push_directive(tokens, "x4");
}
Num::X8 => {
push_directive(tokens, "x8");
}
}
if let Some(unpack_1) = self.unpack.as_ref() {
match unpack_1 {
Unpack::Unpack16b => {
push_directive(tokens, "unpack::16b");
}
}
}
push_directive(tokens, "b32");
self.taddr.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.immhalfsplitoff.unparse_tokens(tokens);
tokens.push(PtxToken::Comma);
self.r.unparse_tokens(tokens);
tokens.push(PtxToken::Semicolon);
}
}
}