ptx_parser/unparser/instruction/
bfi.rs

1//! Original PTX specification:
2//!
3//! bfi.type  f, a, b, c, d;
4//! .type = { .b32, .b64 };
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::bfi::section_0::*;
14
15    impl PtxUnparser for BfiType {
16        fn unparse_tokens(&self, tokens: &mut ::std::vec::Vec<PtxToken>) {
17            push_opcode(tokens, "bfi");
18                    match &self.type_ {
19                            Type::B32 => {
20                                    push_directive(tokens, "b32");
21                            }
22                            Type::B64 => {
23                                    push_directive(tokens, "b64");
24                            }
25                    }
26                    self.f.unparse_tokens(tokens);
27            tokens.push(PtxToken::Comma);
28                    self.a.unparse_tokens(tokens);
29            tokens.push(PtxToken::Comma);
30                    self.b.unparse_tokens(tokens);
31            tokens.push(PtxToken::Comma);
32                    self.c.unparse_tokens(tokens);
33            tokens.push(PtxToken::Comma);
34                    self.d.unparse_tokens(tokens);
35            tokens.push(PtxToken::Semicolon);
36        }
37    }
38
39}
40