ptx_parser/type/instruction/selp.rs
1//! Original PTX specification:
2//!
3//! selp.type d, a, b, c;
4//! .type = { .b16, .b32, .b64,
5//! .u16, .u32, .u64,
6//! .s16, .s32, .s64,
7//! .f32, .f64 };
8
9#![allow(unused)]
10use crate::r#type::common::*;
11
12pub mod section_0 {
13 use crate::Spanned;
14 use crate::parser::Span;
15 use crate::r#type::common::*;
16
17 use serde::Serialize;
18
19 #[derive(Debug, Clone, PartialEq, Serialize)]
20 pub enum Type {
21 B16, // .b16
22 B32, // .b32
23 B64, // .b64
24 U16, // .u16
25 U32, // .u32
26 U64, // .u64
27 S16, // .s16
28 S32, // .s32
29 S64, // .s64
30 F32, // .f32
31 F64, // .f64
32 }
33
34 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
35 pub struct SelpType {
36 pub type_: Type, // .type
37 pub d: GeneralOperand, // d
38 pub a: GeneralOperand, // a
39 pub b: GeneralOperand, // b
40 pub c: GeneralOperand, // c
41 pub span: Span,
42 }
43}
44
45// Re-export types with section suffixes to avoid naming conflicts
46// e.g., Type0 for section_0::Type, Type1 for section_1::Type
47pub use section_0::SelpType;
48pub use section_0::Type as Type0;