ptx_parser/unparser/instruction/
prmt.rs1#![allow(unused)]
7
8use crate::lexer::PtxToken;
9use crate::unparser::{PtxUnparser, common::*};
10
11pub mod section_0 {
12 use super::*;
13 use crate::r#type::instruction::prmt::section_0::*;
14
15 impl PtxUnparser for PrmtB32Mode {
16 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
17 push_opcode(tokens, "prmt");
18 push_directive(tokens, "b32");
19 if let Some(mode_0) = self.mode.as_ref() {
20 match mode_0 {
21 Mode::Rc16 => {
22 push_directive(tokens, "rc16");
23 }
24 Mode::F4e => {
25 push_directive(tokens, "f4e");
26 }
27 Mode::B4e => {
28 push_directive(tokens, "b4e");
29 }
30 Mode::Rc8 => {
31 push_directive(tokens, "rc8");
32 }
33 Mode::Ecl => {
34 push_directive(tokens, "ecl");
35 }
36 Mode::Ecr => {
37 push_directive(tokens, "ecr");
38 }
39 }
40 }
41 self.d.unparse_tokens(tokens);
42 tokens.push(PtxToken::Comma);
43 self.a.unparse_tokens(tokens);
44 tokens.push(PtxToken::Comma);
45 self.b.unparse_tokens(tokens);
46 tokens.push(PtxToken::Comma);
47 self.c.unparse_tokens(tokens);
48 tokens.push(PtxToken::Semicolon);
49 }
50 }
51}