ptx_parser/unparser/instruction/
st_bulk.rs

1//! Original PTX specification:
2//!
3//! st.bulk{.weak}{.shared::cta}  [a], size, initval; // initval must be zero
4
5#![allow(unused)]
6
7use crate::lexer::PtxToken;
8use crate::unparser::{PtxUnparser, common::*};
9
10pub mod section_0 {
11    use super::*;
12    use crate::r#type::instruction::st_bulk::section_0::*;
13
14    impl PtxUnparser for StBulkWeakSharedCta {
15        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
16            push_opcode(tokens, "st");
17            push_directive(tokens, "bulk");
18            if self.weak {
19                push_directive(tokens, "weak");
20            }
21            if self.shared_cta {
22                push_directive(tokens, "shared::cta");
23            }
24            self.a.unparse_tokens(tokens);
25            tokens.push(PtxToken::Comma);
26            self.size.unparse_tokens(tokens);
27            tokens.push(PtxToken::Comma);
28            self.initval.unparse_tokens(tokens);
29            tokens.push(PtxToken::Semicolon);
30        }
31    }
32}