1#![allow(unused)]
24
25use crate::lexer::PtxToken;
26use crate::unparser::{PtxUnparser, common::*};
27
28pub mod section_0 {
29 use super::*;
30 use crate::r#type::instruction::st::section_0::*;
31
32 impl PtxUnparser for StWeakSsCopLevelCacheHintVecType {
33 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
34 push_opcode(tokens, "st");
35 if self.weak {
36 push_directive(tokens, "weak");
37 }
38 if let Some(ss_0) = self.ss.as_ref() {
39 match ss_0 {
40 Ss::SharedCluster => {
41 push_directive(tokens, "shared::cluster");
42 }
43 Ss::ParamFunc => {
44 push_directive(tokens, "param::func");
45 }
46 Ss::SharedCta => {
47 push_directive(tokens, "shared::cta");
48 }
49 Ss::Global => {
50 push_directive(tokens, "global");
51 }
52 Ss::Shared => {
53 push_directive(tokens, "shared");
54 }
55 Ss::Local => {
56 push_directive(tokens, "local");
57 }
58 Ss::Param => {
59 push_directive(tokens, "param");
60 }
61 }
62 }
63 if let Some(cop_1) = self.cop.as_ref() {
64 match cop_1 {
65 Cop::Wb => {
66 push_directive(tokens, "wb");
67 }
68 Cop::Cg => {
69 push_directive(tokens, "cg");
70 }
71 Cop::Cs => {
72 push_directive(tokens, "cs");
73 }
74 Cop::Wt => {
75 push_directive(tokens, "wt");
76 }
77 }
78 }
79 if let Some(level_cache_hint_2) = self.level_cache_hint.as_ref() {
80 match level_cache_hint_2 {
81 LevelCacheHint::L2CacheHint => {
82 push_directive(tokens, "L2::cache_hint");
83 }
84 }
85 }
86 if let Some(vec_3) = self.vec.as_ref() {
87 match vec_3 {
88 Vec::V2 => {
89 push_directive(tokens, "v2");
90 }
91 Vec::V4 => {
92 push_directive(tokens, "v4");
93 }
94 Vec::V8 => {
95 push_directive(tokens, "v8");
96 }
97 }
98 }
99 match &self.type_ {
100 Type::B128 => {
101 push_directive(tokens, "b128");
102 }
103 Type::B16 => {
104 push_directive(tokens, "b16");
105 }
106 Type::B32 => {
107 push_directive(tokens, "b32");
108 }
109 Type::B64 => {
110 push_directive(tokens, "b64");
111 }
112 Type::U16 => {
113 push_directive(tokens, "u16");
114 }
115 Type::U32 => {
116 push_directive(tokens, "u32");
117 }
118 Type::U64 => {
119 push_directive(tokens, "u64");
120 }
121 Type::S16 => {
122 push_directive(tokens, "s16");
123 }
124 Type::S32 => {
125 push_directive(tokens, "s32");
126 }
127 Type::S64 => {
128 push_directive(tokens, "s64");
129 }
130 Type::F32 => {
131 push_directive(tokens, "f32");
132 }
133 Type::F64 => {
134 push_directive(tokens, "f64");
135 }
136 Type::B8 => {
137 push_directive(tokens, "b8");
138 }
139 Type::U8 => {
140 push_directive(tokens, "u8");
141 }
142 Type::S8 => {
143 push_directive(tokens, "s8");
144 }
145 }
146 self.a.unparse_tokens(tokens);
147 tokens.push(PtxToken::Comma);
148 self.b.unparse_tokens(tokens);
149 if self.cache_policy.is_some() {
150 tokens.push(PtxToken::Comma);
151 }
152 if let Some(opt_4) = self.cache_policy.as_ref() {
153 opt_4.unparse_tokens(tokens);
154 }
155 tokens.push(PtxToken::Semicolon);
156 }
157 }
158
159 impl PtxUnparser for StWeakSsLevel1EvictionPriorityLevel2EvictionPriorityLevelCacheHintVecType {
160 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
161 push_opcode(tokens, "st");
162 if self.weak {
163 push_directive(tokens, "weak");
164 }
165 if let Some(ss_5) = self.ss.as_ref() {
166 match ss_5 {
167 Ss::SharedCluster => {
168 push_directive(tokens, "shared::cluster");
169 }
170 Ss::ParamFunc => {
171 push_directive(tokens, "param::func");
172 }
173 Ss::SharedCta => {
174 push_directive(tokens, "shared::cta");
175 }
176 Ss::Global => {
177 push_directive(tokens, "global");
178 }
179 Ss::Shared => {
180 push_directive(tokens, "shared");
181 }
182 Ss::Local => {
183 push_directive(tokens, "local");
184 }
185 Ss::Param => {
186 push_directive(tokens, "param");
187 }
188 }
189 }
190 if let Some(level1_eviction_priority_6) = self.level1_eviction_priority.as_ref() {
191 match level1_eviction_priority_6 {
192 Level1EvictionPriority::L1EvictUnchanged => {
193 push_directive(tokens, "L1::evict_unchanged");
194 }
195 Level1EvictionPriority::L1EvictNormal => {
196 push_directive(tokens, "L1::evict_normal");
197 }
198 Level1EvictionPriority::L1EvictFirst => {
199 push_directive(tokens, "L1::evict_first");
200 }
201 Level1EvictionPriority::L1NoAllocate => {
202 push_directive(tokens, "L1::no_allocate");
203 }
204 Level1EvictionPriority::L1EvictLast => {
205 push_directive(tokens, "L1::evict_last");
206 }
207 }
208 }
209 if let Some(level2_eviction_priority_7) = self.level2_eviction_priority.as_ref() {
210 match level2_eviction_priority_7 {
211 Level2EvictionPriority::L2EvictNormal => {
212 push_directive(tokens, "L2::evict_normal");
213 }
214 Level2EvictionPriority::L2EvictFirst => {
215 push_directive(tokens, "L2::evict_first");
216 }
217 Level2EvictionPriority::L2EvictLast => {
218 push_directive(tokens, "L2::evict_last");
219 }
220 }
221 }
222 if let Some(level_cache_hint_8) = self.level_cache_hint.as_ref() {
223 match level_cache_hint_8 {
224 LevelCacheHint::L2CacheHint => {
225 push_directive(tokens, "L2::cache_hint");
226 }
227 }
228 }
229 if let Some(vec_9) = self.vec.as_ref() {
230 match vec_9 {
231 Vec::V2 => {
232 push_directive(tokens, "v2");
233 }
234 Vec::V4 => {
235 push_directive(tokens, "v4");
236 }
237 Vec::V8 => {
238 push_directive(tokens, "v8");
239 }
240 }
241 }
242 match &self.type_ {
243 Type::B128 => {
244 push_directive(tokens, "b128");
245 }
246 Type::B16 => {
247 push_directive(tokens, "b16");
248 }
249 Type::B32 => {
250 push_directive(tokens, "b32");
251 }
252 Type::B64 => {
253 push_directive(tokens, "b64");
254 }
255 Type::U16 => {
256 push_directive(tokens, "u16");
257 }
258 Type::U32 => {
259 push_directive(tokens, "u32");
260 }
261 Type::U64 => {
262 push_directive(tokens, "u64");
263 }
264 Type::S16 => {
265 push_directive(tokens, "s16");
266 }
267 Type::S32 => {
268 push_directive(tokens, "s32");
269 }
270 Type::S64 => {
271 push_directive(tokens, "s64");
272 }
273 Type::F32 => {
274 push_directive(tokens, "f32");
275 }
276 Type::F64 => {
277 push_directive(tokens, "f64");
278 }
279 Type::B8 => {
280 push_directive(tokens, "b8");
281 }
282 Type::U8 => {
283 push_directive(tokens, "u8");
284 }
285 Type::S8 => {
286 push_directive(tokens, "s8");
287 }
288 }
289 self.a.unparse_tokens(tokens);
290 tokens.push(PtxToken::Comma);
291 self.b.unparse_tokens(tokens);
292 if self.cache_policy.is_some() {
293 tokens.push(PtxToken::Comma);
294 }
295 if let Some(opt_10) = self.cache_policy.as_ref() {
296 opt_10.unparse_tokens(tokens);
297 }
298 tokens.push(PtxToken::Semicolon);
299 }
300 }
301
302 impl PtxUnparser for StVolatileSsVecType {
303 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
304 push_opcode(tokens, "st");
305 push_directive(tokens, "volatile");
306 if let Some(ss_11) = self.ss.as_ref() {
307 match ss_11 {
308 Ss::SharedCluster => {
309 push_directive(tokens, "shared::cluster");
310 }
311 Ss::ParamFunc => {
312 push_directive(tokens, "param::func");
313 }
314 Ss::SharedCta => {
315 push_directive(tokens, "shared::cta");
316 }
317 Ss::Global => {
318 push_directive(tokens, "global");
319 }
320 Ss::Shared => {
321 push_directive(tokens, "shared");
322 }
323 Ss::Local => {
324 push_directive(tokens, "local");
325 }
326 Ss::Param => {
327 push_directive(tokens, "param");
328 }
329 }
330 }
331 if let Some(vec_12) = self.vec.as_ref() {
332 match vec_12 {
333 Vec::V2 => {
334 push_directive(tokens, "v2");
335 }
336 Vec::V4 => {
337 push_directive(tokens, "v4");
338 }
339 Vec::V8 => {
340 push_directive(tokens, "v8");
341 }
342 }
343 }
344 match &self.type_ {
345 Type::B128 => {
346 push_directive(tokens, "b128");
347 }
348 Type::B16 => {
349 push_directive(tokens, "b16");
350 }
351 Type::B32 => {
352 push_directive(tokens, "b32");
353 }
354 Type::B64 => {
355 push_directive(tokens, "b64");
356 }
357 Type::U16 => {
358 push_directive(tokens, "u16");
359 }
360 Type::U32 => {
361 push_directive(tokens, "u32");
362 }
363 Type::U64 => {
364 push_directive(tokens, "u64");
365 }
366 Type::S16 => {
367 push_directive(tokens, "s16");
368 }
369 Type::S32 => {
370 push_directive(tokens, "s32");
371 }
372 Type::S64 => {
373 push_directive(tokens, "s64");
374 }
375 Type::F32 => {
376 push_directive(tokens, "f32");
377 }
378 Type::F64 => {
379 push_directive(tokens, "f64");
380 }
381 Type::B8 => {
382 push_directive(tokens, "b8");
383 }
384 Type::U8 => {
385 push_directive(tokens, "u8");
386 }
387 Type::S8 => {
388 push_directive(tokens, "s8");
389 }
390 }
391 self.a.unparse_tokens(tokens);
392 tokens.push(PtxToken::Comma);
393 self.b.unparse_tokens(tokens);
394 tokens.push(PtxToken::Semicolon);
395 }
396 }
397
398 impl PtxUnparser
399 for StRelaxedScopeSsLevel1EvictionPriorityLevel2EvictionPriorityLevelCacheHintVecType
400 {
401 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
402 push_opcode(tokens, "st");
403 push_directive(tokens, "relaxed");
404 match &self.scope {
405 Scope::Cluster => {
406 push_directive(tokens, "cluster");
407 }
408 Scope::Cta => {
409 push_directive(tokens, "cta");
410 }
411 Scope::Gpu => {
412 push_directive(tokens, "gpu");
413 }
414 Scope::Sys => {
415 push_directive(tokens, "sys");
416 }
417 }
418 if let Some(ss_13) = self.ss.as_ref() {
419 match ss_13 {
420 Ss::SharedCluster => {
421 push_directive(tokens, "shared::cluster");
422 }
423 Ss::ParamFunc => {
424 push_directive(tokens, "param::func");
425 }
426 Ss::SharedCta => {
427 push_directive(tokens, "shared::cta");
428 }
429 Ss::Global => {
430 push_directive(tokens, "global");
431 }
432 Ss::Shared => {
433 push_directive(tokens, "shared");
434 }
435 Ss::Local => {
436 push_directive(tokens, "local");
437 }
438 Ss::Param => {
439 push_directive(tokens, "param");
440 }
441 }
442 }
443 if let Some(level1_eviction_priority_14) = self.level1_eviction_priority.as_ref() {
444 match level1_eviction_priority_14 {
445 Level1EvictionPriority::L1EvictUnchanged => {
446 push_directive(tokens, "L1::evict_unchanged");
447 }
448 Level1EvictionPriority::L1EvictNormal => {
449 push_directive(tokens, "L1::evict_normal");
450 }
451 Level1EvictionPriority::L1EvictFirst => {
452 push_directive(tokens, "L1::evict_first");
453 }
454 Level1EvictionPriority::L1NoAllocate => {
455 push_directive(tokens, "L1::no_allocate");
456 }
457 Level1EvictionPriority::L1EvictLast => {
458 push_directive(tokens, "L1::evict_last");
459 }
460 }
461 }
462 if let Some(level2_eviction_priority_15) = self.level2_eviction_priority.as_ref() {
463 match level2_eviction_priority_15 {
464 Level2EvictionPriority::L2EvictNormal => {
465 push_directive(tokens, "L2::evict_normal");
466 }
467 Level2EvictionPriority::L2EvictFirst => {
468 push_directive(tokens, "L2::evict_first");
469 }
470 Level2EvictionPriority::L2EvictLast => {
471 push_directive(tokens, "L2::evict_last");
472 }
473 }
474 }
475 if let Some(level_cache_hint_16) = self.level_cache_hint.as_ref() {
476 match level_cache_hint_16 {
477 LevelCacheHint::L2CacheHint => {
478 push_directive(tokens, "L2::cache_hint");
479 }
480 }
481 }
482 if let Some(vec_17) = self.vec.as_ref() {
483 match vec_17 {
484 Vec::V2 => {
485 push_directive(tokens, "v2");
486 }
487 Vec::V4 => {
488 push_directive(tokens, "v4");
489 }
490 Vec::V8 => {
491 push_directive(tokens, "v8");
492 }
493 }
494 }
495 match &self.type_ {
496 Type::B128 => {
497 push_directive(tokens, "b128");
498 }
499 Type::B16 => {
500 push_directive(tokens, "b16");
501 }
502 Type::B32 => {
503 push_directive(tokens, "b32");
504 }
505 Type::B64 => {
506 push_directive(tokens, "b64");
507 }
508 Type::U16 => {
509 push_directive(tokens, "u16");
510 }
511 Type::U32 => {
512 push_directive(tokens, "u32");
513 }
514 Type::U64 => {
515 push_directive(tokens, "u64");
516 }
517 Type::S16 => {
518 push_directive(tokens, "s16");
519 }
520 Type::S32 => {
521 push_directive(tokens, "s32");
522 }
523 Type::S64 => {
524 push_directive(tokens, "s64");
525 }
526 Type::F32 => {
527 push_directive(tokens, "f32");
528 }
529 Type::F64 => {
530 push_directive(tokens, "f64");
531 }
532 Type::B8 => {
533 push_directive(tokens, "b8");
534 }
535 Type::U8 => {
536 push_directive(tokens, "u8");
537 }
538 Type::S8 => {
539 push_directive(tokens, "s8");
540 }
541 }
542 self.a.unparse_tokens(tokens);
543 tokens.push(PtxToken::Comma);
544 self.b.unparse_tokens(tokens);
545 if self.cache_policy.is_some() {
546 tokens.push(PtxToken::Comma);
547 }
548 if let Some(opt_18) = self.cache_policy.as_ref() {
549 opt_18.unparse_tokens(tokens);
550 }
551 tokens.push(PtxToken::Semicolon);
552 }
553 }
554
555 impl PtxUnparser
556 for StReleaseScopeSsLevel1EvictionPriorityLevel2EvictionPriorityLevelCacheHintVecType
557 {
558 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
559 push_opcode(tokens, "st");
560 push_directive(tokens, "release");
561 match &self.scope {
562 Scope::Cluster => {
563 push_directive(tokens, "cluster");
564 }
565 Scope::Cta => {
566 push_directive(tokens, "cta");
567 }
568 Scope::Gpu => {
569 push_directive(tokens, "gpu");
570 }
571 Scope::Sys => {
572 push_directive(tokens, "sys");
573 }
574 }
575 if let Some(ss_19) = self.ss.as_ref() {
576 match ss_19 {
577 Ss::SharedCluster => {
578 push_directive(tokens, "shared::cluster");
579 }
580 Ss::ParamFunc => {
581 push_directive(tokens, "param::func");
582 }
583 Ss::SharedCta => {
584 push_directive(tokens, "shared::cta");
585 }
586 Ss::Global => {
587 push_directive(tokens, "global");
588 }
589 Ss::Shared => {
590 push_directive(tokens, "shared");
591 }
592 Ss::Local => {
593 push_directive(tokens, "local");
594 }
595 Ss::Param => {
596 push_directive(tokens, "param");
597 }
598 }
599 }
600 if let Some(level1_eviction_priority_20) = self.level1_eviction_priority.as_ref() {
601 match level1_eviction_priority_20 {
602 Level1EvictionPriority::L1EvictUnchanged => {
603 push_directive(tokens, "L1::evict_unchanged");
604 }
605 Level1EvictionPriority::L1EvictNormal => {
606 push_directive(tokens, "L1::evict_normal");
607 }
608 Level1EvictionPriority::L1EvictFirst => {
609 push_directive(tokens, "L1::evict_first");
610 }
611 Level1EvictionPriority::L1NoAllocate => {
612 push_directive(tokens, "L1::no_allocate");
613 }
614 Level1EvictionPriority::L1EvictLast => {
615 push_directive(tokens, "L1::evict_last");
616 }
617 }
618 }
619 if let Some(level2_eviction_priority_21) = self.level2_eviction_priority.as_ref() {
620 match level2_eviction_priority_21 {
621 Level2EvictionPriority::L2EvictNormal => {
622 push_directive(tokens, "L2::evict_normal");
623 }
624 Level2EvictionPriority::L2EvictFirst => {
625 push_directive(tokens, "L2::evict_first");
626 }
627 Level2EvictionPriority::L2EvictLast => {
628 push_directive(tokens, "L2::evict_last");
629 }
630 }
631 }
632 if let Some(level_cache_hint_22) = self.level_cache_hint.as_ref() {
633 match level_cache_hint_22 {
634 LevelCacheHint::L2CacheHint => {
635 push_directive(tokens, "L2::cache_hint");
636 }
637 }
638 }
639 if let Some(vec_23) = self.vec.as_ref() {
640 match vec_23 {
641 Vec::V2 => {
642 push_directive(tokens, "v2");
643 }
644 Vec::V4 => {
645 push_directive(tokens, "v4");
646 }
647 Vec::V8 => {
648 push_directive(tokens, "v8");
649 }
650 }
651 }
652 match &self.type_ {
653 Type::B128 => {
654 push_directive(tokens, "b128");
655 }
656 Type::B16 => {
657 push_directive(tokens, "b16");
658 }
659 Type::B32 => {
660 push_directive(tokens, "b32");
661 }
662 Type::B64 => {
663 push_directive(tokens, "b64");
664 }
665 Type::U16 => {
666 push_directive(tokens, "u16");
667 }
668 Type::U32 => {
669 push_directive(tokens, "u32");
670 }
671 Type::U64 => {
672 push_directive(tokens, "u64");
673 }
674 Type::S16 => {
675 push_directive(tokens, "s16");
676 }
677 Type::S32 => {
678 push_directive(tokens, "s32");
679 }
680 Type::S64 => {
681 push_directive(tokens, "s64");
682 }
683 Type::F32 => {
684 push_directive(tokens, "f32");
685 }
686 Type::F64 => {
687 push_directive(tokens, "f64");
688 }
689 Type::B8 => {
690 push_directive(tokens, "b8");
691 }
692 Type::U8 => {
693 push_directive(tokens, "u8");
694 }
695 Type::S8 => {
696 push_directive(tokens, "s8");
697 }
698 }
699 self.a.unparse_tokens(tokens);
700 tokens.push(PtxToken::Comma);
701 self.b.unparse_tokens(tokens);
702 if self.cache_policy.is_some() {
703 tokens.push(PtxToken::Comma);
704 }
705 if let Some(opt_24) = self.cache_policy.as_ref() {
706 opt_24.unparse_tokens(tokens);
707 }
708 tokens.push(PtxToken::Semicolon);
709 }
710 }
711
712 impl PtxUnparser for StMmioRelaxedSysGlobalType {
713 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
714 push_opcode(tokens, "st");
715 push_directive(tokens, "mmio");
716 push_directive(tokens, "relaxed");
717 push_directive(tokens, "sys");
718 if self.global {
719 push_directive(tokens, "global");
720 }
721 match &self.type_ {
722 Type::B128 => {
723 push_directive(tokens, "b128");
724 }
725 Type::B16 => {
726 push_directive(tokens, "b16");
727 }
728 Type::B32 => {
729 push_directive(tokens, "b32");
730 }
731 Type::B64 => {
732 push_directive(tokens, "b64");
733 }
734 Type::U16 => {
735 push_directive(tokens, "u16");
736 }
737 Type::U32 => {
738 push_directive(tokens, "u32");
739 }
740 Type::U64 => {
741 push_directive(tokens, "u64");
742 }
743 Type::S16 => {
744 push_directive(tokens, "s16");
745 }
746 Type::S32 => {
747 push_directive(tokens, "s32");
748 }
749 Type::S64 => {
750 push_directive(tokens, "s64");
751 }
752 Type::F32 => {
753 push_directive(tokens, "f32");
754 }
755 Type::F64 => {
756 push_directive(tokens, "f64");
757 }
758 Type::B8 => {
759 push_directive(tokens, "b8");
760 }
761 Type::U8 => {
762 push_directive(tokens, "u8");
763 }
764 Type::S8 => {
765 push_directive(tokens, "s8");
766 }
767 }
768 self.a.unparse_tokens(tokens);
769 tokens.push(PtxToken::Comma);
770 self.b.unparse_tokens(tokens);
771 tokens.push(PtxToken::Semicolon);
772 }
773 }
774}