ptx_parser/unparser/instruction/
ld.rs

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