Skip to main content

ptx_parser/type/instruction/
addc.rs

1//! Original PTX specification:
2//!
3//! addc{.cc}.type  d, a, b;
4//! .type = { .u32, .s32, .u64, .s64 };
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        U32, // .u32
19        S32, // .s32
20        U64, // .u64
21        S64, // .s64
22    }
23
24    #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
25    pub struct AddcCcType {
26        pub cc: bool,          // {.cc}
27        pub type_: Type,       // .type
28        pub d: GeneralOperand, // d
29        pub a: GeneralOperand, // a
30        pub b: GeneralOperand, // b
31        pub span: Span,
32    }
33}
34
35// Re-export types with section suffixes to avoid naming conflicts
36// e.g., Type0 for section_0::Type, Type1 for section_1::Type
37pub use section_0::AddcCcType;
38pub use section_0::Type as Type0;