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() { tokens.push(PtxToken::Comma); }
174                    if let Some(opt_5) = self.cache_policy.as_ref() {
175                        opt_5.unparse_tokens(tokens);
176                    }
177            tokens.push(PtxToken::Semicolon);
178        }
179    }
180
181    impl PtxUnparser for LdWeakSsLevel1EvictionPriorityLevel2EvictionPriorityLevelCacheHintLevelPrefetchSizeVecType {
182        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
183            push_opcode(tokens, "ld");
184                    if self.weak {
185                            push_directive(tokens, "weak");
186                    }
187                    if let Some(ss_6) = self.ss.as_ref() {
188                            match ss_6 {
189                                    Ss::SharedCluster => {
190                                            push_directive(tokens, "shared::cluster");
191                                    }
192                                    Ss::ParamEntry => {
193                                            push_directive(tokens, "param::entry");
194                                    }
195                                    Ss::ParamFunc => {
196                                            push_directive(tokens, "param::func");
197                                    }
198                                    Ss::SharedCta => {
199                                            push_directive(tokens, "shared::cta");
200                                    }
201                                    Ss::Global => {
202                                            push_directive(tokens, "global");
203                                    }
204                                    Ss::Shared => {
205                                            push_directive(tokens, "shared");
206                                    }
207                                    Ss::Const => {
208                                            push_directive(tokens, "const");
209                                    }
210                                    Ss::Local => {
211                                            push_directive(tokens, "local");
212                                    }
213                                    Ss::Param => {
214                                            push_directive(tokens, "param");
215                                    }
216                            }
217                    }
218                    if let Some(level1_eviction_priority_7) = self.level1_eviction_priority.as_ref() {
219                            match level1_eviction_priority_7 {
220                                    Level1EvictionPriority::L1EvictUnchanged => {
221                                            push_directive(tokens, "L1::evict_unchanged");
222                                    }
223                                    Level1EvictionPriority::L1EvictNormal => {
224                                            push_directive(tokens, "L1::evict_normal");
225                                    }
226                                    Level1EvictionPriority::L1EvictFirst => {
227                                            push_directive(tokens, "L1::evict_first");
228                                    }
229                                    Level1EvictionPriority::L1NoAllocate => {
230                                            push_directive(tokens, "L1::no_allocate");
231                                    }
232                                    Level1EvictionPriority::L1EvictLast => {
233                                            push_directive(tokens, "L1::evict_last");
234                                    }
235                            }
236                    }
237                    if let Some(level2_eviction_priority_8) = self.level2_eviction_priority.as_ref() {
238                            match level2_eviction_priority_8 {
239                                    Level2EvictionPriority::L2EvictNormal => {
240                                            push_directive(tokens, "L2::evict_normal");
241                                    }
242                                    Level2EvictionPriority::L2EvictFirst => {
243                                            push_directive(tokens, "L2::evict_first");
244                                    }
245                                    Level2EvictionPriority::L2EvictLast => {
246                                            push_directive(tokens, "L2::evict_last");
247                                    }
248                            }
249                    }
250                    if let Some(level_cache_hint_9) = self.level_cache_hint.as_ref() {
251                            match level_cache_hint_9 {
252                                    LevelCacheHint::L2CacheHint => {
253                                            push_directive(tokens, "L2::cache_hint");
254                                    }
255                            }
256                    }
257                    if let Some(level_prefetch_size_10) = self.level_prefetch_size.as_ref() {
258                            match level_prefetch_size_10 {
259                                    LevelPrefetchSize::L2128b => {
260                                            push_directive(tokens, "L2::128B");
261                                    }
262                                    LevelPrefetchSize::L2256b => {
263                                            push_directive(tokens, "L2::256B");
264                                    }
265                                    LevelPrefetchSize::L264b => {
266                                            push_directive(tokens, "L2::64B");
267                                    }
268                            }
269                    }
270                    if let Some(vec_11) = self.vec.as_ref() {
271                            match vec_11 {
272                                    Vec::V2 => {
273                                            push_directive(tokens, "v2");
274                                    }
275                                    Vec::V4 => {
276                                            push_directive(tokens, "v4");
277                                    }
278                                    Vec::V8 => {
279                                            push_directive(tokens, "v8");
280                                    }
281                            }
282                    }
283                    match &self.type_ {
284                            Type::B128 => {
285                                    push_directive(tokens, "b128");
286                            }
287                            Type::B16 => {
288                                    push_directive(tokens, "b16");
289                            }
290                            Type::B32 => {
291                                    push_directive(tokens, "b32");
292                            }
293                            Type::B64 => {
294                                    push_directive(tokens, "b64");
295                            }
296                            Type::U16 => {
297                                    push_directive(tokens, "u16");
298                            }
299                            Type::U32 => {
300                                    push_directive(tokens, "u32");
301                            }
302                            Type::U64 => {
303                                    push_directive(tokens, "u64");
304                            }
305                            Type::S16 => {
306                                    push_directive(tokens, "s16");
307                            }
308                            Type::S32 => {
309                                    push_directive(tokens, "s32");
310                            }
311                            Type::S64 => {
312                                    push_directive(tokens, "s64");
313                            }
314                            Type::F32 => {
315                                    push_directive(tokens, "f32");
316                            }
317                            Type::F64 => {
318                                    push_directive(tokens, "f64");
319                            }
320                            Type::B8 => {
321                                    push_directive(tokens, "b8");
322                            }
323                            Type::U8 => {
324                                    push_directive(tokens, "u8");
325                            }
326                            Type::S8 => {
327                                    push_directive(tokens, "s8");
328                            }
329                    }
330                    self.d.unparse_tokens(tokens);
331            tokens.push(PtxToken::Comma);
332                    self.a.unparse_tokens(tokens);
333                    if self.unified {
334                            push_directive(tokens, "unified");
335                    }
336            if self.cache_policy.is_some() { tokens.push(PtxToken::Comma); }
337                    if let Some(opt_12) = self.cache_policy.as_ref() {
338                        opt_12.unparse_tokens(tokens);
339                    }
340            tokens.push(PtxToken::Semicolon);
341        }
342    }
343
344    impl PtxUnparser for LdVolatileSsLevelPrefetchSizeVecType {
345        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
346            push_opcode(tokens, "ld");
347                    push_directive(tokens, "volatile");
348                    if let Some(ss_13) = self.ss.as_ref() {
349                            match ss_13 {
350                                    Ss::SharedCluster => {
351                                            push_directive(tokens, "shared::cluster");
352                                    }
353                                    Ss::ParamEntry => {
354                                            push_directive(tokens, "param::entry");
355                                    }
356                                    Ss::ParamFunc => {
357                                            push_directive(tokens, "param::func");
358                                    }
359                                    Ss::SharedCta => {
360                                            push_directive(tokens, "shared::cta");
361                                    }
362                                    Ss::Global => {
363                                            push_directive(tokens, "global");
364                                    }
365                                    Ss::Shared => {
366                                            push_directive(tokens, "shared");
367                                    }
368                                    Ss::Const => {
369                                            push_directive(tokens, "const");
370                                    }
371                                    Ss::Local => {
372                                            push_directive(tokens, "local");
373                                    }
374                                    Ss::Param => {
375                                            push_directive(tokens, "param");
376                                    }
377                            }
378                    }
379                    if let Some(level_prefetch_size_14) = self.level_prefetch_size.as_ref() {
380                            match level_prefetch_size_14 {
381                                    LevelPrefetchSize::L2128b => {
382                                            push_directive(tokens, "L2::128B");
383                                    }
384                                    LevelPrefetchSize::L2256b => {
385                                            push_directive(tokens, "L2::256B");
386                                    }
387                                    LevelPrefetchSize::L264b => {
388                                            push_directive(tokens, "L2::64B");
389                                    }
390                            }
391                    }
392                    if let Some(vec_15) = self.vec.as_ref() {
393                            match vec_15 {
394                                    Vec::V2 => {
395                                            push_directive(tokens, "v2");
396                                    }
397                                    Vec::V4 => {
398                                            push_directive(tokens, "v4");
399                                    }
400                                    Vec::V8 => {
401                                            push_directive(tokens, "v8");
402                                    }
403                            }
404                    }
405                    match &self.type_ {
406                            Type::B128 => {
407                                    push_directive(tokens, "b128");
408                            }
409                            Type::B16 => {
410                                    push_directive(tokens, "b16");
411                            }
412                            Type::B32 => {
413                                    push_directive(tokens, "b32");
414                            }
415                            Type::B64 => {
416                                    push_directive(tokens, "b64");
417                            }
418                            Type::U16 => {
419                                    push_directive(tokens, "u16");
420                            }
421                            Type::U32 => {
422                                    push_directive(tokens, "u32");
423                            }
424                            Type::U64 => {
425                                    push_directive(tokens, "u64");
426                            }
427                            Type::S16 => {
428                                    push_directive(tokens, "s16");
429                            }
430                            Type::S32 => {
431                                    push_directive(tokens, "s32");
432                            }
433                            Type::S64 => {
434                                    push_directive(tokens, "s64");
435                            }
436                            Type::F32 => {
437                                    push_directive(tokens, "f32");
438                            }
439                            Type::F64 => {
440                                    push_directive(tokens, "f64");
441                            }
442                            Type::B8 => {
443                                    push_directive(tokens, "b8");
444                            }
445                            Type::U8 => {
446                                    push_directive(tokens, "u8");
447                            }
448                            Type::S8 => {
449                                    push_directive(tokens, "s8");
450                            }
451                    }
452                    self.d.unparse_tokens(tokens);
453            tokens.push(PtxToken::Comma);
454                    self.a.unparse_tokens(tokens);
455            tokens.push(PtxToken::Semicolon);
456        }
457    }
458
459    impl PtxUnparser for LdRelaxedScopeSsLevel1EvictionPriorityLevel2EvictionPriorityLevelCacheHintLevelPrefetchSizeVecType {
460        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
461            push_opcode(tokens, "ld");
462                    push_directive(tokens, "relaxed");
463                    match &self.scope {
464                            Scope::Cluster => {
465                                    push_directive(tokens, "cluster");
466                            }
467                            Scope::Cta => {
468                                    push_directive(tokens, "cta");
469                            }
470                            Scope::Gpu => {
471                                    push_directive(tokens, "gpu");
472                            }
473                            Scope::Sys => {
474                                    push_directive(tokens, "sys");
475                            }
476                    }
477                    if let Some(ss_16) = self.ss.as_ref() {
478                            match ss_16 {
479                                    Ss::SharedCluster => {
480                                            push_directive(tokens, "shared::cluster");
481                                    }
482                                    Ss::ParamEntry => {
483                                            push_directive(tokens, "param::entry");
484                                    }
485                                    Ss::ParamFunc => {
486                                            push_directive(tokens, "param::func");
487                                    }
488                                    Ss::SharedCta => {
489                                            push_directive(tokens, "shared::cta");
490                                    }
491                                    Ss::Global => {
492                                            push_directive(tokens, "global");
493                                    }
494                                    Ss::Shared => {
495                                            push_directive(tokens, "shared");
496                                    }
497                                    Ss::Const => {
498                                            push_directive(tokens, "const");
499                                    }
500                                    Ss::Local => {
501                                            push_directive(tokens, "local");
502                                    }
503                                    Ss::Param => {
504                                            push_directive(tokens, "param");
505                                    }
506                            }
507                    }
508                    if let Some(level1_eviction_priority_17) = self.level1_eviction_priority.as_ref() {
509                            match level1_eviction_priority_17 {
510                                    Level1EvictionPriority::L1EvictUnchanged => {
511                                            push_directive(tokens, "L1::evict_unchanged");
512                                    }
513                                    Level1EvictionPriority::L1EvictNormal => {
514                                            push_directive(tokens, "L1::evict_normal");
515                                    }
516                                    Level1EvictionPriority::L1EvictFirst => {
517                                            push_directive(tokens, "L1::evict_first");
518                                    }
519                                    Level1EvictionPriority::L1NoAllocate => {
520                                            push_directive(tokens, "L1::no_allocate");
521                                    }
522                                    Level1EvictionPriority::L1EvictLast => {
523                                            push_directive(tokens, "L1::evict_last");
524                                    }
525                            }
526                    }
527                    if let Some(level2_eviction_priority_18) = self.level2_eviction_priority.as_ref() {
528                            match level2_eviction_priority_18 {
529                                    Level2EvictionPriority::L2EvictNormal => {
530                                            push_directive(tokens, "L2::evict_normal");
531                                    }
532                                    Level2EvictionPriority::L2EvictFirst => {
533                                            push_directive(tokens, "L2::evict_first");
534                                    }
535                                    Level2EvictionPriority::L2EvictLast => {
536                                            push_directive(tokens, "L2::evict_last");
537                                    }
538                            }
539                    }
540                    if let Some(level_cache_hint_19) = self.level_cache_hint.as_ref() {
541                            match level_cache_hint_19 {
542                                    LevelCacheHint::L2CacheHint => {
543                                            push_directive(tokens, "L2::cache_hint");
544                                    }
545                            }
546                    }
547                    if let Some(level_prefetch_size_20) = self.level_prefetch_size.as_ref() {
548                            match level_prefetch_size_20 {
549                                    LevelPrefetchSize::L2128b => {
550                                            push_directive(tokens, "L2::128B");
551                                    }
552                                    LevelPrefetchSize::L2256b => {
553                                            push_directive(tokens, "L2::256B");
554                                    }
555                                    LevelPrefetchSize::L264b => {
556                                            push_directive(tokens, "L2::64B");
557                                    }
558                            }
559                    }
560                    if let Some(vec_21) = self.vec.as_ref() {
561                            match vec_21 {
562                                    Vec::V2 => {
563                                            push_directive(tokens, "v2");
564                                    }
565                                    Vec::V4 => {
566                                            push_directive(tokens, "v4");
567                                    }
568                                    Vec::V8 => {
569                                            push_directive(tokens, "v8");
570                                    }
571                            }
572                    }
573                    match &self.type_ {
574                            Type::B128 => {
575                                    push_directive(tokens, "b128");
576                            }
577                            Type::B16 => {
578                                    push_directive(tokens, "b16");
579                            }
580                            Type::B32 => {
581                                    push_directive(tokens, "b32");
582                            }
583                            Type::B64 => {
584                                    push_directive(tokens, "b64");
585                            }
586                            Type::U16 => {
587                                    push_directive(tokens, "u16");
588                            }
589                            Type::U32 => {
590                                    push_directive(tokens, "u32");
591                            }
592                            Type::U64 => {
593                                    push_directive(tokens, "u64");
594                            }
595                            Type::S16 => {
596                                    push_directive(tokens, "s16");
597                            }
598                            Type::S32 => {
599                                    push_directive(tokens, "s32");
600                            }
601                            Type::S64 => {
602                                    push_directive(tokens, "s64");
603                            }
604                            Type::F32 => {
605                                    push_directive(tokens, "f32");
606                            }
607                            Type::F64 => {
608                                    push_directive(tokens, "f64");
609                            }
610                            Type::B8 => {
611                                    push_directive(tokens, "b8");
612                            }
613                            Type::U8 => {
614                                    push_directive(tokens, "u8");
615                            }
616                            Type::S8 => {
617                                    push_directive(tokens, "s8");
618                            }
619                    }
620                    self.d.unparse_tokens(tokens);
621            tokens.push(PtxToken::Comma);
622                    self.a.unparse_tokens(tokens);
623            if self.cache_policy.is_some() { tokens.push(PtxToken::Comma); }
624                    if let Some(opt_22) = self.cache_policy.as_ref() {
625                        opt_22.unparse_tokens(tokens);
626                    }
627            tokens.push(PtxToken::Semicolon);
628        }
629    }
630
631    impl PtxUnparser for LdAcquireScopeSsLevel1EvictionPriorityLevel2EvictionPriorityLevelCacheHintLevelPrefetchSizeVecType {
632        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
633            push_opcode(tokens, "ld");
634                    push_directive(tokens, "acquire");
635                    match &self.scope {
636                            Scope::Cluster => {
637                                    push_directive(tokens, "cluster");
638                            }
639                            Scope::Cta => {
640                                    push_directive(tokens, "cta");
641                            }
642                            Scope::Gpu => {
643                                    push_directive(tokens, "gpu");
644                            }
645                            Scope::Sys => {
646                                    push_directive(tokens, "sys");
647                            }
648                    }
649                    if let Some(ss_23) = self.ss.as_ref() {
650                            match ss_23 {
651                                    Ss::SharedCluster => {
652                                            push_directive(tokens, "shared::cluster");
653                                    }
654                                    Ss::ParamEntry => {
655                                            push_directive(tokens, "param::entry");
656                                    }
657                                    Ss::ParamFunc => {
658                                            push_directive(tokens, "param::func");
659                                    }
660                                    Ss::SharedCta => {
661                                            push_directive(tokens, "shared::cta");
662                                    }
663                                    Ss::Global => {
664                                            push_directive(tokens, "global");
665                                    }
666                                    Ss::Shared => {
667                                            push_directive(tokens, "shared");
668                                    }
669                                    Ss::Const => {
670                                            push_directive(tokens, "const");
671                                    }
672                                    Ss::Local => {
673                                            push_directive(tokens, "local");
674                                    }
675                                    Ss::Param => {
676                                            push_directive(tokens, "param");
677                                    }
678                            }
679                    }
680                    if let Some(level1_eviction_priority_24) = self.level1_eviction_priority.as_ref() {
681                            match level1_eviction_priority_24 {
682                                    Level1EvictionPriority::L1EvictUnchanged => {
683                                            push_directive(tokens, "L1::evict_unchanged");
684                                    }
685                                    Level1EvictionPriority::L1EvictNormal => {
686                                            push_directive(tokens, "L1::evict_normal");
687                                    }
688                                    Level1EvictionPriority::L1EvictFirst => {
689                                            push_directive(tokens, "L1::evict_first");
690                                    }
691                                    Level1EvictionPriority::L1NoAllocate => {
692                                            push_directive(tokens, "L1::no_allocate");
693                                    }
694                                    Level1EvictionPriority::L1EvictLast => {
695                                            push_directive(tokens, "L1::evict_last");
696                                    }
697                            }
698                    }
699                    if let Some(level2_eviction_priority_25) = self.level2_eviction_priority.as_ref() {
700                            match level2_eviction_priority_25 {
701                                    Level2EvictionPriority::L2EvictNormal => {
702                                            push_directive(tokens, "L2::evict_normal");
703                                    }
704                                    Level2EvictionPriority::L2EvictFirst => {
705                                            push_directive(tokens, "L2::evict_first");
706                                    }
707                                    Level2EvictionPriority::L2EvictLast => {
708                                            push_directive(tokens, "L2::evict_last");
709                                    }
710                            }
711                    }
712                    if let Some(level_cache_hint_26) = self.level_cache_hint.as_ref() {
713                            match level_cache_hint_26 {
714                                    LevelCacheHint::L2CacheHint => {
715                                            push_directive(tokens, "L2::cache_hint");
716                                    }
717                            }
718                    }
719                    if let Some(level_prefetch_size_27) = self.level_prefetch_size.as_ref() {
720                            match level_prefetch_size_27 {
721                                    LevelPrefetchSize::L2128b => {
722                                            push_directive(tokens, "L2::128B");
723                                    }
724                                    LevelPrefetchSize::L2256b => {
725                                            push_directive(tokens, "L2::256B");
726                                    }
727                                    LevelPrefetchSize::L264b => {
728                                            push_directive(tokens, "L2::64B");
729                                    }
730                            }
731                    }
732                    if let Some(vec_28) = self.vec.as_ref() {
733                            match vec_28 {
734                                    Vec::V2 => {
735                                            push_directive(tokens, "v2");
736                                    }
737                                    Vec::V4 => {
738                                            push_directive(tokens, "v4");
739                                    }
740                                    Vec::V8 => {
741                                            push_directive(tokens, "v8");
742                                    }
743                            }
744                    }
745                    match &self.type_ {
746                            Type::B128 => {
747                                    push_directive(tokens, "b128");
748                            }
749                            Type::B16 => {
750                                    push_directive(tokens, "b16");
751                            }
752                            Type::B32 => {
753                                    push_directive(tokens, "b32");
754                            }
755                            Type::B64 => {
756                                    push_directive(tokens, "b64");
757                            }
758                            Type::U16 => {
759                                    push_directive(tokens, "u16");
760                            }
761                            Type::U32 => {
762                                    push_directive(tokens, "u32");
763                            }
764                            Type::U64 => {
765                                    push_directive(tokens, "u64");
766                            }
767                            Type::S16 => {
768                                    push_directive(tokens, "s16");
769                            }
770                            Type::S32 => {
771                                    push_directive(tokens, "s32");
772                            }
773                            Type::S64 => {
774                                    push_directive(tokens, "s64");
775                            }
776                            Type::F32 => {
777                                    push_directive(tokens, "f32");
778                            }
779                            Type::F64 => {
780                                    push_directive(tokens, "f64");
781                            }
782                            Type::B8 => {
783                                    push_directive(tokens, "b8");
784                            }
785                            Type::U8 => {
786                                    push_directive(tokens, "u8");
787                            }
788                            Type::S8 => {
789                                    push_directive(tokens, "s8");
790                            }
791                    }
792                    self.d.unparse_tokens(tokens);
793            tokens.push(PtxToken::Comma);
794                    self.a.unparse_tokens(tokens);
795            if self.cache_policy.is_some() { tokens.push(PtxToken::Comma); }
796                    if let Some(opt_29) = self.cache_policy.as_ref() {
797                        opt_29.unparse_tokens(tokens);
798                    }
799            tokens.push(PtxToken::Semicolon);
800        }
801    }
802
803    impl PtxUnparser for LdMmioRelaxedSysGlobalType {
804        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
805            push_opcode(tokens, "ld");
806                    push_directive(tokens, "mmio");
807                    push_directive(tokens, "relaxed");
808                    push_directive(tokens, "sys");
809                    if self.global {
810                            push_directive(tokens, "global");
811                    }
812                    match &self.type_ {
813                            Type::B128 => {
814                                    push_directive(tokens, "b128");
815                            }
816                            Type::B16 => {
817                                    push_directive(tokens, "b16");
818                            }
819                            Type::B32 => {
820                                    push_directive(tokens, "b32");
821                            }
822                            Type::B64 => {
823                                    push_directive(tokens, "b64");
824                            }
825                            Type::U16 => {
826                                    push_directive(tokens, "u16");
827                            }
828                            Type::U32 => {
829                                    push_directive(tokens, "u32");
830                            }
831                            Type::U64 => {
832                                    push_directive(tokens, "u64");
833                            }
834                            Type::S16 => {
835                                    push_directive(tokens, "s16");
836                            }
837                            Type::S32 => {
838                                    push_directive(tokens, "s32");
839                            }
840                            Type::S64 => {
841                                    push_directive(tokens, "s64");
842                            }
843                            Type::F32 => {
844                                    push_directive(tokens, "f32");
845                            }
846                            Type::F64 => {
847                                    push_directive(tokens, "f64");
848                            }
849                            Type::B8 => {
850                                    push_directive(tokens, "b8");
851                            }
852                            Type::U8 => {
853                                    push_directive(tokens, "u8");
854                            }
855                            Type::S8 => {
856                                    push_directive(tokens, "s8");
857                            }
858                    }
859                    self.d.unparse_tokens(tokens);
860            tokens.push(PtxToken::Comma);
861                    self.a.unparse_tokens(tokens);
862            tokens.push(PtxToken::Semicolon);
863        }
864    }
865
866}
867