ptx_parser/unparser/instruction/
setp.rs

1//! Original PTX specification:
2//!
3//! setp.CmpOp{.ftz}.type         p{|q}, a, b;
4//! setp.CmpOp.BoolOp{.ftz}.type  p{|q}, a, b, {!}c;
5//! .CmpOp  = { .eq, .ne, .lt, .le, .gt, .ge, .lo, .ls, .hi, .hs, .equ, .neu, .ltu, .leu, .gtu, .geu, .num, .nan };
6//! .BoolOp = { .and, .or, .xor };
7//! .type   = { .b16, .b32, .b64, .u16, .u32, .u64, .s16, .s32, .s64, .f32, .f64 };
8//! --------------------------------------------------------------
9//! setp.CmpOp{.ftz}.f16           p, a, b;
10//! setp.CmpOp.BoolOp{.ftz}.f16    p, a, b, {!}c;
11//! setp.CmpOp{.ftz}.f16x2         p|q, a, b;
12//! setp.CmpOp.BoolOp{.ftz}.f16x2  p|q, a, b, {!}c;
13//! setp.CmpOp.bf16                p, a, b;
14//! setp.CmpOp.BoolOp.bf16         p, a, b, {!}c;
15//! setp.CmpOp.bf16x2              p|q, a, b;
16//! setp.CmpOp.BoolOp.bf16x2       p|q, a, b, {!}c;
17//! .CmpOp  = { .eq, .ne, .lt, .le, .gt, .ge, .equ, .neu, .ltu, .leu, .gtu, .geu, .num, .nan };
18//! .BoolOp = { .and, .or, .xor };
19
20#![allow(unused)]
21
22use crate::lexer::PtxToken;
23use crate::unparser::{PtxUnparser, common::*};
24
25pub mod section_0 {
26    use super::*;
27    use crate::r#type::instruction::setp::section_0::*;
28
29    impl PtxUnparser for SetpCmpopFtzType {
30        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
31            push_opcode(tokens, "setp");
32            match &self.cmpop {
33                Cmpop::Equ => {
34                    push_directive(tokens, "equ");
35                }
36                Cmpop::Neu => {
37                    push_directive(tokens, "neu");
38                }
39                Cmpop::Ltu => {
40                    push_directive(tokens, "ltu");
41                }
42                Cmpop::Leu => {
43                    push_directive(tokens, "leu");
44                }
45                Cmpop::Gtu => {
46                    push_directive(tokens, "gtu");
47                }
48                Cmpop::Geu => {
49                    push_directive(tokens, "geu");
50                }
51                Cmpop::Num => {
52                    push_directive(tokens, "num");
53                }
54                Cmpop::Nan => {
55                    push_directive(tokens, "nan");
56                }
57                Cmpop::Eq => {
58                    push_directive(tokens, "eq");
59                }
60                Cmpop::Ne => {
61                    push_directive(tokens, "ne");
62                }
63                Cmpop::Lt => {
64                    push_directive(tokens, "lt");
65                }
66                Cmpop::Le => {
67                    push_directive(tokens, "le");
68                }
69                Cmpop::Gt => {
70                    push_directive(tokens, "gt");
71                }
72                Cmpop::Ge => {
73                    push_directive(tokens, "ge");
74                }
75                Cmpop::Lo => {
76                    push_directive(tokens, "lo");
77                }
78                Cmpop::Ls => {
79                    push_directive(tokens, "ls");
80                }
81                Cmpop::Hi => {
82                    push_directive(tokens, "hi");
83                }
84                Cmpop::Hs => {
85                    push_directive(tokens, "hs");
86                }
87            }
88            if self.ftz {
89                push_directive(tokens, "ftz");
90            }
91            match &self.type_ {
92                Type::B16 => {
93                    push_directive(tokens, "b16");
94                }
95                Type::B32 => {
96                    push_directive(tokens, "b32");
97                }
98                Type::B64 => {
99                    push_directive(tokens, "b64");
100                }
101                Type::U16 => {
102                    push_directive(tokens, "u16");
103                }
104                Type::U32 => {
105                    push_directive(tokens, "u32");
106                }
107                Type::U64 => {
108                    push_directive(tokens, "u64");
109                }
110                Type::S16 => {
111                    push_directive(tokens, "s16");
112                }
113                Type::S32 => {
114                    push_directive(tokens, "s32");
115                }
116                Type::S64 => {
117                    push_directive(tokens, "s64");
118                }
119                Type::F32 => {
120                    push_directive(tokens, "f32");
121                }
122                Type::F64 => {
123                    push_directive(tokens, "f64");
124                }
125            }
126            self.p.unparse_tokens(tokens);
127            if let Some(q_0) = self.q.as_ref() {
128                tokens.push(PtxToken::Pipe);
129                q_0.unparse_tokens(tokens);
130            }
131            tokens.push(PtxToken::Comma);
132            self.a.unparse_tokens(tokens);
133            tokens.push(PtxToken::Comma);
134            self.b.unparse_tokens(tokens);
135            tokens.push(PtxToken::Semicolon);
136        }
137    }
138
139    impl PtxUnparser for SetpCmpopBoolopFtzType {
140        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
141            push_opcode(tokens, "setp");
142            match &self.cmpop {
143                Cmpop::Equ => {
144                    push_directive(tokens, "equ");
145                }
146                Cmpop::Neu => {
147                    push_directive(tokens, "neu");
148                }
149                Cmpop::Ltu => {
150                    push_directive(tokens, "ltu");
151                }
152                Cmpop::Leu => {
153                    push_directive(tokens, "leu");
154                }
155                Cmpop::Gtu => {
156                    push_directive(tokens, "gtu");
157                }
158                Cmpop::Geu => {
159                    push_directive(tokens, "geu");
160                }
161                Cmpop::Num => {
162                    push_directive(tokens, "num");
163                }
164                Cmpop::Nan => {
165                    push_directive(tokens, "nan");
166                }
167                Cmpop::Eq => {
168                    push_directive(tokens, "eq");
169                }
170                Cmpop::Ne => {
171                    push_directive(tokens, "ne");
172                }
173                Cmpop::Lt => {
174                    push_directive(tokens, "lt");
175                }
176                Cmpop::Le => {
177                    push_directive(tokens, "le");
178                }
179                Cmpop::Gt => {
180                    push_directive(tokens, "gt");
181                }
182                Cmpop::Ge => {
183                    push_directive(tokens, "ge");
184                }
185                Cmpop::Lo => {
186                    push_directive(tokens, "lo");
187                }
188                Cmpop::Ls => {
189                    push_directive(tokens, "ls");
190                }
191                Cmpop::Hi => {
192                    push_directive(tokens, "hi");
193                }
194                Cmpop::Hs => {
195                    push_directive(tokens, "hs");
196                }
197            }
198            match &self.boolop {
199                Boolop::And => {
200                    push_directive(tokens, "and");
201                }
202                Boolop::Xor => {
203                    push_directive(tokens, "xor");
204                }
205                Boolop::Or => {
206                    push_directive(tokens, "or");
207                }
208            }
209            if self.ftz {
210                push_directive(tokens, "ftz");
211            }
212            match &self.type_ {
213                Type::B16 => {
214                    push_directive(tokens, "b16");
215                }
216                Type::B32 => {
217                    push_directive(tokens, "b32");
218                }
219                Type::B64 => {
220                    push_directive(tokens, "b64");
221                }
222                Type::U16 => {
223                    push_directive(tokens, "u16");
224                }
225                Type::U32 => {
226                    push_directive(tokens, "u32");
227                }
228                Type::U64 => {
229                    push_directive(tokens, "u64");
230                }
231                Type::S16 => {
232                    push_directive(tokens, "s16");
233                }
234                Type::S32 => {
235                    push_directive(tokens, "s32");
236                }
237                Type::S64 => {
238                    push_directive(tokens, "s64");
239                }
240                Type::F32 => {
241                    push_directive(tokens, "f32");
242                }
243                Type::F64 => {
244                    push_directive(tokens, "f64");
245                }
246            }
247            self.p.unparse_tokens(tokens);
248            if let Some(q_1) = self.q.as_ref() {
249                tokens.push(PtxToken::Pipe);
250                q_1.unparse_tokens(tokens);
251            }
252            tokens.push(PtxToken::Comma);
253            self.a.unparse_tokens(tokens);
254            tokens.push(PtxToken::Comma);
255            self.b.unparse_tokens(tokens);
256            tokens.push(PtxToken::Comma);
257            if self.c_op {
258                tokens.push(PtxToken::Exclaim);
259            }
260            self.c.unparse_tokens(tokens);
261            tokens.push(PtxToken::Semicolon);
262        }
263    }
264}
265
266pub mod section_1 {
267    use super::*;
268    use crate::r#type::instruction::setp::section_1::*;
269
270    impl PtxUnparser for SetpCmpopFtzF16 {
271        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
272            push_opcode(tokens, "setp");
273            match &self.cmpop {
274                Cmpop::Equ => {
275                    push_directive(tokens, "equ");
276                }
277                Cmpop::Neu => {
278                    push_directive(tokens, "neu");
279                }
280                Cmpop::Ltu => {
281                    push_directive(tokens, "ltu");
282                }
283                Cmpop::Leu => {
284                    push_directive(tokens, "leu");
285                }
286                Cmpop::Gtu => {
287                    push_directive(tokens, "gtu");
288                }
289                Cmpop::Geu => {
290                    push_directive(tokens, "geu");
291                }
292                Cmpop::Num => {
293                    push_directive(tokens, "num");
294                }
295                Cmpop::Nan => {
296                    push_directive(tokens, "nan");
297                }
298                Cmpop::Eq => {
299                    push_directive(tokens, "eq");
300                }
301                Cmpop::Ne => {
302                    push_directive(tokens, "ne");
303                }
304                Cmpop::Lt => {
305                    push_directive(tokens, "lt");
306                }
307                Cmpop::Le => {
308                    push_directive(tokens, "le");
309                }
310                Cmpop::Gt => {
311                    push_directive(tokens, "gt");
312                }
313                Cmpop::Ge => {
314                    push_directive(tokens, "ge");
315                }
316            }
317            if self.ftz {
318                push_directive(tokens, "ftz");
319            }
320            push_directive(tokens, "f16");
321            self.p.unparse_tokens(tokens);
322            tokens.push(PtxToken::Comma);
323            self.a.unparse_tokens(tokens);
324            tokens.push(PtxToken::Comma);
325            self.b.unparse_tokens(tokens);
326            tokens.push(PtxToken::Semicolon);
327        }
328    }
329
330    impl PtxUnparser for SetpCmpopBoolopFtzF16 {
331        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
332            push_opcode(tokens, "setp");
333            match &self.cmpop {
334                Cmpop::Equ => {
335                    push_directive(tokens, "equ");
336                }
337                Cmpop::Neu => {
338                    push_directive(tokens, "neu");
339                }
340                Cmpop::Ltu => {
341                    push_directive(tokens, "ltu");
342                }
343                Cmpop::Leu => {
344                    push_directive(tokens, "leu");
345                }
346                Cmpop::Gtu => {
347                    push_directive(tokens, "gtu");
348                }
349                Cmpop::Geu => {
350                    push_directive(tokens, "geu");
351                }
352                Cmpop::Num => {
353                    push_directive(tokens, "num");
354                }
355                Cmpop::Nan => {
356                    push_directive(tokens, "nan");
357                }
358                Cmpop::Eq => {
359                    push_directive(tokens, "eq");
360                }
361                Cmpop::Ne => {
362                    push_directive(tokens, "ne");
363                }
364                Cmpop::Lt => {
365                    push_directive(tokens, "lt");
366                }
367                Cmpop::Le => {
368                    push_directive(tokens, "le");
369                }
370                Cmpop::Gt => {
371                    push_directive(tokens, "gt");
372                }
373                Cmpop::Ge => {
374                    push_directive(tokens, "ge");
375                }
376            }
377            match &self.boolop {
378                Boolop::And => {
379                    push_directive(tokens, "and");
380                }
381                Boolop::Xor => {
382                    push_directive(tokens, "xor");
383                }
384                Boolop::Or => {
385                    push_directive(tokens, "or");
386                }
387            }
388            if self.ftz {
389                push_directive(tokens, "ftz");
390            }
391            push_directive(tokens, "f16");
392            self.p.unparse_tokens(tokens);
393            tokens.push(PtxToken::Comma);
394            self.a.unparse_tokens(tokens);
395            tokens.push(PtxToken::Comma);
396            self.b.unparse_tokens(tokens);
397            tokens.push(PtxToken::Comma);
398            if self.c_op {
399                tokens.push(PtxToken::Exclaim);
400            }
401            self.c.unparse_tokens(tokens);
402            tokens.push(PtxToken::Semicolon);
403        }
404    }
405
406    impl PtxUnparser for SetpCmpopFtzF16x2 {
407        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
408            push_opcode(tokens, "setp");
409            match &self.cmpop {
410                Cmpop::Equ => {
411                    push_directive(tokens, "equ");
412                }
413                Cmpop::Neu => {
414                    push_directive(tokens, "neu");
415                }
416                Cmpop::Ltu => {
417                    push_directive(tokens, "ltu");
418                }
419                Cmpop::Leu => {
420                    push_directive(tokens, "leu");
421                }
422                Cmpop::Gtu => {
423                    push_directive(tokens, "gtu");
424                }
425                Cmpop::Geu => {
426                    push_directive(tokens, "geu");
427                }
428                Cmpop::Num => {
429                    push_directive(tokens, "num");
430                }
431                Cmpop::Nan => {
432                    push_directive(tokens, "nan");
433                }
434                Cmpop::Eq => {
435                    push_directive(tokens, "eq");
436                }
437                Cmpop::Ne => {
438                    push_directive(tokens, "ne");
439                }
440                Cmpop::Lt => {
441                    push_directive(tokens, "lt");
442                }
443                Cmpop::Le => {
444                    push_directive(tokens, "le");
445                }
446                Cmpop::Gt => {
447                    push_directive(tokens, "gt");
448                }
449                Cmpop::Ge => {
450                    push_directive(tokens, "ge");
451                }
452            }
453            if self.ftz {
454                push_directive(tokens, "ftz");
455            }
456            push_directive(tokens, "f16x2");
457            self.p.unparse_tokens(tokens);
458            tokens.push(PtxToken::Pipe);
459            self.q.unparse_tokens(tokens);
460            tokens.push(PtxToken::Comma);
461            self.a.unparse_tokens(tokens);
462            tokens.push(PtxToken::Comma);
463            self.b.unparse_tokens(tokens);
464            tokens.push(PtxToken::Semicolon);
465        }
466    }
467
468    impl PtxUnparser for SetpCmpopBoolopFtzF16x2 {
469        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
470            push_opcode(tokens, "setp");
471            match &self.cmpop {
472                Cmpop::Equ => {
473                    push_directive(tokens, "equ");
474                }
475                Cmpop::Neu => {
476                    push_directive(tokens, "neu");
477                }
478                Cmpop::Ltu => {
479                    push_directive(tokens, "ltu");
480                }
481                Cmpop::Leu => {
482                    push_directive(tokens, "leu");
483                }
484                Cmpop::Gtu => {
485                    push_directive(tokens, "gtu");
486                }
487                Cmpop::Geu => {
488                    push_directive(tokens, "geu");
489                }
490                Cmpop::Num => {
491                    push_directive(tokens, "num");
492                }
493                Cmpop::Nan => {
494                    push_directive(tokens, "nan");
495                }
496                Cmpop::Eq => {
497                    push_directive(tokens, "eq");
498                }
499                Cmpop::Ne => {
500                    push_directive(tokens, "ne");
501                }
502                Cmpop::Lt => {
503                    push_directive(tokens, "lt");
504                }
505                Cmpop::Le => {
506                    push_directive(tokens, "le");
507                }
508                Cmpop::Gt => {
509                    push_directive(tokens, "gt");
510                }
511                Cmpop::Ge => {
512                    push_directive(tokens, "ge");
513                }
514            }
515            match &self.boolop {
516                Boolop::And => {
517                    push_directive(tokens, "and");
518                }
519                Boolop::Xor => {
520                    push_directive(tokens, "xor");
521                }
522                Boolop::Or => {
523                    push_directive(tokens, "or");
524                }
525            }
526            if self.ftz {
527                push_directive(tokens, "ftz");
528            }
529            push_directive(tokens, "f16x2");
530            self.p.unparse_tokens(tokens);
531            tokens.push(PtxToken::Pipe);
532            self.q.unparse_tokens(tokens);
533            tokens.push(PtxToken::Comma);
534            self.a.unparse_tokens(tokens);
535            tokens.push(PtxToken::Comma);
536            self.b.unparse_tokens(tokens);
537            tokens.push(PtxToken::Comma);
538            if self.c_op {
539                tokens.push(PtxToken::Exclaim);
540            }
541            self.c.unparse_tokens(tokens);
542            tokens.push(PtxToken::Semicolon);
543        }
544    }
545
546    impl PtxUnparser for SetpCmpopBf16 {
547        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
548            push_opcode(tokens, "setp");
549            match &self.cmpop {
550                Cmpop::Equ => {
551                    push_directive(tokens, "equ");
552                }
553                Cmpop::Neu => {
554                    push_directive(tokens, "neu");
555                }
556                Cmpop::Ltu => {
557                    push_directive(tokens, "ltu");
558                }
559                Cmpop::Leu => {
560                    push_directive(tokens, "leu");
561                }
562                Cmpop::Gtu => {
563                    push_directive(tokens, "gtu");
564                }
565                Cmpop::Geu => {
566                    push_directive(tokens, "geu");
567                }
568                Cmpop::Num => {
569                    push_directive(tokens, "num");
570                }
571                Cmpop::Nan => {
572                    push_directive(tokens, "nan");
573                }
574                Cmpop::Eq => {
575                    push_directive(tokens, "eq");
576                }
577                Cmpop::Ne => {
578                    push_directive(tokens, "ne");
579                }
580                Cmpop::Lt => {
581                    push_directive(tokens, "lt");
582                }
583                Cmpop::Le => {
584                    push_directive(tokens, "le");
585                }
586                Cmpop::Gt => {
587                    push_directive(tokens, "gt");
588                }
589                Cmpop::Ge => {
590                    push_directive(tokens, "ge");
591                }
592            }
593            push_directive(tokens, "bf16");
594            self.p.unparse_tokens(tokens);
595            tokens.push(PtxToken::Comma);
596            self.a.unparse_tokens(tokens);
597            tokens.push(PtxToken::Comma);
598            self.b.unparse_tokens(tokens);
599            tokens.push(PtxToken::Semicolon);
600        }
601    }
602
603    impl PtxUnparser for SetpCmpopBoolopBf16 {
604        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
605            push_opcode(tokens, "setp");
606            match &self.cmpop {
607                Cmpop::Equ => {
608                    push_directive(tokens, "equ");
609                }
610                Cmpop::Neu => {
611                    push_directive(tokens, "neu");
612                }
613                Cmpop::Ltu => {
614                    push_directive(tokens, "ltu");
615                }
616                Cmpop::Leu => {
617                    push_directive(tokens, "leu");
618                }
619                Cmpop::Gtu => {
620                    push_directive(tokens, "gtu");
621                }
622                Cmpop::Geu => {
623                    push_directive(tokens, "geu");
624                }
625                Cmpop::Num => {
626                    push_directive(tokens, "num");
627                }
628                Cmpop::Nan => {
629                    push_directive(tokens, "nan");
630                }
631                Cmpop::Eq => {
632                    push_directive(tokens, "eq");
633                }
634                Cmpop::Ne => {
635                    push_directive(tokens, "ne");
636                }
637                Cmpop::Lt => {
638                    push_directive(tokens, "lt");
639                }
640                Cmpop::Le => {
641                    push_directive(tokens, "le");
642                }
643                Cmpop::Gt => {
644                    push_directive(tokens, "gt");
645                }
646                Cmpop::Ge => {
647                    push_directive(tokens, "ge");
648                }
649            }
650            match &self.boolop {
651                Boolop::And => {
652                    push_directive(tokens, "and");
653                }
654                Boolop::Xor => {
655                    push_directive(tokens, "xor");
656                }
657                Boolop::Or => {
658                    push_directive(tokens, "or");
659                }
660            }
661            push_directive(tokens, "bf16");
662            self.p.unparse_tokens(tokens);
663            tokens.push(PtxToken::Comma);
664            self.a.unparse_tokens(tokens);
665            tokens.push(PtxToken::Comma);
666            self.b.unparse_tokens(tokens);
667            tokens.push(PtxToken::Comma);
668            if self.c_op {
669                tokens.push(PtxToken::Exclaim);
670            }
671            self.c.unparse_tokens(tokens);
672            tokens.push(PtxToken::Semicolon);
673        }
674    }
675
676    impl PtxUnparser for SetpCmpopBf16x2 {
677        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
678            push_opcode(tokens, "setp");
679            match &self.cmpop {
680                Cmpop::Equ => {
681                    push_directive(tokens, "equ");
682                }
683                Cmpop::Neu => {
684                    push_directive(tokens, "neu");
685                }
686                Cmpop::Ltu => {
687                    push_directive(tokens, "ltu");
688                }
689                Cmpop::Leu => {
690                    push_directive(tokens, "leu");
691                }
692                Cmpop::Gtu => {
693                    push_directive(tokens, "gtu");
694                }
695                Cmpop::Geu => {
696                    push_directive(tokens, "geu");
697                }
698                Cmpop::Num => {
699                    push_directive(tokens, "num");
700                }
701                Cmpop::Nan => {
702                    push_directive(tokens, "nan");
703                }
704                Cmpop::Eq => {
705                    push_directive(tokens, "eq");
706                }
707                Cmpop::Ne => {
708                    push_directive(tokens, "ne");
709                }
710                Cmpop::Lt => {
711                    push_directive(tokens, "lt");
712                }
713                Cmpop::Le => {
714                    push_directive(tokens, "le");
715                }
716                Cmpop::Gt => {
717                    push_directive(tokens, "gt");
718                }
719                Cmpop::Ge => {
720                    push_directive(tokens, "ge");
721                }
722            }
723            push_directive(tokens, "bf16x2");
724            self.p.unparse_tokens(tokens);
725            tokens.push(PtxToken::Pipe);
726            self.q.unparse_tokens(tokens);
727            tokens.push(PtxToken::Comma);
728            self.a.unparse_tokens(tokens);
729            tokens.push(PtxToken::Comma);
730            self.b.unparse_tokens(tokens);
731            tokens.push(PtxToken::Semicolon);
732        }
733    }
734
735    impl PtxUnparser for SetpCmpopBoolopBf16x2 {
736        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
737            push_opcode(tokens, "setp");
738            match &self.cmpop {
739                Cmpop::Equ => {
740                    push_directive(tokens, "equ");
741                }
742                Cmpop::Neu => {
743                    push_directive(tokens, "neu");
744                }
745                Cmpop::Ltu => {
746                    push_directive(tokens, "ltu");
747                }
748                Cmpop::Leu => {
749                    push_directive(tokens, "leu");
750                }
751                Cmpop::Gtu => {
752                    push_directive(tokens, "gtu");
753                }
754                Cmpop::Geu => {
755                    push_directive(tokens, "geu");
756                }
757                Cmpop::Num => {
758                    push_directive(tokens, "num");
759                }
760                Cmpop::Nan => {
761                    push_directive(tokens, "nan");
762                }
763                Cmpop::Eq => {
764                    push_directive(tokens, "eq");
765                }
766                Cmpop::Ne => {
767                    push_directive(tokens, "ne");
768                }
769                Cmpop::Lt => {
770                    push_directive(tokens, "lt");
771                }
772                Cmpop::Le => {
773                    push_directive(tokens, "le");
774                }
775                Cmpop::Gt => {
776                    push_directive(tokens, "gt");
777                }
778                Cmpop::Ge => {
779                    push_directive(tokens, "ge");
780                }
781            }
782            match &self.boolop {
783                Boolop::And => {
784                    push_directive(tokens, "and");
785                }
786                Boolop::Xor => {
787                    push_directive(tokens, "xor");
788                }
789                Boolop::Or => {
790                    push_directive(tokens, "or");
791                }
792            }
793            push_directive(tokens, "bf16x2");
794            self.p.unparse_tokens(tokens);
795            tokens.push(PtxToken::Pipe);
796            self.q.unparse_tokens(tokens);
797            tokens.push(PtxToken::Comma);
798            self.a.unparse_tokens(tokens);
799            tokens.push(PtxToken::Comma);
800            self.b.unparse_tokens(tokens);
801            tokens.push(PtxToken::Comma);
802            if self.c_op {
803                tokens.push(PtxToken::Exclaim);
804            }
805            self.c.unparse_tokens(tokens);
806            tokens.push(PtxToken::Semicolon);
807        }
808    }
809}