vutable.h
5.02 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
OP_TABLE optab[] = {
/* ADD GROUP */
{"vadd", VADD ,"\tCheck_Vadd" },
{"vsub", VSUB ,"\tCheck_Vadd" },
{"vsut", VSUT ,"\tCheck_Vadd" },
{"vabs", VABS ,"\tCheck_Vadd" },
{"vaddc", VADDC ,"\tCheck_Vadd" },
{"vsubc", VSUBC ,"\tCheck_Vadd" },
{"vaddb", VADDB ,"\tCheck_Vaddb"},
{"vsubb", VSUBB ,"\tCheck_Vaddb"},
{"vaccb", VACCB ,"\tCheck_Vaddb"},
{"vsucb", VSUCB ,"\tCheck_Vaddb"},
{"vsad", VSAD ,"\tCheck_Vsad" },
{"vsac", VSAC ,"\tCheck_Vsad" },
{"vsum", VSUM ,"\tCheck_Vsum" },
{"vsaw", VSAW ,"\tCheck_Vsaw" },
/* LOGICAL GROUP */
{"vand", VAND ,"\tCheck_Vlog" },
{"vnand", VNAND ,"\tCheck_Vlog" },
{"vor", VOR ,"\tCheck_Vlog" },
{"vnor", VNOR ,"\tCheck_Vlog" },
{"vxor", VXOR ,"\tCheck_Vlog" },
{"vnxor", VXNOR ,"\tCheck_Vlog" },
/* SELECT GROUP */
{"vlt", VLT ,"\tCheck_Vcmp" },
{"veq", VEQ ,"\tCheck_Vcmp" },
{"vne", VNE ,"\tCheck_Vcmp" },
{"vge", VGE ,"\tCheck_Vcmp" },
{"vmrg", VMRG ,"\tCheck_Vcmp" },
{"vch", VCH ,"\tCheck_Vcl" },
{"vcl", VCL ,"\tCheck_Vcl" },
{"vcr", VCR ,"\tCheck_Vcl" },
/* MULT GROUP */
{"vmulf", VMULF ,"\tCheck_Vmul" },
{"vmacf", VMACF ,"\tCheck_Vmul" },
{"vmulu", VMULU ,"\tCheck_Vmul" },
{"vmacu", VMACU ,"\tCheck_Vmul" },
{"vrndp", VRNDP ,"\tCheck_Vmul" },
{"vrndn", VRNDN ,"\tCheck_Vmul" },
{"vmulq", VMULQ ,"\tCheck_Vmul" },
{"vmacq", VMACQ ,"\tCheck_Vmul" },
{"vmudl", VMUDL ,"\tCheck_Vmul" },
{"vmadl", VMADL ,"\tCheck_Vmul" },
{"vmudm", VMUDM ,"\tCheck_Vmul" },
{"vmadm", VMADM ,"\tCheck_Vmul" },
{"vmudn", VMUDN ,"\tCheck_Vmul" },
{"vmadn", VMADN ,"\tCheck_Vmul" },
{"vmudh", VMUDH ,"\tCheck_Vmul" },
{"vmadh", VMADH ,"\tCheck_Vmul" },
/* INS, EXTR GROUP */
{"vinst", VINS_T ,"\tCheck_Vins" },
{"vinsq", VINS_Q ,"\tCheck_Vins" },
{"vinsn", VINS_N ,"\tCheck_Vins" },
{"vextt", VEXT_T ,"\tCheck_Vins" },
{"vextq", VEXT_Q ,"\tCheck_Vins" },
{"vextn", VEXT_N ,"\tCheck_Vins" },
/* sp_recp, sp_sqrt, dp_recp, dp_sqrt, dp_recp_chain, dp_sqrt_chain*/
{"sp_recp", SP_RECP ,"vrcp, vrcph" },
{"sp_sqrt", SP_SQRT ,"vrsq, vrsqh" },
{"dp_recp", DP_RECP ,"vrcpl, vrcph, vrcp" },
{"dp_sqrt", DP_SQRT ,"vrsql, vrsqh, vrsq" },
{"dp_recp_chain", DP_RECP_CHAIN ,"vrcpl, vrcph, vrcp" },
{"dp_sqrt_chain", DP_SQRT_CHAIN ,"vrsql, vrsqh, vrsq" },
{"init_div", INIT_DIV ,"InitDiv" },
{"vmov", VMOV ,"\tCheck_Vmov" },
{"dp_mul", DP_MUL ,"\tCheck_dpmul" },
};
TABLE tab[] = {
{"vT", V_TRG },
{"vS", V_SRC },
{"dData", V_DDATA },
{"vAccL", V_ACCL },
{"vAccM", V_ACCM },
{"vAccH", V_ACCH },
{"inVCO", INVCO },
{"inVCE", INVCE },
{"inVCO_H", INVCO_H },
{"inVCO_L", INVCO_L },
{"inVCC", INVCC },
{"element", V_ELM },
{"op", OPER },
{"end", END },
{"start", START },
{"prog_name", PROG_NAME },
{"reg_assign", R_ASSIGN },
{"vsh_offset", VSH_OFF },
{"elh_offset", ELH_OFF },
};
EL_TABLE eltab[] = {
{"vector", 0x0, " " },
{"0q", 0x2, "[0q]" },
{"1q", 0x3, "[1q]" },
{"0h", 0x4, "[0h]" },
{"1h", 0x5, "[1h]" },
{"2h", 0x6, "[2h]" },
{"3h", 0x7, "[3h]" },
{"0w", 0x8, "[0] " },
{"1w", 0x9, "[1] " },
{"2w", 0xa, "[2] " },
{"3w", 0xb, "[3] " },
{"4w", 0xc, "[4] " },
{"5w", 0xd, "[5] " },
{"6w", 0xe, "[6] " },
{"7w", 0xf, "[7] " },
};
RTABLE regtab[] = {
{"vS", SRC, 0 },
{"vT", TRG, 1 },
{"vD", DST, 2 },
{"vAccL", ACCL, 3 },
{"vAccM", ACCM, 4 },
{"vAccH", ACCH, 5 },
{"vDexp", DST_EXP, 6 },
{"vAccLexp", ACCL_EXP, 7 },
{"vAccMexp", ACCM_EXP, 8 },
{"vAccHexp", ACCH_EXP, 9 },
{"vTemp", TEMP, 10 },
{"v4000", V4000, 11 },
{"v0001", V0001, 12 },
/* followings used for double prec instructions*/
{"vTH", VTH, 13 },
{"vTL", VTL, 14 },
{"vDH", VDH, 15 },
{"vDL", VDL, 16 },
{"vDHexp", VDH_Exp, 17 },
{"vDLexp", VDL_Exp, 18 },
{"vSH", VSH, 19 },
{"vSL", VSL, 20 },
};
TABLE reg_index[] = {
{"$v0", 0 },
{"$v1", 1 },
{"$v2", 2 },
{"$v3", 3 },
{"$v4", 4 },
{"$v5", 5 },
{"$v6", 6 },
{"$v7", 7 },
{"$v8", 8 },
{"$v9", 9 },
{"$v10", 10 },
{"$v11", 11 },
{"$v12", 12 },
{"$v13", 13 },
{"$v14", 14 },
{"$v15", 15 },
{"$v16", 16 },
{"$v17", 17 },
{"$v18", 18 },
{"$v19", 19 },
{"$v20", 20 },
{"$v21", 21 },
{"$v22", 22 },
{"$v23", 23 },
{"$v24", 24 },
{"$v25", 25 },
{"$v26", 26 },
{"$v27", 27 },
{"$v28", 28 },
{"$v29", 29 },
{"$v30", 30 },
{"$v31", 31 },
};