Skip to main content

ptx_parser/type/instruction/
prmt.rs

1//! Original PTX specification:
2//!
3//! prmt.b32{.mode}  d, a, b, c;
4//! .mode = { .f4e, .b4e, .rc8, .ecl, .ecr, .rc16 };
5
6#![allow(unused)]
7use crate::r#type::common::*;
8
9pub mod section_0 {
10    use crate::Spanned;
11    use crate::parser::Span;
12    use crate::r#type::common::*;
13
14    use serde::Serialize;
15
16    #[derive(Debug, Clone, PartialEq, Serialize)]
17    pub enum Mode {
18        Rc16, // .rc16
19        F4e,  // .f4e
20        B4e,  // .b4e
21        Rc8,  // .rc8
22        Ecl,  // .ecl
23        Ecr,  // .ecr
24    }
25
26    #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
27    pub struct PrmtB32Mode {
28        pub b32: (),            // .b32
29        pub mode: Option<Mode>, // {.mode}
30        pub d: GeneralOperand,  // d
31        pub a: GeneralOperand,  // a
32        pub b: GeneralOperand,  // b
33        pub c: GeneralOperand,  // c
34        pub span: Span,
35    }
36}
37
38// Re-export types with section suffixes to avoid naming conflicts
39// e.g., Type0 for section_0::Type, Type1 for section_1::Type
40pub use section_0::Mode as Mode0;
41pub use section_0::PrmtB32Mode;