ptx_parser/unparser/instruction/
bra.rs

1//! Original PTX specification:
2//!
3//! bra{.uni}  tgt;           // tgt is a label
4//! bra{.uni}  tgt;           // unconditional branch
5
6#![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            push_opcode(tokens, "bra");
18                    if self.uni {
19                            push_directive(tokens, "uni");
20                    }
21                    self.tgt.unparse_tokens(tokens);
22            tokens.push(PtxToken::Semicolon);
23        }
24    }
25
26    impl PtxUnparser for BraUni1 {
27        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
28            push_opcode(tokens, "bra");
29                    if self.uni {
30                            push_directive(tokens, "uni");
31                    }
32                    self.tgt.unparse_tokens(tokens);
33            tokens.push(PtxToken::Semicolon);
34        }
35    }
36
37}
38