ptx_parser/unparser/instruction/
bra.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::bra::section_0::*;
14
15 impl PtxUnparser for BraUni {
16 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
17 self.unparse_tokens_mode(tokens, false);
18 }
19 fn unparse_tokens_mode(&self, tokens: &mut ::std::vec::Vec<PtxToken>, spaced: bool) {
20 push_opcode(tokens, "bra");
21 if self.uni {
22 push_directive(tokens, "uni");
23 }
24 if spaced {
25 tokens.push(PtxToken::Space);
26 }
27 self.tgt.unparse_tokens_mode(tokens, spaced);
28 tokens.push(PtxToken::Semicolon);
29 if spaced {
30 tokens.push(PtxToken::Newline);
31 }
32 }
33 }
34
35 impl PtxUnparser for BraUni1 {
36 fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
37 self.unparse_tokens_mode(tokens, false);
38 }
39 fn unparse_tokens_mode(&self, tokens: &mut ::std::vec::Vec<PtxToken>, spaced: bool) {
40 push_opcode(tokens, "bra");
41 if self.uni {
42 push_directive(tokens, "uni");
43 }
44 if spaced {
45 tokens.push(PtxToken::Space);
46 }
47 self.tgt.unparse_tokens_mode(tokens, spaced);
48 tokens.push(PtxToken::Semicolon);
49 if spaced {
50 tokens.push(PtxToken::Newline);
51 }
52 }
53 }
54}