Skip to main content

ptx_parser/type/instruction/
and.rs

1//! Original PTX specification:
2//!
3//! and.type d, a, b;
4//! .type = { .pred, .b16, .b32, .b64 };
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 Type {
18        Pred, // .pred
19        B16,  // .b16
20        B32,  // .b32
21        B64,  // .b64
22    }
23
24    #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
25    pub struct AndType {
26        pub type_: Type,       // .type
27        pub d: GeneralOperand, // d
28        pub a: GeneralOperand, // a
29        pub b: GeneralOperand, // b
30        pub span: Span,
31    }
32}
33
34// Re-export types with section suffixes to avoid naming conflicts
35// e.g., Type0 for section_0::Type, Type1 for section_1::Type
36pub use section_0::AndType;
37pub use section_0::Type as Type0;