ptx_parser/type/instruction/
vsh.rs1#![allow(unused)]
15use crate::r#type::common::*;
16
17pub mod section_0 {
18 use crate::Spanned;
19 use crate::parser::Span;
20 use crate::r#type::common::*;
21
22 use serde::Serialize;
23
24 #[derive(Debug, Clone, PartialEq, Serialize)]
25 pub enum Dtype {
26 U32, S32, }
29
30 #[derive(Debug, Clone, PartialEq, Serialize)]
31 pub enum Atype {
32 U32, S32, }
35
36 #[derive(Debug, Clone, PartialEq, Serialize)]
37 pub enum Mode {
38 Clamp, Wrap, }
41
42 #[derive(Debug, Clone, PartialEq, Serialize)]
43 pub enum Asel {
44 B0, B1, B2, B3, H0, H1, }
51
52 #[derive(Debug, Clone, PartialEq, Serialize)]
53 pub enum Bsel {
54 B0, B1, B2, B3, H0, H1, }
61
62 #[derive(Debug, Clone, PartialEq, Serialize)]
63 pub enum Op2 {
64 Add, Min, Max, }
68
69 #[derive(Debug, Clone, PartialEq, Serialize)]
70 pub enum Dsel {
71 B0, B1, B2, B3, H0, H1, }
78
79 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
80 pub struct VshlDtypeAtypeU32SatMode {
81 pub dtype: Dtype, pub atype: Atype, pub u32: (), pub sat: bool, pub mode: Mode, pub d: GeneralOperand, pub a: GeneralOperand, pub asel: Option<Asel>, pub b: GeneralOperand, pub bsel: Option<Bsel>, pub span: Span,
92 }
93
94 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
95 pub struct VshrDtypeAtypeU32SatMode {
96 pub dtype: Dtype, pub atype: Atype, pub u32: (), pub sat: bool, pub mode: Mode, pub d: GeneralOperand, pub a: GeneralOperand, pub asel: Option<Asel>, pub b: GeneralOperand, pub bsel: Option<Bsel>, pub span: Span,
107 }
108
109 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
110 pub struct VshlDtypeAtypeU32SatModeOp2 {
111 pub dtype: Dtype, pub atype: Atype, pub u32: (), pub sat: bool, pub mode: Mode, pub op2: Op2, pub d: GeneralOperand, pub a: GeneralOperand, pub asel: Option<Asel>, pub b: GeneralOperand, pub bsel: Option<Bsel>, pub c: GeneralOperand, pub span: Span,
124 }
125
126 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
127 pub struct VshrDtypeAtypeU32SatModeOp2 {
128 pub dtype: Dtype, pub atype: Atype, pub u32: (), pub sat: bool, pub mode: Mode, pub op2: Op2, pub d: GeneralOperand, pub a: GeneralOperand, pub asel: Option<Asel>, pub b: GeneralOperand, pub bsel: Option<Bsel>, pub c: GeneralOperand, pub span: Span,
141 }
142
143 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
144 pub struct VshlDtypeAtypeU32SatMode1 {
145 pub dtype: Dtype, pub atype: Atype, pub u32: (), pub sat: bool, pub mode: Mode, pub d: GeneralOperand, pub dsel: Dsel, pub a: GeneralOperand, pub asel: Option<Asel>, pub b: GeneralOperand, pub bsel: Option<Bsel>, pub c: GeneralOperand, pub span: Span,
158 }
159
160 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
161 pub struct VshrDtypeAtypeU32SatMode1 {
162 pub dtype: Dtype, pub atype: Atype, pub u32: (), pub sat: bool, pub mode: Mode, pub d: GeneralOperand, pub dsel: Dsel, pub a: GeneralOperand, pub asel: Option<Asel>, pub b: GeneralOperand, pub bsel: Option<Bsel>, pub c: GeneralOperand, pub span: Span,
175 }
176}
177
178pub use section_0::Asel as Asel0;
181pub use section_0::Atype as Atype0;
182pub use section_0::Bsel as Bsel0;
183pub use section_0::Dsel as Dsel0;
184pub use section_0::Dtype as Dtype0;
185pub use section_0::Mode as Mode0;
186pub use section_0::Op2 as Op20;
187pub use section_0::VshlDtypeAtypeU32SatMode;
188pub use section_0::VshlDtypeAtypeU32SatMode1;
189pub use section_0::VshlDtypeAtypeU32SatModeOp2;
190pub use section_0::VshrDtypeAtypeU32SatMode;
191pub use section_0::VshrDtypeAtypeU32SatMode1;
192pub use section_0::VshrDtypeAtypeU32SatModeOp2;