ptx_parser/unparser/instruction/
add_cc.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::add_cc::section_0::*;
14
15 impl PtxUnparser for AddCcType {
16 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
17 push_opcode(tokens, "add");
18 push_directive(tokens, "cc");
19 match &self.type_ {
20 Type::U32 => {
21 push_directive(tokens, "u32");
22 }
23 Type::S32 => {
24 push_directive(tokens, "s32");
25 }
26 Type::U64 => {
27 push_directive(tokens, "u64");
28 }
29 Type::S64 => {
30 push_directive(tokens, "s64");
31 }
32 }
33 self.d.unparse_tokens(tokens);
34 tokens.push(PtxToken::Comma);
35 self.a.unparse_tokens(tokens);
36 tokens.push(PtxToken::Comma);
37 self.b.unparse_tokens(tokens);
38 tokens.push(PtxToken::Semicolon);
39 }
40 }
41}