ptx_parser/unparser/instruction/
mbarrier_inval.rs

1//! Original PTX specification:
2//!
3//! mbarrier.inval{.state}.b64 [addr];
4//! .state = { .shared, .shared::cta}
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::mbarrier_inval::section_0::*;
14
15    impl PtxUnparser for MbarrierInvalStateB64 {
16        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
17            push_opcode(tokens, "mbarrier");
18                    push_directive(tokens, "inval");
19                    if let Some(state_0) = self.state.as_ref() {
20                            match state_0 {
21                                    State::SharedCta => {
22                                            push_directive(tokens, "shared::cta");
23                                    }
24                                    State::Shared => {
25                                            push_directive(tokens, "shared");
26                                    }
27                            }
28                    }
29                    push_directive(tokens, "b64");
30                    self.addr.unparse_tokens(tokens);
31            tokens.push(PtxToken::Semicolon);
32        }
33    }
34
35}
36