Skip to main content

ptx_parser/type/instruction/
dp2a.rs

1//! Original PTX specification:
2//!
3//! dp2a.mode.atype.btype  d, a, b, c;
4//! .atype = .btype = { .u32, .s32 };
5//! .mode = { .lo, .hi };
6
7#![allow(unused)]
8use crate::r#type::common::*;
9
10pub mod section_0 {
11    use crate::Spanned;
12    use crate::parser::Span;
13    use crate::r#type::common::*;
14
15    use serde::Serialize;
16
17    #[derive(Debug, Clone, PartialEq, Serialize)]
18    pub enum Mode {
19        Lo, // .lo
20        Hi, // .hi
21    }
22
23    #[derive(Debug, Clone, PartialEq, Serialize)]
24    pub enum Atype {
25        U32, // .u32
26        S32, // .s32
27    }
28
29    #[derive(Debug, Clone, PartialEq, Serialize)]
30    pub enum Btype {
31        U32, // .u32
32        S32, // .s32
33    }
34
35    #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
36    pub struct Dp2aModeAtypeBtype {
37        pub mode: Mode,        // .mode
38        pub atype: Atype,      // .atype
39        pub btype: Btype,      // .btype
40        pub d: GeneralOperand, // d
41        pub a: GeneralOperand, // a
42        pub b: GeneralOperand, // b
43        pub c: GeneralOperand, // c
44        pub span: Span,
45    }
46}
47
48// Re-export types with section suffixes to avoid naming conflicts
49// e.g., Type0 for section_0::Type, Type1 for section_1::Type
50pub use section_0::Atype as Atype0;
51pub use section_0::Btype as Btype0;
52pub use section_0::Dp2aModeAtypeBtype;
53pub use section_0::Mode as Mode0;