1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! Original PTX specification:
//!
//! div.type d, a, b;
//! .type = { .u16, .u32, .u64,
//! .s16, .s32, .s64 };
//!
//! div.approx{.ftz}.f32 d, a, b; // fast, approximate divide
//! div.full{.ftz}.f32 d, a, b; // full-range approximate divide
//! div.rnd{.ftz}.f32 d, a, b; // IEEE 754 compliant rounding
//! div.rnd.f64 d, a, b; // IEEE 754 compliant rounding
//! .rnd = { .rn, .rz, .rm, .rp };
#![allow(unused)]
use crate::r#type::common::*;
pub mod section_0 {
use crate::r#type::common::*;
#[derive(Debug, Clone, PartialEq)]
pub enum Type {
U16, // .u16
U32, // .u32
U64, // .u64
S16, // .s16
S32, // .s32
S64, // .s64
}
#[derive(Debug, Clone, PartialEq)]
pub enum Rnd {
Rn, // .rn
Rz, // .rz
Rm, // .rm
Rp, // .rp
}
#[derive(Debug, Clone, PartialEq)]
pub struct DivType {
pub type_: Type, // .type
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
#[derive(Debug, Clone, PartialEq)]
pub struct DivApproxFtzF32 {
pub approx: (), // .approx
pub ftz: bool, // {.ftz}
pub f32: (), // .f32
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
#[derive(Debug, Clone, PartialEq)]
pub struct DivFullFtzF32 {
pub full: (), // .full
pub ftz: bool, // {.ftz}
pub f32: (), // .f32
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
#[derive(Debug, Clone, PartialEq)]
pub struct DivRndFtzF32 {
pub rnd: Rnd, // .rnd
pub ftz: bool, // {.ftz}
pub f32: (), // .f32
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
#[derive(Debug, Clone, PartialEq)]
pub struct DivRndF64 {
pub rnd: Rnd, // .rnd
pub f64: (), // .f64
pub d: GeneralOperand, // d
pub a: GeneralOperand, // a
pub b: GeneralOperand, // b
}
}