Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
avx_type.hpp
Go to the documentation of this file.
1
#include <assert.h>
2
// copy CodeGenerator::AVXtype
3
enum
AVXtype
{
4
// low 3 bit
5
T_N1
= 1,
6
T_N2
= 2,
7
T_N4
= 3,
8
T_N8
= 4,
9
T_N16
= 5,
10
T_N32
= 6,
11
T_NX_MASK
= 7,
12
//
13
T_N_VL
= 1 << 3,
// N * (1, 2, 4) for VL
14
T_DUP
= 1 << 4,
// N = (8, 32, 64)
15
T_66
= 1 << 5,
16
T_F3
= 1 << 6,
17
T_F2
= 1 << 7,
18
T_0F
= 1 << 8,
19
T_0F38
= 1 << 9,
20
T_0F3A
= 1 << 10,
21
T_L0
= 1 << 11,
22
T_L1
= 1 << 12,
23
T_W0
= 1 << 13,
24
T_W1
= 1 << 14,
25
T_EW0
= 1 << 15,
26
T_EW1
= 1 << 16,
27
T_YMM
= 1 << 17,
// support YMM, ZMM
28
T_EVEX
= 1 << 18,
29
T_ER_X
= 1 << 19,
// xmm{er}
30
T_ER_Y
= 1 << 20,
// ymm{er}
31
T_ER_Z
= 1 << 21,
// zmm{er}
32
T_SAE_X
= 1 << 22,
// xmm{sae}
33
T_SAE_Y
= 1 << 23,
// ymm{sae}
34
T_SAE_Z
= 1 << 24,
// zmm{sae}
35
T_MUST_EVEX
= 1 << 25,
// contains T_EVEX
36
T_B32
= 1 << 26,
// m32bcst
37
T_B64
= 1 << 27,
// m64bcst
38
T_M_K
= 1 << 28,
// mem{k}
39
T_XXX
40
};
41
42
const
int
NONE
= 256;
// same as Xbyak::CodeGenerator::NONE
43
44
std::string
type2String
(
int
type)
45
{
46
std::string str;
47
int
low = type &
T_NX_MASK
;
48
if
(0 < low) {
49
const
char
*
tbl
[8] = {
50
"T_N1"
,
"T_N2"
,
"T_N4"
,
"T_N8"
,
"T_N16"
,
"T_N32"
51
};
52
assert(low <
int
(
sizeof
(
tbl
) /
sizeof
(
tbl
[0])));
53
str =
tbl
[low - 1];
54
}
55
if
(type &
T_N_VL
) {
56
if
(!str.empty()) str +=
" | "
;
57
str +=
"T_N_VL"
;
58
}
59
if
(type &
T_DUP
) {
60
if
(!str.empty()) str +=
" | "
;
61
str +=
"T_DUP"
;
62
}
63
if
(type &
T_66
) {
64
if
(!str.empty()) str +=
" | "
;
65
str +=
"T_66"
;
66
}
67
if
(type &
T_F3
) {
68
if
(!str.empty()) str +=
" | "
;
69
str +=
"T_F3"
;
70
}
71
if
(type &
T_F2
) {
72
if
(!str.empty()) str +=
" | "
;
73
str +=
"T_F2"
;
74
}
75
if
(type &
T_0F
) {
76
if
(!str.empty()) str +=
" | "
;
77
str +=
"T_0F"
;
78
}
79
if
(type &
T_0F38
) {
80
if
(!str.empty()) str +=
" | "
;
81
str +=
"T_0F38"
;
82
}
83
if
(type &
T_0F3A
) {
84
if
(!str.empty()) str +=
" | "
;
85
str +=
"T_0F3A"
;
86
}
87
if
(type &
T_L0
) {
88
if
(!str.empty()) str +=
" | "
;
89
str +=
"VEZ_L0"
;
90
}
91
if
(type &
T_L1
) {
92
if
(!str.empty()) str +=
" | "
;
93
str +=
"VEZ_L1"
;
94
}
95
if
(type &
T_W0
) {
96
if
(!str.empty()) str +=
" | "
;
97
str +=
"T_W0"
;
98
}
99
if
(type &
T_W1
) {
100
if
(!str.empty()) str +=
" | "
;
101
str +=
"T_W1"
;
102
}
103
if
(type &
T_EW0
) {
104
if
(!str.empty()) str +=
" | "
;
105
str +=
"T_EW0"
;
106
}
107
if
(type &
T_EW1
) {
108
if
(!str.empty()) str +=
" | "
;
109
str +=
"T_EW1"
;
110
}
111
if
(type &
T_YMM
) {
112
if
(!str.empty()) str +=
" | "
;
113
str +=
"T_YMM"
;
114
}
115
if
(type &
T_EVEX
) {
116
if
(!str.empty()) str +=
" | "
;
117
str +=
"T_EVEX"
;
118
}
119
if
(type &
T_ER_X
) {
120
if
(!str.empty()) str +=
" | "
;
121
str +=
"T_ER_X"
;
122
}
123
if
(type &
T_ER_Y
) {
124
if
(!str.empty()) str +=
" | "
;
125
str +=
"T_ER_Y"
;
126
}
127
if
(type &
T_ER_Z
) {
128
if
(!str.empty()) str +=
" | "
;
129
str +=
"T_ER_Z"
;
130
}
131
if
(type &
T_SAE_X
) {
132
if
(!str.empty()) str +=
" | "
;
133
str +=
"T_SAE_X"
;
134
}
135
if
(type &
T_SAE_Y
) {
136
if
(!str.empty()) str +=
" | "
;
137
str +=
"T_SAE_Y"
;
138
}
139
if
(type &
T_SAE_Z
) {
140
if
(!str.empty()) str +=
" | "
;
141
str +=
"T_SAE_Z"
;
142
}
143
if
(type &
T_MUST_EVEX
) {
144
if
(!str.empty()) str +=
" | "
;
145
str +=
"T_MUST_EVEX"
;
146
}
147
if
(type &
T_B32
) {
148
if
(!str.empty()) str +=
" | "
;
149
str +=
"T_B32"
;
150
}
151
if
(type &
T_B64
) {
152
if
(!str.empty()) str +=
" | "
;
153
str +=
"T_B64"
;
154
}
155
if
(type &
T_M_K
) {
156
if
(!str.empty()) str +=
" | "
;
157
str +=
"T_M_K"
;
158
}
159
return
str;
160
}
AVXtype
AVXtype
Definition
avx_type.hpp:3
T_L1
@ T_L1
Definition
avx_type.hpp:22
T_ER_Z
@ T_ER_Z
Definition
avx_type.hpp:31
T_B32
@ T_B32
Definition
avx_type.hpp:36
T_W0
@ T_W0
Definition
avx_type.hpp:23
T_0F38
@ T_0F38
Definition
avx_type.hpp:19
T_YMM
@ T_YMM
Definition
avx_type.hpp:27
T_EW0
@ T_EW0
Definition
avx_type.hpp:25
T_N2
@ T_N2
Definition
avx_type.hpp:6
T_SAE_Y
@ T_SAE_Y
Definition
avx_type.hpp:33
T_MUST_EVEX
@ T_MUST_EVEX
Definition
avx_type.hpp:35
T_0F3A
@ T_0F3A
Definition
avx_type.hpp:20
T_ER_Y
@ T_ER_Y
Definition
avx_type.hpp:30
T_SAE_Z
@ T_SAE_Z
Definition
avx_type.hpp:34
T_N_VL
@ T_N_VL
Definition
avx_type.hpp:13
T_SAE_X
@ T_SAE_X
Definition
avx_type.hpp:32
T_F2
@ T_F2
Definition
avx_type.hpp:17
T_L0
@ T_L0
Definition
avx_type.hpp:21
T_EVEX
@ T_EVEX
Definition
avx_type.hpp:28
T_EW1
@ T_EW1
Definition
avx_type.hpp:26
T_N32
@ T_N32
Definition
avx_type.hpp:10
T_N16
@ T_N16
Definition
avx_type.hpp:9
T_DUP
@ T_DUP
Definition
avx_type.hpp:14
T_N4
@ T_N4
Definition
avx_type.hpp:7
T_66
@ T_66
Definition
avx_type.hpp:15
T_B64
@ T_B64
Definition
avx_type.hpp:37
T_M_K
@ T_M_K
Definition
avx_type.hpp:38
T_F3
@ T_F3
Definition
avx_type.hpp:16
T_N1
@ T_N1
Definition
avx_type.hpp:5
T_0F
@ T_0F
Definition
avx_type.hpp:18
T_N8
@ T_N8
Definition
avx_type.hpp:8
T_XXX
@ T_XXX
Definition
avx_type.hpp:39
T_W1
@ T_W1
Definition
avx_type.hpp:24
T_NX_MASK
@ T_NX_MASK
Definition
avx_type.hpp:11
T_ER_X
@ T_ER_X
Definition
avx_type.hpp:29
type2String
std::string type2String(int type)
Definition
avx_type.hpp:44
NONE
const int NONE
Definition
avx_type.hpp:42
tbl
const struct Ptn tbl[]
libraries
fc
libraries
ff
depends
xbyak
gen
avx_type.hpp
Generated by
1.12.0