ptx_parser/type/instruction/
sub.rs1#![allow(unused)]
24use crate::r#type::common::*;
25
26pub mod section_0 {
27 use crate::Spanned;
28 use crate::parser::Span;
29 use crate::r#type::common::*;
30
31 use serde::Serialize;
32
33 #[derive(Debug, Clone, PartialEq, Serialize)]
34 pub enum Type {
35 U16, U32, U64, S16, S32, S64, }
42
43 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
44 pub struct SubType {
45 pub type_: Type, pub d: GeneralOperand, pub a: GeneralOperand, pub b: GeneralOperand, pub span: Span,
50 }
51
52 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
53 pub struct SubSatS32 {
54 pub sat: bool, pub s32: (), pub d: GeneralOperand, pub a: GeneralOperand, pub b: GeneralOperand, pub span: Span,
60 }
61}
62
63pub mod section_1 {
64 use crate::Spanned;
65 use crate::parser::Span;
66 use crate::r#type::common::*;
67
68 use serde::Serialize;
69
70 #[derive(Debug, Clone, PartialEq, Serialize)]
71 pub enum Rnd {
72 Rn, Rz, Rm, Rp, }
77
78 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
79 pub struct SubRndFtzSatF32 {
80 pub rnd: Option<Rnd>, pub ftz: bool, pub sat: bool, pub f32: (), pub d: GeneralOperand, pub a: GeneralOperand, pub b: GeneralOperand, pub span: Span,
88 }
89
90 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
91 pub struct SubRndFtzF32x2 {
92 pub rnd: Option<Rnd>, pub ftz: bool, pub f32x2: (), pub d: GeneralOperand, pub a: GeneralOperand, pub b: GeneralOperand, pub span: Span,
99 }
100
101 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
102 pub struct SubRndF64 {
103 pub rnd: Option<Rnd>, pub f64: (), pub d: GeneralOperand, pub a: GeneralOperand, pub b: GeneralOperand, pub span: Span,
109 }
110}
111
112pub mod section_2 {
113 use crate::Spanned;
114 use crate::parser::Span;
115 use crate::r#type::common::*;
116
117 use serde::Serialize;
118
119 #[derive(Debug, Clone, PartialEq, Serialize)]
120 pub enum Rnd {
121 Rn, }
123
124 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
125 pub struct SubRndFtzSatF16 {
126 pub rnd: Option<Rnd>, pub ftz: bool, pub sat: bool, pub f16: (), pub d: GeneralOperand, pub a: GeneralOperand, pub b: GeneralOperand, pub span: Span,
134 }
135
136 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
137 pub struct SubRndFtzSatF16x2 {
138 pub rnd: Option<Rnd>, pub ftz: bool, pub sat: bool, pub f16x2: (), pub d: GeneralOperand, pub a: GeneralOperand, pub b: GeneralOperand, pub span: Span,
146 }
147
148 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
149 pub struct SubRndBf16 {
150 pub rnd: Option<Rnd>, pub bf16: (), pub d: GeneralOperand, pub a: GeneralOperand, pub b: GeneralOperand, pub span: Span,
156 }
157
158 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
159 pub struct SubRndBf16x2 {
160 pub rnd: Option<Rnd>, pub bf16x2: (), pub d: GeneralOperand, pub a: GeneralOperand, pub b: GeneralOperand, pub span: Span,
166 }
167}
168
169pub mod section_3 {
170 use crate::Spanned;
171 use crate::parser::Span;
172 use crate::r#type::common::*;
173
174 use serde::Serialize;
175
176 #[derive(Debug, Clone, PartialEq, Serialize)]
177 pub enum Rnd {
178 Rn, Rz, Rm, Rp, }
183
184 #[derive(Debug, Clone, PartialEq, Serialize)]
185 pub enum Atype {
186 Bf16, F16, }
189
190 #[derive(Debug, Clone, PartialEq, Spanned, Serialize)]
191 pub struct SubRndSatF32Atype {
192 pub rnd: Option<Rnd>, pub sat: bool, pub f32: (), pub atype: Atype, pub d: GeneralOperand, pub a: GeneralOperand, pub c: GeneralOperand, pub span: Span,
200 }
201}
202
203pub use section_0::SubSatS32;
206pub use section_0::SubType;
207pub use section_0::Type as Type0;
208pub use section_1::Rnd as Rnd1;
209pub use section_1::SubRndF64;
210pub use section_1::SubRndFtzF32x2;
211pub use section_1::SubRndFtzSatF32;
212pub use section_2::Rnd as Rnd2;
213pub use section_2::SubRndBf16;
214pub use section_2::SubRndBf16x2;
215pub use section_2::SubRndFtzSatF16;
216pub use section_2::SubRndFtzSatF16x2;
217pub use section_3::Atype as Atype3;
218pub use section_3::Rnd as Rnd3;
219pub use section_3::SubRndSatF32Atype;